Whamcloud - gitweb
Branch: b1_4
authoradilger <adilger>
Tue, 12 Apr 2005 09:43:52 +0000 (09:43 +0000)
committeradilger <adilger>
Tue, 12 Apr 2005 09:43:52 +0000 (09:43 +0000)
Have local, lov, uml, mount2fs.sh configs all generate the config.xml
file based on their own filename instead of hard coding it.  This makes
it easier to copy the config to another name, edit it, and then run
"NAME=foo sh llmount.sh" and similar tests.

Allow mount2fs.sh config to have some parameters overridden, and add
"--group fs{1,2}" to the config to allo testing startup/shutdown of
each filesystem independently.

lustre/tests/insanity.sh
lustre/tests/local.sh
lustre/tests/lov.sh
lustre/tests/mount2fs.sh
lustre/tests/recovery-small.sh
lustre/tests/replay-dual.sh
lustre/tests/uml.sh

index a991a05..7007f8e 100755 (executable)
@@ -618,4 +618,5 @@ test_10() {
 run_test 10 "Running Availability for 6 hours..."
 
 equals_msg "Done, cleaning up"
-$CLEANUP
+# we need to force cleanup for the stale MDS conns until bug 5921 is fixed
+FORCE=--force $CLEANUP
index 156ee6b..b19837c 100755 (executable)
@@ -2,7 +2,7 @@
 
 export PATH=`dirname $0`/../utils:$PATH
 
-config=${1:-local.xml}
+config=${1:-`basename $0 .sh`.xml}
 
 LMC="${LMC:-lmc} -m $config"
 TMP=${TMP:-/tmp}
index ca6683b..4783833 100755 (executable)
@@ -4,7 +4,7 @@ set -e
 
 export PATH=`dirname $0`/../utils:$PATH
 
-config=${1:-lov.xml}
+config=${1:-`basename $0 .sh`.xml}
 
 LMC="${LMC:-lmc} -m $config"
 TMP=${TMP:-/tmp}
index 28df665..cd51424 100644 (file)
@@ -3,12 +3,12 @@
 # Test case for 2 different filesystems mounted on the same client.
 # Uses 3 umls
 
-config=${1-mds-bug.xml}
+config=${config:-`basename $0 .sh`.xml}
 LMC=${LMC-../utils/lmc}
 TMP=${TMP:-/tmp}
 
 MDSDEV=${MDSDEV:-$TMP/mds1-`hostname`}
-MDSDEV2=${MDSDEV:-$TMP/mds2-`hostname`}
+MDSDEV2=${MDSDEV2:-$TMP/mds2-`hostname`}
 MOUNT=${MOUNT:-/mnt/lustre}
 MOUNT1=${MOUNT1:-$MOUNT}
 MOUNT2=${MOUNT2:-${MOUNT}2}
@@ -19,25 +19,29 @@ OSTDEV1=${OSTDEV1:-$TMP/ost1-`hostname`}
 OSTDEV2=${OSTDEV2:-$TMP/ost2-`hostname`}
 OSTSIZE=100000
 
-MDSNODE=uml1
-OSTNODE=uml2
-CLIENT=uml3
+MDSNODE=${MDSNODE:-uml1}
+OSTNODE=${OSTNODE:-uml1}
+CLIENT=${CLIENT:-uml2}
+CLIENT2=${CLIENT2:-uml2}
 
 # create nodes
 ${LMC} -o $config --add net --node $MDSNODE --nid $MDSNODE --nettype tcp || exit 1
 ${LMC} -m $config --add net --node $OSTNODE --nid $OSTNODE --nettype tcp || exit 2
 ${LMC} -m $config --add net --node $CLIENT --nid $CLIENT --nettype tcp || exit 3
+if [ "$CLIENT" != "$CLIENT2" ]; then
+       ${LMC} -m $config --add net --node $CLIENT2 --nid $CLIENT --nettype tcp || exit 3
+fi
 
 # configure mds server
-${LMC} -m $config --format --add mds --node $MDSNODE --mds mds1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE ||exit 10
-${LMC} -m $config --format --add mds --node $MDSNODE --mds mds2 --fstype $FSTYPE --dev $MDSDEV2 --size $MDSSIZE ||exit 10
+${LMC} -m $config --add mds --node $MDSNODE --mds mds1 --group fs1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE ||exit 10
+${LMC} -m $config --add mds --node $MDSNODE --mds mds2 --group fs2 --fstype $FSTYPE --dev $MDSDEV2 --size $MDSSIZE ||exit 10
 
 # configure ost
 ${LMC} -m $config --add lov --lov lov1 --mds mds1 --stripe_sz 65536 --stripe_cnt 0 --stripe_pattern 0 || exit 20
 ${LMC} -m $config --add lov --lov lov2 --mds mds2 --stripe_sz 65536 --stripe_cnt 0 --stripe_pattern 0 || exit 20
-${LMC} -m $config --add ost --node $OSTNODE --lov lov1 --fstype $FSTYPE --dev $OSTDEV1 --size $OSTSIZE || exit 21
-${LMC} -m $config --add ost --node $OSTNODE --lov lov2 --fstype $FSTYPE --dev $OSTDEV2 --size $OSTSIZE || exit 22
+${LMC} -m $config --add ost --node $OSTNODE --group fs1 --lov lov1 --fstype $FSTYPE --dev $OSTDEV1 --size $OSTSIZE || exit 21
+${LMC} -m $config --add ost --node $OSTNODE --group fs2 --lov lov2 --fstype $FSTYPE --dev $OSTDEV2 --size $OSTSIZE || exit 22
 
 # create client config
 ${LMC} -m $config --add mtpt --node $CLIENT --path ${MOUNT1} --mds mds1 --lov lov1 || exit 30
-${LMC} -m $config --add mtpt --node $CLIENT --path ${MOUNT2} --mds mds2 --lov lov2 || exit 30
+${LMC} -m $config --add mtpt --node $CLIENT2 --path ${MOUNT2} --mds mds2 --lov lov2 || exit 30
index d7480b6..2980fdf 100755 (executable)
@@ -244,8 +244,10 @@ test_17() {
     # OBD_FAIL_PTLRPC_BULK_GET_NET 0x0503 | OBD_FAIL_ONCE
     # client will get evicted here
     sysctl -w lustre.fail_loc=0x80000503
-    # need to write enough to ensure we send an RPC
-    do_facet client dd if=/dev/zero of=$DIR/$tfile bs=1024k count=2
+    # need to ensure we send an RPC
+    do_facet client cp /etc/termcap $DIR/$tfile
+    sync
+
     sleep $TIMEOUT
     sysctl -w lustre.fail_loc=0
     do_facet client "df $DIR"
@@ -282,7 +284,6 @@ test_18a() {
 run_test 18a "manual ost invalidate clears page cache immediately"
 
 test_18b() {
-# OBD_FAIL_PTLRPC_BULK_PUT_NET|OBD_FAIL_ONCE
     do_facet client mkdir -p $MOUNT/$tdir
     f=$MOUNT/$tdir/$tfile
     f2=$MOUNT/$tdir/${tfile}-2
@@ -297,6 +298,7 @@ test_18b() {
     do_facet client cp /etc/termcap $f
     sync
     # just use this write to trigger the client's eviction from the ost
+# OBD_FAIL_PTLRPC_BULK_GET_NET|OBD_FAIL_ONCE
     sysctl -w lustre.fail_loc=0x80000503
     do_facet client dd if=/dev/zero of=$f2 bs=4k count=1
     sync
@@ -381,7 +383,7 @@ test_24() { # bug 2248 - eviction fails writeback but app doesn't see it
        multiop $DIR/$tdir/$tfile Owy_wyc &
        MULTI_PID=$!
        usleep 500
-# OBD_FAIL_PTLRPC_BULK_PUT_NET|OBD_FAIL_ONCE
+# OBD_FAIL_PTLRPC_BULK_GET_NET|OBD_FAIL_ONCE
        sysctl -w lustre.fail_loc=0x80000503
        usleep 500
        kill -USR1 $MULTI_PID
@@ -393,12 +395,11 @@ test_24() {       # bug 2248 - eviction fails writeback but app doesn't see it
 }
 run_test 24 "fsync error (should return error)" 
 
-
 test_25a() {
        mkdir -p $DIR/$tdir
        # put a load of file creates/writes/deletes for 10 min.
        do_facet client "writemany -q -a $DIR/$tdir/$tfile 600 5" &
-        CLIENT_PID=$!
+       CLIENT_PID=$!
        echo writemany pid $CLIENT_PID
        sleep 10
        FAILURE_MODE="SOFT"
@@ -420,7 +421,7 @@ test_25b() {
        mkdir -p $DIR/$tdir
        # put a load of file creates/writes/deletes
        do_facet client "writemany -q -a $DIR/$tdir/$tfile 300 5" &
-        CLIENT_PID=$!
+       CLIENT_PID=$!
        echo writemany pid $CLIENT_PID
        sleep 1
        FAILURE_MODE="SOFT"
@@ -435,7 +436,7 @@ test_25b() {
        sleep 20
        facet_failover mds
        # client process should see no problems even though MDS went down
-        # and recovery was interrupted
+       # and recovery was interrupted
        wait $CLIENT_PID 
        rc=$?
        echo writemany returned $rc
@@ -445,7 +446,7 @@ run_test 25b "failover MDS during recovery"
 
 test_25c_guts() {
        do_facet client "writemany -q $DIR/$tdir/$tfile 600 5" &
-        CLIENT_PID=$!
+       CLIENT_PID=$!
        echo writemany pid $CLIENT_PID
        sleep 10
        FAILURE_MODE="SOFT"
index 4920a19..0817fbc 100755 (executable)
@@ -23,7 +23,7 @@ gen_config() {
     add_lov lov1 mds --stripe_sz $STRIPE_BYTES \
    --stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0
     add_ost ost --lov lov1 --dev $OSTDEV --size $OSTSIZE --failover
-    add_ost ost2 --lov lov1 --dev ${OSTDEV}-2 --size $OSTSIZE  --failover
+    add_ost ost2 --lov lov1 --dev ${OSTDEV}-2 --size $OSTSIZE --failover
     add_client client mds --lov lov1 --path $MOUNT
 }
 
index 7ec18ae..7b72020 100644 (file)
@@ -2,7 +2,7 @@
 
 export PATH=`dirname $0`/../utils:$PATH
 
-config=${1:-uml.xml}
+config=${1:-`basename $0 .sh`.xml}
 LMC=${LMC:-lmc}
 TMP=${TMP:-/tmp}