Whamcloud - gitweb
LU-11661 test: improve sanityn test_47g 47/33647/4
authorLai Siyao <lai.siyao@intel.com>
Mon, 22 Oct 2018 11:51:49 +0000 (19:51 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 16 Jan 2019 07:08:02 +0000 (07:08 +0000)
'stat' may be run before 'mkdir', to avoid this, sync data before
test and wait longer time after 'mkdir' in background.

Test-Parameters: trivial testlist=sanityn,sanityn,sanityn,sanityn mdtfilesystemtype=zfs mdscount=2 mdtcount=4 envdefinitions=ONLY=47g
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I314bc9d36629a5185efc5ef8281a03337ea77776
Reviewed-on: https://review.whamcloud.com/33647
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanityn.sh

index 3c4cbaa..68a3faa 100755 (executable)
@@ -2476,11 +2476,13 @@ run_test 47f "pdirops: remote mkdir and rename (src)"
 
 test_47g() {
        [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
+       sync
+       sync_all_data
 #define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK    0x145
        do_facet $SINGLEMDS lctl set_param fail_loc=0x80000145
        $LFS mkdir -i 1 $DIR1/$tfile &
        PID1=$!
-       sleep 1
+       sleep 2
        stat $DIR2/$tfile > /dev/null || error "stat must succeed"
        check_pdo_conflict $PID1 && { wait $PID1;
                                        error "getattr isn't blocked"; }