From: Patrick Farrell Date: Tue, 4 Dec 2018 21:16:50 +0000 (-0600) Subject: LU-10070 tests: Fix replay-single test_85b X-Git-Tag: 2.12.51~69 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=0b9fb772e68db7cbf0c8a755092c1d8b5de6b83d LU-10070 tests: Fix replay-single test_85b test_85b of replay single sets a default striping on $DIR and does not remove it. This makes it impossible to correctly test self-extending layouts, so fix this first. cray-bug-id: LUS-2528 Signed-off-by: Patrick Farrell Change-Id: I0057c8403e3dae2437cf0c8810af8086e2971c35 Reviewed-on: https://review.whamcloud.com/33777 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Ben Evans Reviewed-by: Vitaly Fertman Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index b31596b..d3ece5c 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -3114,28 +3114,26 @@ test_85a() { #bug 16774 run_test 85a "check the cancellation of unused locks during recovery(IBITS)" test_85b() { #bug 16774 + rm -rf $DIR/$tdir + mkdir $DIR/$tdir + lctl set_param -n ldlm.cancel_unused_locks_before_replay "1" if ! combined_mgs_mds ; then mount_mgs_client fi - create_pool $FSNAME.$TESTNAME || - error "unable to create pool $TESTNAME" - do_facet mgs $LCTL pool_add $FSNAME.$TESTNAME $FSNAME-OST0000 || - error "unable to add pool $TESTNAME" - - $SETSTRIPE -c 1 -p $FSNAME.$TESTNAME $DIR + $LFS setstripe -c 1 -i 0 $DIR/$tdir for i in $(seq 100); do - dd if=/dev/urandom of=$DIR/$tfile-$i bs=4096 \ + dd if=/dev/urandom of=$DIR/$tdir/$tfile-$i bs=4096 \ count=32 >/dev/null 2>&1 done cancel_lru_locks osc for i in $(seq 100); do - dd if=$DIR/$tfile-$i of=/dev/null bs=4096 \ + dd if=$DIR/$tdir/$tfile-$i of=/dev/null bs=4096 \ count=32 >/dev/null 2>&1 done @@ -3152,11 +3150,6 @@ test_85b() { #bug 16774 -n ldlm.namespaces.*OST0000*$addr.lock_unused_count) echo "after recovery: unused locks count = $count2" - do_facet mgs $LCTL pool_remove $FSNAME.$TESTNAME $FSNAME-OST0000 || - error "unable to remove pool $TESTNAME" - do_facet mgs $LCTL pool_destroy $FSNAME.$TESTNAME || - error "unable to destroy the pool $TESTNAME" - if ! combined_mgs_mds ; then umount_mgs_client fi @@ -3164,6 +3157,8 @@ test_85b() { #bug 16774 if [ $count2 -ge $count ]; then error "unused locks are not canceled" fi + + rm -rf $DIR/$tdir } run_test 85b "check the cancellation of unused locks during recovery(EXTENT)"