From 1550e30aeed560b0cd844ef09b1b2a756f9abd55 Mon Sep 17 00:00:00 2001 From: yury Date: Fri, 6 Oct 2006 08:30:31 +0000 Subject: [PATCH] - fixes in sanity tests. --- lustre/tests/replay-dual.sh | 22 ++++++++++---------- lustre/tests/replay-single.sh | 48 +++++++++++++++++++++---------------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index 71184a7..3eddec1 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -196,7 +196,7 @@ test_11() { mcreate $MOUNT1/$tfile-5 # drop all reint replies for a while sysctl -w lustre.fail_loc=0x0119 - facet_failover mds + facet_failover $SINGLEMDS #sleep for while, let both clients reconnect and timeout sleep $((TIMEOUT * 2)) sysctl -w lustre.fail_loc=0 @@ -216,7 +216,7 @@ test_12() { #define OBD_FAIL_LDLM_ENQUEUE 0x302 sysctl -w lustre.fail_loc=0x80000302 - facet_failover mds + facet_failover $SINGLEMDS df $MOUNT || return 1 sysctl -w lustre.fail_loc=0 @@ -242,7 +242,7 @@ test_13() { # drop close sysctl -w lustre.fail_loc=0x80000115 - facet_failover mds + facet_failover $SINGLEMDS df $MOUNT || return 1 sysctl -w lustre.fail_loc=0 @@ -261,7 +261,7 @@ test_14() { createmany -o $MOUNT1/$tfile-3- 25 umount $MOUNT2 - facet_failover mds + facet_failover $SINGLEMDS # expect failover to fail df $MOUNT && return 1 sleep 1 @@ -280,7 +280,7 @@ test_15() { createmany -o $MOUNT2/$tfile-2- 1 umount $MOUNT2 - facet_failover mds + facet_failover $SINGLEMDS df $MOUNT || return 1 unlinkmany $MOUNT1/$tfile- 25 || return 2 @@ -299,7 +299,7 @@ test_15a() { echo "data" > "$MOUNT2/${tfile}-m2" umount $MOUNT2 - facet_failover mds + facet_failover $SINGLEMDS df $MOUNT || return 1 ost_last_id=`cat /proc/fs/lustre/obdfilter/*/last_id` @@ -346,7 +346,7 @@ test_15b() { umount $MOUNT2 do_facet ost1 "sysctl -w lustre.fail_loc=0x80000802" - facet_failover mds + facet_failover $SINGLEMDS df $MOUNT || return 1 do_facet ost1 "sysctl -w lustre.fail_loc=0" @@ -363,7 +363,7 @@ test_15c() { done umount $MOUNT2 - facet_failover mds + facet_failover $SINGLEMDS df $MOUNT || return 1 @@ -378,9 +378,9 @@ test_16() { createmany -o $MOUNT2/$tfile-2- 1 umount $MOUNT2 - facet_failover mds + facet_failover $SINGLEMDS sleep $TIMEOUT - facet_failover mds + facet_failover $SINGLEMDS df $MOUNT || return 1 unlinkmany $MOUNT1/$tfile- 25 || return 2 @@ -423,7 +423,7 @@ test_18() { # bug 3822 - evicting client with enqueued lock statmany -s $MOUNT1/$tdir/f 1 500 & OPENPID=$! NOW=`date +%s` - do_facet mds sysctl -w lustre.fail_loc=0x8000030b # hold enqueue + do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0x8000030b # hold enqueue sleep 1 #define OBD_FAIL_LDLM_BL_CALLBACK 0x305 do_facet client sysctl -w lustre.fail_loc=0x80000305 # drop cb, evict diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index a87e8a8..9904e05 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -150,9 +150,9 @@ run_test 3a "replay failed open(O_DIRECTORY)" test_3b() { replay_barrier $SINGLEMDS #define OBD_FAIL_MDS_OPEN_PACK | OBD_FAIL_ONCE - do_facet mds "sysctl -w lustre.fail_loc=0x80000114" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x80000114" touch $DIR/$tfile - do_facet mds "sysctl -w lustre.fail_loc=0" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0" fail $SINGLEMDS $CHECKSTAT -t file $DIR/$tfile && return 2 return 0 @@ -162,9 +162,9 @@ run_test 3b "replay failed open -ENOMEM" test_3c() { replay_barrier $SINGLEMDS #define OBD_FAIL_MDS_ALLOC_OBDO | OBD_FAIL_ONCE - do_facet mds "sysctl -w lustre.fail_loc=0x80000128" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x80000128" touch $DIR/$tfile - do_facet mds "sysctl -w lustre.fail_loc=0" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0" fail $SINGLEMDS $CHECKSTAT -t file $DIR/$tfile && return 2 @@ -711,7 +711,7 @@ run_test 32 "close() notices client eviction; close() after client eviction" test_33() { replay_barrier $SINGLEMDS touch $DIR/$tfile - fail_abort mds + fail_abort $SINGLEMDS # this file should be gone, because the replay was aborted $CHECKSTAT -t file $DIR/$tfile && return 3 return 0 @@ -726,7 +726,7 @@ test_34() { rm -f $DIR/$tfile replay_barrier $SINGLEMDS - fail_abort mds + fail_abort $SINGLEMDS kill -USR1 $pid [ -e $DIR/$tfile ] && return 1 sync @@ -739,13 +739,13 @@ test_35() { touch $DIR/$tfile #define OBD_FAIL_MDS_REINT_NET_REP 0x119 - do_facet mds "sysctl -w lustre.fail_loc=0x80000119" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x80000119" rm -f $DIR/$tfile & sleep 1 sync sleep 1 # give a chance to remove from MDS - fail_abort mds + fail_abort $SINGLEMDS $CHECKSTAT -t file $DIR/$tfile && return 1 || true } run_test 35 "test recovery from llog for unlink op" @@ -756,7 +756,7 @@ test_36() { replay_barrier $SINGLEMDS touch $DIR/$tfile checkstat $DIR/$tfile - facet_failover mds + facet_failover $SINGLEMDS cancel_lru_locks mdc if dmesg | grep "unknown lock cookie"; then echo "cancel after replay failed" @@ -778,7 +778,7 @@ test_37() { replay_barrier $SINGLEMDS # clear the dmesg buffer so we only see errors from this recovery dmesg -c >/dev/null - fail_abort mds + fail_abort $SINGLEMDS kill -USR1 $pid dmesg | grep "mds_unlink_orphan.*error .* unlinking orphan" && return 1 sync @@ -820,9 +820,9 @@ test_40(){ writeme -s $MOUNT/${tfile}-2 & WRITE_PID=$! sleep 1 - facet_failover mds + facet_failover $SINGLEMDS #define OBD_FAIL_MDS_CONNECT_NET 0x117 - do_facet mds "sysctl -w lustre.fail_loc=0x80000117" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x80000117" kill -USR1 $PID stat1=`count_ost_writes` sleep $TIMEOUT @@ -911,11 +911,11 @@ test_44() { [ "$mdcdev" ] || exit 2 for i in `seq 1 10`; do #define OBD_FAIL_TGT_CONN_RACE 0x701 - do_facet mds "sysctl -w lustre.fail_loc=0x80000701" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x80000701" $LCTL --device $mdcdev recover df $MOUNT done - do_facet mds "sysctl -w lustre.fail_loc=0" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0" return 0 } run_test 44 "race in target handle connect" @@ -925,11 +925,11 @@ test_44b() { [ "$mdcdev" ] || exit 2 for i in `seq 1 10`; do #define OBD_FAIL_TGT_DELAY_RECONNECT 0x704 - do_facet mds "sysctl -w lustre.fail_loc=0x80000704" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x80000704" $LCTL --device $mdcdev recover df $MOUNT done - do_facet mds "sysctl -w lustre.fail_loc=0" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0" return 0 } run_test 44b "race in target handle connect" @@ -1026,9 +1026,9 @@ test_52() { multiop $DIR/$tfile s replay_barrier $SINGLEMDS - do_facet mds "sysctl -w lustre.fail_loc=0x8000030c" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x8000030c" fail $SINGLEMDS - do_facet mds "sysctl -w lustre.fail_loc=0x0" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x0" $CHECKSTAT -t file $DIR/$tfile-* && return 3 || true } @@ -1040,11 +1040,11 @@ run_test 52 "time out lock replay (3764)" #b3761 ASSERTION(hash != 0) failed test_55() { # OBD_FAIL_MDS_OPEN_CREATE | OBD_FAIL_ONCE - do_facet mds "sysctl -w lustre.fail_loc=0x8000012b" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x8000012b" touch $DIR/$tfile & # give touch a chance to run sleep 5 - do_facet mds "sysctl -w lustre.fail_loc=0x0" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x0" rm $DIR/$tfile return 0 } @@ -1063,13 +1063,13 @@ run_test 56 "don't replay a symlink open request (3440)" #recovery one mds-ost setattr from llog test_57() { #define OBD_FAIL_MDS_OST_SETATTR 0x12c - do_facet mds "sysctl -w lustre.fail_loc=0x8000012c" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x8000012c" touch $DIR/$tfile replay_barrier $SINGLEMDS fail $SINGLEMDS sleep 1 $CHECKSTAT -t file $DIR/$tfile || return 1 - do_facet mds "sysctl -w lustre.fail_loc=0x0" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x0" rm $DIR/$tfile } run_test 57 "test recovery from llog for setattr op" @@ -1077,14 +1077,14 @@ run_test 57 "test recovery from llog for setattr op" #recovery many mds-ost setattr from llog test_58() { #define OBD_FAIL_MDS_OST_SETATTR 0x12c - do_facet mds "sysctl -w lustre.fail_loc=0x8000012c" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x8000012c" mkdir $DIR/$tdir createmany -o $DIR/$tdir/$tfile-%d 2500 replay_barrier $SINGLEMDS fail $SINGLEMDS sleep 2 $CHECKSTAT -t file $DIR/$tdir/$tfile-* || return 1 - do_facet mds "sysctl -w lustre.fail_loc=0x0" + do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x0" unlinkmany $DIR/$tdir/$tfile-%d 2500 rmdir $DIR/$tdir } -- 1.8.3.1