Whamcloud - gitweb
LU-11661 test: improve sanityn test_47g 74/34574/2
authorLai Siyao <lai.siyao@intel.com>
Mon, 22 Oct 2018 11:51:49 +0000 (19:51 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 10 May 2019 21:04:41 +0000 (21:04 +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

Lustre-change: https://review.whamcloud.com/33647
Lustre-commit: 6b44117e9f35f6610b2c6d975c89b519aaef7730

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I314bc9d36629a5185efc5ef8281a03337ea77776
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34574
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanityn.sh

index 73ea5af..a725622 100755 (executable)
@@ -2477,11 +2477,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"; }