From: adilger Date: Thu, 25 Mar 2004 18:42:47 +0000 (+0000) Subject: Move test 66[ab] from sanity.sh to recovery-small.sh because we need to do X-Git-Tag: v1_7_100~2400 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=ca76a109f92a5177d38dcec7c038677cc0958104 Move test 66[ab] from sanity.sh to recovery-small.sh because we need to do ops on the OST, and that isn't possible with sanity.sh if it is remote. Fix test replay-ost-single test 7 for bug 2123 also. b=2983, b=2123 --- diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index af9a6c1..7f10811 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -2,8 +2,8 @@ set -e -# 17 = bug 2732 -ALWAYS_EXCEPT="17" +# 17 = bug 2732 2986 +ALWAYS_EXCEPT="17 19b" LUSTRE=${LUSTRE:-`dirname $0`/..} @@ -210,17 +210,16 @@ test_15() { run_test 15 "failed open (-ENOMEM)" test_16() { -# OBD_FAIL_PTLRPC_BULK_PUT_NET | OBD_FAIL_ONCE do_facet client cp /etc/termcap $MOUNT sync +#define OBD_FAIL_PTLRPC_BULK_PUT_NET 0x504 | OBD_FAIL_ONCE sysctl -w lustre.fail_loc=0x80000504 cancel_lru_locks OSC - # wil get evicted here + # will get evicted here do_facet client "diff /etc/termcap $MOUNT/termcap" && return 1 sysctl -w lustre.fail_loc=0 do_facet client "diff /etc/termcap $MOUNT/termcap" || return 2 - } run_test 16 "timeout bulk put, evict client (2732)" @@ -293,5 +292,28 @@ test_18b() { } run_test 18b "eviction and reconnect clears page cache (2766)" +test_19a() { # bug 2983 - ldlm_handle_enqueue cleanup + mkdir -p $DIR/d19 + multiop $DIR/d19/f19a O_wc & + MULTI_PID=$! + usleep 500 + cancel_lru_locks OSC +#define OBD_FAIL_LDLM_ENQUEUE_EXTENT_ERR 0x308 + do_facet ost sysctl -w lustre.fail_loc=0x80000308 + kill -USR1 $MULTI_PID + wait $MULTI_PID && error "multiop didn't fail enqueue" || true +} +run_test 19a "ldlm_handle_enqueue error (should return error) ===" + +test_19b() { # bug 2986 - ldlm_handle_enqueue error during open + mkdir $DIR/d19 + touch $DIR/d19/f19b + cancel_lru_locks OSC +#define OBD_FAIL_LDLM_ENQUEUE_EXTENT_ERR 0x308 + do_facet ost sysctl -w lustre.fail_loc=0x80000308 + dd if=/etc/hosts of=$DIR/d19/f19b && error "didn't fail enqueue" || true +} +run_test 19b "ldlm_handle_enqueue error (should return error) ===" + $CLEANUP diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh index a08355f..167d545 100755 --- a/lustre/tests/replay-ost-single.sh +++ b/lustre/tests/replay-ost-single.sh @@ -94,7 +94,7 @@ run_test 2 "|x| 10 open(O_CREAT)s" test_3() { verify=$ROOT/tmp/verify-$$ - dd if=/dev/urandom bs=1024 count=5120 | tee $verify > $DIR/$tfile & + dd if=/dev/urandom bs=4096 count=1280 | tee $verify > $DIR/$tfile & ddpid=$! sync & fail ost @@ -106,7 +106,7 @@ run_test 3 "Fail OST during write, with verification" test_4() { verify=$ROOT/tmp/verify-$$ - dd if=/dev/urandom bs=1024 count=5120 | tee $verify > $DIR/$tfile + dd if=/dev/urandom bs=4096 count=1280 | tee $verify > $DIR/$tfile # invalidate cache, so that we're reading over the wire for i in /proc/fs/lustre/ldlm/namespaces/OSC_*MNT*; do echo -n clear > $i/lru_size @@ -140,7 +140,7 @@ test_6() { rm -f $f sync && sleep 2 && sync # wait for delete thread before=`kbytesfree` - dd if=/dev/urandom bs=1024 count=5120 of=$f + dd if=/dev/urandom bs=4096 count=1280 of=$f #define OBD_FAIL_MDS_REINT_NET_REP 0x119 do_facet mds "sysctl -w lustre.fail_loc=0x80000119" sync @@ -163,11 +163,13 @@ run_test 6 "Fail OST before obd_destroy" test_7() { f=$DIR/$tfile before=`kbytesfree` - dd if=/dev/urandom bs=1024 count=5120 of=$f + rm -f $f + sync && sleep 2 && sync # wait for delete thread + dd if=/dev/urandom bs=4096 count=1280 of=$f sync after_dd=`kbytesfree` - echo "before: $before after_dd: $after_dd" - (( before > after_dd )) || return 1 + log "before: $before after_dd: $after_dd" + (( $before > $after_dd )) || return 1 replay_barrier ost rm -f $f fail ost @@ -176,8 +178,8 @@ test_7() { # let the delete happen sleep 2 after=`kbytesfree` - echo "before: $before after: $after" - (( before == after )) || return 3 + log "before: $before after: $after" + (( $before == $after )) || return 3 } run_test 7 "Fail OST before obd_destroy" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 64cad6b..c20e2ec 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -7,8 +7,8 @@ set -e ONLY=${ONLY:-"$*"} -# bug number for skipped test: 2986 -ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"66b"} +# bug number for skipped test: +ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-""} # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! [ "$ALWAYS_EXCEPT$EXCEPT" ] && echo "Skipping tests: $ALWAYS_EXCEPT $EXCEPT" @@ -1835,30 +1835,6 @@ test_65() { } run_test 65 "Verify that the files are created using parent dir's stripe info" -test_66a() { # bug 2983 - ldlm_handle_enqueue cleanup - mkdir -p $DIR/d66 - multiop $DIR/d66/f66 O_wc & - MULTI_PID=$! - usleep 500 - cancel_lru_locks OSC -#define OBD_FAIL_LDLM_ENQUEUE_EXTENT_ERR 0x308 - sysctl -w lustre.fail_loc=0x80000308 - kill -USR1 $MULTI_PID - wait $MULTI_PID && error "multiop didn't fail enqueue" || true -} -run_test 66a "ldlm_handle_enqueue error (should return error) ===" - -test_66b() { # bug 2986 - ldlm_handle_enqueue error during open - mkdir $DIR/d66 - touch $DIR/d66/f66 - cancel_lru_locks OSC -#define OBD_FAIL_LDLM_ENQUEUE_EXTENT_ERR 0x308 - sysctl -w lustre.fail_loc=0x80000308 - dd if=/etc/hosts of=$DIR/d66/f66 && error "didn't fail enqueue" || true -} -run_test 66b "ldlm_handle_enqueue error (should return error) ===" - - # on the LLNL clusters, runas will still pick up root's $TMP settings, # which will not be writable for the runas user, and then you get a CVS # error message with a corrupt path string (CVS bug) and panic.