Whamcloud - gitweb
LU-13019 tests: replace usleep in test scripts
[fs/lustre-release.git] / lustre / tests / replay-single.sh
index 153eb35..726d773 100755 (executable)
@@ -473,7 +473,7 @@ test_20b() { # bug 10480
 
        dd if=/dev/zero of=$DIR/$tfile bs=4k count=10000 &
        while [ ! -e $DIR/$tfile ] ; do
-               usleep 60                       # give dd a chance to start
+               sleep 0.01                      # give dd a chance to start
        done
 
        $LFS getstripe $DIR/$tfile || error "$LFS getstripe $DIR/$tfile failed"
@@ -3110,10 +3110,6 @@ test_85b() { #bug 16774
 
        lctl set_param -n ldlm.cancel_unused_locks_before_replay "1"
 
-       if ! combined_mgs_mds ; then
-               mount_mgs_client
-       fi
-
        $LFS setstripe -c 1 -i 0 $DIR/$tdir
 
        for i in $(seq 100); do
@@ -3141,10 +3137,6 @@ test_85b() { #bug 16774
                 -n ldlm.namespaces.*OST0000*$addr.lock_unused_count)
        echo "after recovery: unused locks count = $count2"
 
-       if ! combined_mgs_mds ; then
-               umount_mgs_client
-       fi
-
        if [ $count2 -ge $count ]; then
                error "unused locks are not canceled"
        fi
@@ -4836,8 +4828,8 @@ test_131b() {
 run_test 131b "DoM file write replay"
 
 test_132a() {
-       [ "$MDS1_VERSION" -lt $(version_code 2.9.90) ] &&
-               skip "Do not support PFL files before 2.10"
+       [ "$MDS1_VERSION" -lt $(version_code 2.12.0) ] &&
+               skip "Need MDS version 2.12.0 or later"
 
        $LFS setstripe -E 1M -c 1 -E EOF -c 2 $DIR/$tfile
        replay_barrier $SINGLEMDS
@@ -4902,16 +4894,19 @@ test_134() {
        pool_add pool_134
        pool_add_targets pool_134 1 1
 
-       mkdir $DIR/$tdir
-       $LFS setstripe -p pool_134 $DIR/$tdir
+       mkdir -p $DIR/$tdir/{A,B}
+       $LFS setstripe -p pool_134 $DIR/$tdir/A
+       $LFS setstripe -E EOF -p pool_134 $DIR/$tdir/B
 
        replay_barrier mds1
 
-       touch $DIR/$tdir/$tfile
+       touch $DIR/$tdir/A/$tfile || error "touch non-pfl file failed"
+       touch $DIR/$tdir/B/$tfile || error "touch pfl failed"
 
        fail mds1
 
-       [ -f $DIR/$tdir/$tfile ] || error "file does not exist"
+       [ -f $DIR/$tdir/A/$tfile ] || error "non-pfl file does not exist"
+       [ -f $DIR/$tdir/B/$tfile ] || error "pfl file does not exist"
 }
 run_test 134 "replay creation of a file created in a pool"