Whamcloud - gitweb
LU-2189 tests: Ensure quiescence for sanityn/36 73/27373/3
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Thu, 1 Jun 2017 12:00:01 +0000 (08:00 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 13 Jun 2017 16:54:50 +0000 (16:54 +0000)
Because sanityn/36 measures space used/free, ensure that all previous
operations have completed prior to getting statfs info.

Test-Parameters: mdtfilesystemtype=zfs ostfilesystemtype=zfs osscount=1 ostcount=2 mdscount=1 mdtcount=1 testlist=sanityn
Test-Parameters: mdtfilesystemtype=zfs ostfilesystemtype=zfs osscount=1 ostcount=2 mdscount=1 mdtcount=1 testlist=sanityn
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I684d428bbb6fca1a004bba5acf6a17a1636fb0dd
Reviewed-on: https://review.whamcloud.com/27373
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanityn.sh

index 95027ea..74ae81e 100755 (executable)
@@ -33,8 +33,8 @@ init_test_env $@
 init_logging
 
 if [ $(facet_fstype $SINGLEMDS) = "zfs" ]; then
-# bug number for skipped test:        LU-2189 LU-2776
-       ALWAYS_EXCEPT="$ALWAYS_EXCEPT 36      51a"
+# bug number for skipped test:        LU-2776
+       ALWAYS_EXCEPT="$ALWAYS_EXCEPT 51a"
 # LU-2829 / LU-2887 - make allowances for ZFS slowness
        TEST33_NFILES=${TEST33_NFILES:-1000}
 fi
@@ -1213,10 +1213,12 @@ test_36() { #bug 16417
        i=0
        SIZE=50
        let SIZE_B=SIZE*1024*1024
-       sync; sleep 5; sync # wait for delete thread
+       sync; sleep 2; sync # wait for delete thread
+       wait_mds_ost_sync || error "wait_mds_ost_sync failed"
+       wait_destroy_complete || error "wait_destroy_complete failed"
 
        while [ $i -le 10 ]; do
-               lctl mark "start test"
+               lctl mark "start test - cycle ($i)"
                local before=$(lfs_df $MOUNT1 | awk '/^filesystem/{ print $4; exit }')
                dd if=/dev/zero of=$DIR1/$tdir/$tfile bs=1M count=$SIZE ||
                        error "dd $DIR1/$tdir/$tfile ${SIZE}MB failed"
@@ -1229,6 +1231,7 @@ test_36() { #bug 16417
                rm -f $DIR1/$tdir/$tfile
                kill -USR1 $read_pid
                wait $read_pid
+               sync; sleep 2; sync # Ensure new statfs
                wait_delete_completed
                local after=$(lfs_df $MOUNT1 | awk '/^filesystem/{ print $4; exit }')
                echo "*** cycle($i) *** before($before) after_dd($after_dd)" \