Whamcloud - gitweb
LU-8523 test: sanity 311 is too strict 10/22210/3
authorLai Siyao <lai.siyao@intel.com>
Mon, 29 Aug 2016 04:08:55 +0000 (12:08 +0800)
committerAndreas Dilger <andreas.dilger@intel.com>
Tue, 30 Aug 2016 00:37:47 +0000 (00:37 +0000)
sanity 311 unlinks 1000 files, but the real destroyed objects may be
less, because there is some delay from when the files are unlinked
and when the MDS destroys the objects on the OSTs. Previously it's
set to check at least 900 objects are destroyed, but autotest found
only 880 objects destroyed in some cases, so now it's reduced to 800.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I88f45ae744475f2e2cdf8f82c1405164d6f4cd1c
Reviewed-on: http://review.whamcloud.com/22210
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/tests/sanity.sh

index 085a3f4..c2d49ac 100755 (executable)
@@ -14987,12 +14987,12 @@ test_311() {
        local new_iused
        for i in $(seq 120); do
                new_iused=$($LFS df -i | grep OST0000 | awk '{ print $3 }')
        local new_iused
        for i in $(seq 120); do
                new_iused=$($LFS df -i | grep OST0000 | awk '{ print $3 }')
-               [ $new_iused -lt $((old_iused - 900)) ] && break
+               [ $((old_iused - new_iused)) -gt 800 ] && break
                sleep 1
        done
 
        echo "waited $i sec, old Iused $old_iused, new Iused $new_iused"
                sleep 1
        done
 
        echo "waited $i sec, old Iused $old_iused, new Iused $new_iused"
-       [ $new_iused -lt $((old_iused - 900)) ] ||
+       [ $((old_iused - new_iused)) -gt 800 ] ||
                error "objs not destroyed after unlink"
 }
 run_test 311 "disable OSP precreate, and unlink should destroy objs"
                error "objs not destroyed after unlink"
 }
 run_test 311 "disable OSP precreate, and unlink should destroy objs"