Whamcloud - gitweb
Move test 66[ab] from sanity.sh to recovery-small.sh because we need to do
authoradilger <adilger>
Thu, 25 Mar 2004 18:42:47 +0000 (18:42 +0000)
committeradilger <adilger>
Thu, 25 Mar 2004 18:42:47 +0000 (18:42 +0000)
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

lustre/tests/recovery-small.sh
lustre/tests/replay-ost-single.sh
lustre/tests/sanity.sh

index af9a6c1..7f10811 100755 (executable)
@@ -2,8 +2,8 @@
 
 set -e
 
 
 set -e
 
-# 17 = bug 2732
-ALWAYS_EXCEPT="17"
+# 17 = bug 2732   2986
+ALWAYS_EXCEPT="17 19b"
 
 
 LUSTRE=${LUSTRE:-`dirname $0`/..}
 
 
 LUSTRE=${LUSTRE:-`dirname $0`/..}
@@ -210,17 +210,16 @@ test_15() {
 run_test 15 "failed open (-ENOMEM)"
 
 test_16() {
 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
 
     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
     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
     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)"
 
 }
 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)"
 
 }
 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
 
 $CLEANUP
index a08355f..167d545 100755 (executable)
@@ -94,7 +94,7 @@ run_test 2 "|x| 10 open(O_CREAT)s"
 
 test_3() {
     verify=$ROOT/tmp/verify-$$
 
 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
     ddpid=$!
     sync &
     fail ost
@@ -106,7 +106,7 @@ run_test 3 "Fail OST during write, with verification"
 
 test_4() {
     verify=$ROOT/tmp/verify-$$
 
 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
     # 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`
     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
 #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`
 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`
     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
     replay_barrier ost
     rm -f $f
     fail ost
@@ -176,8 +178,8 @@ test_7() {
     # let the delete happen
     sleep 2
     after=`kbytesfree`
     # 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"
 
 }
 run_test 7 "Fail OST before obd_destroy"
 
index 64cad6b..c20e2ec 100644 (file)
@@ -7,8 +7,8 @@
 set -e
 
 ONLY=${ONLY:-"$*"}
 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"
 # 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"
 
 }
 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.
 # 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.