From c590eaa213e6333531e775b100bfb78c952f4d79 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Tue, 4 Dec 2018 15:16:50 -0600 Subject: [PATCH] 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. This patch is back-port from: Lustre-commit: 0b9fb772e68db7cbf0c8a755092c1d8b5de6b83d Lustre-change: https://review.whamcloud.com/33777 Cray-bug-id: LUS-2528 Signed-off-by: Patrick Farrell Change-Id: I0057c8403e3dae2437cf0c8810af8086e2971c35 Reviewed-by: Andreas Dilger Reviewed-by: Ben Evans Reviewed-by: Vitaly Fertman Reviewed-on: https://review.whamcloud.com/34406 Reviewed-by: Patrick Farrell Reviewed-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/34470 Tested-by: Jenkins Tested-by: Maloo --- lustre/tests/replay-single.sh | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index a543f2a..5337197 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)" -- 1.8.3.1