diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index f81a27e0568e767649724c66b12f68eef29ed77d..7bd1efbfe53e708ff2c30523cb94230e2c9ab9df 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -1,4 +1,3 @@ - #!/bin/bash set -e @@ -20,7 +19,7 @@ SETUP=${SETUP:-"setup"} CLEANUP=${CLEANUP:-"cleanup"} setup() { - formatall + [ "$REFORMAT" ] && formatall setupall } @@ -202,7 +201,7 @@ test_16() { cancel_lru_locks osc # OST bulk will time out here, client resends do_facet client "cmp /etc/termcap $MOUNT/termcap" || return 1 - sysctl -w lustre.fail_loc=0 + do_facet ost1 sysctl -w lustre.fail_loc=0 # give recovery a chance to finish (shouldn't take long) sleep $TIMEOUT do_facet client "cmp /etc/termcap $MOUNT/termcap" || return 2 @@ -213,13 +212,13 @@ run_test 16 "timeout bulk put, don't evict client (2732)" test_17() { # OBD_FAIL_PTLRPC_BULK_GET_NET 0x0503 | OBD_FAIL_ONCE # OST bulk will time out here, client retries - sysctl -w lustre.fail_loc=0x80000503 + do_facet ost1 sysctl -w lustre.fail_loc=0x80000503 # 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 ost1 sysctl -w lustre.fail_loc=0 do_facet client "df $DIR" # expect cmp to succeed, client resent bulk do_facet client "cmp /etc/termcap $DIR/$tfile" || return 3 diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index 820a97b584e1929d31ff00d70b8c9b842c7ae05c..7d3ffc6341ef838449c5d764f638fe1d13fee106 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -30,7 +30,7 @@ fi setup() { cleanup - formatall + [ "$REFORMAT" ] && formatall setupall mount_client $MOUNT2 } diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 9f7e560db42320a47413ead571475f149b0239b4..42ae4e99c8d51917b391104ff8895b2e98db38aa 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -26,8 +26,8 @@ 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 - add_ost ost2 --lov lov1 --dev ${OSTDEV}-2 --size $OSTSIZE + add_ost ost --lov lov1 --dev `ostdevname 1` --size $OSTSIZE + add_ost ost2 --lov lov1 --dev `ostdevname 2` --size $OSTSIZE add_client client mds --lov lov1 --path $MOUNT } @@ -43,7 +43,7 @@ if [ "$ONLY" == "cleanup" ]; then fi setup() { - formatall + [ "$REFORMAT" ] && formatall setupall } diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 2deb6d34e3d9405475c837abaa4c6756669899a8..2ff83c689c32a92e93d30bcf7e3b0213d830b3e3 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -6,7 +6,7 @@ set -e #set -x -export REFORMAT="" +export REFORMAT=${REFORMAT:-""} export VERBOSE=false export GMNALNID=${GMNALNID:-/usr/sbin/gmlndnid} export CATASTROPHE=${CATASTROPHE:-/proc/sys/lnet/catastrophe} @@ -456,6 +456,18 @@ h2gm () { fi } +h2ptl() { + if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else + ID=`xtprocadmin -n $1 2>/dev/null | egrep -v 'NID' | awk '{print $1}'` + if [ -z "$ID" ]; then + echo "Could not get a ptl id for $1..." + exit 1 + fi + echo $ID"@ptl" + fi +} +declare -fx h2ptl + h2tcp() { if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else echo $1"@tcp" @@ -633,6 +645,8 @@ setupall() { load_modules if [ -z "$CLIENTONLY" ]; then echo Setup mdt, osts + echo $REFORMAT | grep -q "reformat" \ + || do_facet mds "$TUNEFS --writeconf $MDSDEV" start mds $MDSDEV $MDS_MOUNT_OPTS for num in `seq $OSTCOUNT`; do DEVNAME=`ostdevname $num`