From 4655373be68a66a5011aa257bb871e649956a0b5 Mon Sep 17 00:00:00 2001 From: grev <grev> Date: Fri, 2 Nov 2007 00:29:40 +0000 Subject: [PATCH] b=13798 i=Adilger Use TESTSUITE in tdir b=12599 i=Nathan lost fix --- lustre/tests/recovery-small.sh | 2 ++ lustre/tests/replay-dual.sh | 2 ++ lustre/tests/replay-ost-single.sh | 14 ++++---------- lustre/tests/replay-single.sh | 3 +++ lustre/tests/test-framework.sh | 6 ++++-- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index cdd2a9a747..9b383e341e 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -19,6 +19,8 @@ SETUP=${SETUP:-""} CLEANUP=${CLEANUP:-""} 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_1() { drop_request "mcreate $MOUNT/1" || return 1 diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index c0a3cc9e02..8e1bf12a02 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -21,6 +21,8 @@ init_test_env $@ build_test_filter cleanup_and_setup_lustre +rm -rf $DIR/${TESTSUITE}/[df][0-9]* # bug 13798 new t-f tdir staff +rm -rf $DIR/[df][0-9]* [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh index b20e215738..4d93382918 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 $@ @@ -27,18 +28,11 @@ gen_config() { formatall } -cleanup() { - cleanupall -} - -if [ "$ONLY" == "cleanup" ]; then - cleanup - exit -fi - build_test_filter -SETUP=${SETUP:-"setup"} +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() { # needs to run during initial client->OST connection diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 2e378d3224..7b3b59d21d 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -26,6 +26,9 @@ cleanup_and_setup_lustre mkdir -p $DIR +rm -rf $DIR/${TESTSUITE}/[df][0-9]* # bug 13798 new t-f tdir staff +rm -rf $DIR/[df][0-9]* + test_0() { replay_barrier mds fail mds diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index aa12d5c6f7..9a6577ce31 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -759,7 +759,7 @@ cleanup_and_setup_lustre() { check_and_cleanup_lustre() { if [ "`mount | grep $MOUNT`" ]; then - rm -rf $DIR/[Rdfs][0-9]* + rm -f $DIR/${TESTSUITE}/[Rdfs][0-9]* fi if [ "$I_MOUNTED" = "yes" ]; then cleanupall -f || error "cleanup failed" @@ -1041,7 +1041,8 @@ run_one() { testnum=$1 message=$2 tfile=f${testnum} - export tdir=d${base} + export tdir=d${TESTSUITE}/d${base} + mkdir -p $DIR/$tdir BEFORE=`date +%s` log "== test $testnum: $message ============ `date +%H:%M:%S` ($BEFORE)" @@ -1053,6 +1054,7 @@ run_one() { [ -f $CATASTROPHE ] && [ `cat $CATASTROPHE` -ne 0 ] && \ error "LBUG/LASSERT detected" pass "($((`date +%s` - $BEFORE))s)" + rmdir ${DIR}/$tdir >/dev/null 2>&1 || true unset TESTNAME unset tdir cd $SAVE_PWD -- GitLab