X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Freplay-ost-single.sh;h=f0da27e437349ab2dae4e340df7b7cd4cd9c16ec;hb=742597c1aa7f4f0a021866fedf446d174f53e500;hp=fe232a40028091b5e7c4d2a80378a81e44f34a4f;hpb=6fcafc03046e2c8aad4873485080e9d9d26049ea;p=fs%2Flustre-release.git diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh index fe232a4..f0da27e 100755 --- a/lustre/tests/replay-ost-single.sh +++ b/lustre/tests/replay-ost-single.sh @@ -4,6 +4,7 @@ set -e PTLDEBUG=${PTLDEBUG:--1} LUSTRE=${LUSTRE:-`dirname $0`/..} +SETUP=${SETUP:-""} CLEANUP=${CLEANUP:-""} . $LUSTRE/tests/test-framework.sh init_test_env $@ @@ -20,54 +21,26 @@ CPU=`awk '/model/ {print $4}' /proc/cpuinfo` # BUG NUMBER: ALWAYS_EXCEPT="$REPLAY_OST_SINGLE_EXCEPT" +# +[ "$SLOW" = "no" ] && EXCEPT_SLOW="" + # It is replay-ost-single, after all OSTCOUNT=1 -gen_config() { - formatall -} - -cleanup() { - cleanupall -} - -if [ "$ONLY" == "cleanup" ]; then - cleanup - exit -fi - build_test_filter -SETUP=${SETUP:-"setup"} +REFORMAT=--reformat cleanup_and_setup_lustre +rm -rf $DIR/${TESTSUITE}/[df][0-9]* # bug 13798 new t-f tdir staff +rm -rf $DIR/[df][0-9]* test_0a() { + zconf_umount `hostname` $MOUNT -f # needs to run during initial client->OST connection #define OBD_FAIL_OST_ALL_REPLY_NET 0x211 do_facet ost "sysctl -w lustre.fail_loc=0x80000211" zconf_mount `hostname` $MOUNT && df $MOUNT || error "0a mount fail" } - -setup() { - gen_config - start mds1 `mdsdevname 1` $MDS_MOUNT_OPTS - start ost1 `ostdevname 1` $OST_MOUNT_OPTS - [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE - - # this might not mount if we aren't running test 0a - [ -z "`grep " $MOUNT " /proc/mounts`" ] && \ - run_test 0a "target handle mismatch (bug 5317) `date +%H:%M:%S`" - - if [ -z "`grep " $MOUNT " /proc/mounts`" ]; then - zconf_mount `hostname` $MOUNT || error "mount fail" - fi - sleep 5 - - do_facet ost1 "sysctl -w lustre.fail_loc=0" -} - -mkdir -p $DIR - -$SETUP +run_test 0a "target handle mismatch (bug 5317) `date +%H:%M:%S`" test_0b() { fail ost1