Whamcloud - gitweb
LU-1538 tests: use $TESTSUITE instead of $0
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 5 Oct 2012 03:49:17 +0000 (21:49 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 15 Oct 2012 16:28:21 +0000 (12:28 -0400)
Use "$TESTSUITE" instead of "$0" in test script messages, since $0 is
a full pathname and clutters up the test logs.  Instead, $TESTSUITE is
only the test suite name, and is more compact.  Use it in all output.

This makes the output from complete() redundant, in that it prints
$TESTSUITE both as an argument and internally via the equals_msg()
function (via banner()), so remove the $TESTSUITE argument from all
callers of complete().

The equals_msg() function was only a thin wrapper around banner(), and
was only used by complete(), remove it and call banner() directly.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I6b3f256000317a17fdd2a361a38d4dfdda500c1e
Reviewed-on: http://review.whamcloud.com/4192
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
44 files changed:
lustre/tests/conf-sanity.sh
lustre/tests/insanity.sh
lustre/tests/large-scale.sh
lustre/tests/lfsck.sh
lustre/tests/liblustre.sh
lustre/tests/llog-test.sh
lustre/tests/lnet-selftest.sh
lustre/tests/lustre-rsync-test.sh
lustre/tests/mds-survey.sh
lustre/tests/mdsrate-create-small.sh
lustre/tests/mdsrate-lookup-10dirs.sh
lustre/tests/mdsrate-lookup-1dir.sh
lustre/tests/mdsrate-stat-large.sh
lustre/tests/mdsrate-stat-small.sh
lustre/tests/metadata-updates.sh
lustre/tests/mmp.sh
lustre/tests/obdfilter-survey.sh
lustre/tests/ost-pools.sh
lustre/tests/parallel-scale-nfs.sh
lustre/tests/parallel-scale.sh
lustre/tests/performance-sanity.sh
lustre/tests/posix.sh
lustre/tests/racer.sh
lustre/tests/recovery-double-scale.sh
lustre/tests/recovery-mds-scale.sh
lustre/tests/recovery-random-scale.sh
lustre/tests/recovery-small.sh
lustre/tests/replay-dual.sh
lustre/tests/replay-ost-single.sh
lustre/tests/replay-single-lmv.sh
lustre/tests/replay-single.sh
lustre/tests/replay-vbr.sh
lustre/tests/runtests
lustre/tests/sanity-benchmark.sh
lustre/tests/sanity-gss.sh
lustre/tests/sanity-quota-old.sh
lustre/tests/sanity-quota.sh
lustre/tests/sanity-scrub.sh
lustre/tests/sanity-sec.sh
lustre/tests/sanity.sh
lustre/tests/sanityn.sh
lustre/tests/scrub-performance.sh
lustre/tests/sgpdd-survey.sh
lustre/tests/test-framework.sh

index c5fc54b..49d0aa1 100644 (file)
@@ -3231,5 +3231,5 @@ fi
 
 cleanup_gss
 
 
 cleanup_gss
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 exit_status
 exit_status
index c294320..74ca4a2 100755 (executable)
@@ -17,11 +17,11 @@ init_logging
 ALWAYS_EXCEPT="10  $INSANITY_EXCEPT"
 
 if [ "$FAILURE_MODE" = "HARD" ]; then
 ALWAYS_EXCEPT="10  $INSANITY_EXCEPT"
 
 if [ "$FAILURE_MODE" = "HARD" ]; then
-        skip_env "$0: is not functional with FAILURE_MODE = HARD, please use recovery-double-scale, bz20407"
-        exit 0
+       skip_env "$TESTSUITE: is not functional with FAILURE_MODE = HARD, " \
+               "please use recovery-double-scale, bz20407"
+       exit 0
 fi
 
 fi
 
-#
 [ "$SLOW" = "no" ] && EXCEPT_SLOW=""
 
 SETUP=${SETUP:-""}
 [ "$SLOW" = "no" ] && EXCEPT_SLOW=""
 
 SETUP=${SETUP:-""}
@@ -44,7 +44,7 @@ require_dsh_ost || exit 0
 FAIL_CLIENTS=$(echo " $FAIL_CLIENTS " | sed -re "s/\s+$LIVE_CLIENT\s+/ /g")
 
 DIR=${DIR:-$MOUNT}
 FAIL_CLIENTS=$(echo " $FAIL_CLIENTS " | sed -re "s/\s+$LIVE_CLIENT\s+/ /g")
 
 DIR=${DIR:-$MOUNT}
-TESTDIR=$DIR/d0.$(basename $0 .sh)
+TESTDIR=$DIR/d0.$TESTSUITE
 
 #####
 # fail clients round robin
 
 #####
 # fail clients round robin
@@ -567,6 +567,6 @@ test_10() {
 }
 run_test 10 "Running Availability for 6 hours..."
 
 }
 run_test 10 "Running Availability for 6 hours..."
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 6792612..8da9783 100644 (file)
@@ -21,9 +21,9 @@ init_logging
 
 remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0
 
 
 remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0
 
-[ -n "$CLIENTS" ] || { skip_env "$0: Need two or more clients" && exit 0; }
-[ $CLIENTCOUNT -ge 2 ] || \
-    { skip_env "$0: Need two or more remote clients, have $CLIENTCOUNT" && exit 0; }
+[ -z "$CLIENTS" ] && skip_env "$TESTSUITE: Need two or more clients" && exit 0
+[ $CLIENTCOUNT -lt 2 ] &&
+       skip_env "$TESTSUITE: Need 2+ clients, have only $CLIENTCOUNT" && exit 0
 
 #
 [ "$SLOW" = "no" ] && EXCEPT_SLOW=""
 
 #
 [ "$SLOW" = "no" ] && EXCEPT_SLOW=""
@@ -49,7 +49,7 @@ test_3a() {
     # a half of clients by default
     increment=${INCREMENT:-$(( CLIENTCOUNT / 2 ))}
 
     # a half of clients by default
     increment=${INCREMENT:-$(( CLIENTCOUNT / 2 ))}
 
-    machinefile=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
+    machinefile=${MACHINEFILE:-$TMP/$TESTSUITE.machines}
     local LOG=$TMP/${TESTSUITE}_$tfile
 
     local var=${SINGLEMDS}_svc
     local LOG=$TMP/${TESTSUITE}_$tfile
 
     local var=${SINGLEMDS}_svc
@@ -119,6 +119,6 @@ test_3a() {
 
 run_test 3a "recovery time, $CLIENTCOUNT clients"
 
 
 run_test 3a "recovery time, $CLIENTCOUNT clients"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 1c805a1..d8b95cf 100644 (file)
@@ -38,7 +38,7 @@ check_and_setup_lustre
 
 assert_DIR
 
 
 assert_DIR
 
-SAMPLE_FILE=$TMP/$(basename $0 .sh).junk
+SAMPLE_FILE=$TMP/$TESTSUITE.junk
 dd if=/dev/urandom of=$SAMPLE_FILE bs=1M count=1
 
 # Create some dirs and files on the filesystem.
 dd if=/dev/urandom of=$SAMPLE_FILE bs=1M count=1
 
 # Create some dirs and files on the filesystem.
@@ -286,6 +286,6 @@ else
     fi
 fi
 
     fi
 fi
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index cb0c7b3..0309b33 100644 (file)
@@ -41,6 +41,6 @@ test_1() {
 }
 run_test 1 "liblustre sanity"
 
 }
 run_test 1 "liblustre sanity"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 16d0ecd..f26bfc9 100644 (file)
@@ -101,6 +101,5 @@ test_3() {
 }
 run_test 3 "Remove testset"
 
 }
 run_test 3 "Remove testset"
 
-equals_msg test complete, cleaning up
+complete $SECONDS
 FORCE=--force $CLEANUP
 FORCE=--force $CLEANUP
-echo "$0: completed"
index f42ed4f..58e73f4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*-
 # vim:shiftwidth=4:softtabstop=4:tabstop=4:
 
 # -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*-
 # vim:shiftwidth=4:softtabstop=4:tabstop=4:
 
@@ -11,7 +11,7 @@ init_logging
 #
 ALWAYS_EXCEPT="$ALWAYS_EXCEPT $LNET_SELFTEST_EXCEPT"
 
 #
 ALWAYS_EXCEPT="$ALWAYS_EXCEPT $LNET_SELFTEST_EXCEPT"
 
-[ x$LST = x ] &&  { skip_env "$0 : lst not found LST=$LST" && exit 0; }
+[ x$LST = x ] && { skip_env "lst not found LST=$LST" && exit 0; }
 
 # FIXME: what is the reasonable value here?
 lst_LOOP=${lst_LOOP:-100000}
 
 # FIXME: what is the reasonable value here?
 lst_LOOP=${lst_LOOP:-100000}
@@ -157,7 +157,7 @@ test_smoke () {
 }
 run_test smoke "lst regression test"
 
 }
 run_test smoke "lst regression test"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 if [ "$RESTORE_MOUNT" = yes ]; then
     setupall
 fi 
 if [ "$RESTORE_MOUNT" = yes ]; then
     setupall
 fi 
index 49918ae..9e0da83 100644 (file)
@@ -627,6 +627,6 @@ test_9() {
 run_test 9 "Replicate recursive directory removal"
 
 cd $ORIG_PWD
 run_test 9 "Replicate recursive directory removal"
 
 cd $ORIG_PWD
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 3efaf9b..a7a192a 100644 (file)
@@ -109,7 +109,7 @@ run_test 2 "Metadata survey with stripe_count = 1"
 # remount the clients
 restore_mount $MOUNT
 
 # remount the clients
 restore_mount $MOUNT
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 cleanup_echo_devs
 check_and_cleanup_lustre
 exit_status
 cleanup_echo_devs
 check_and_cleanup_lustre
 exit_status
index 575166d..8cad213 100644 (file)
@@ -138,7 +138,7 @@ else
     fi
 fi
 
     fi
 fi
 
-equals_msg `basename $0`: test complete, cleaning up
+complete $SECONDS
 rmdir $BASEDIR || true
 rm -f $MACHINEFILE 
 check_and_cleanup_lustre
 rmdir $BASEDIR || true
 rm -f $MACHINEFILE 
 check_and_cleanup_lustre
index 946d587..22ad632 100644 (file)
@@ -109,10 +109,11 @@ else
     fi
 fi
 
     fi
 fi
 
-equals_msg `basename $0`: test complete, cleaning up
+complete $SECONDS
 # FIXME: does it make sense to add the possibility to unlink dirfmt to mdsrate?
 for i in $(seq 0 $NUM_DIRS); do
 # FIXME: does it make sense to add the possibility to unlink dirfmt to mdsrate?
 for i in $(seq 0 $NUM_DIRS); do
-    mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $BASEDIR/lookup-$i 'f%%d' --ignore
+       mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES \
+               $BASEDIR/lookup-$i 'f%%d' --ignore
 done
 
 rmdir $BASEDIR || true
 done
 
 rmdir $BASEDIR || true
index 0a8ede4..29ea5f3 100644 (file)
@@ -102,7 +102,7 @@ else
     fi
 fi
 
     fi
 fi
 
-equals_msg `basename $0`: test complete, cleaning up
+complete $SECONDS
 mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d'
 rmdir $BASEDIR || true
 rm -f $MACHINEFILE
 mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d'
 rmdir $BASEDIR || true
 rm -f $MACHINEFILE
index 6d269dc..9fd2c08 100644 (file)
@@ -107,7 +107,8 @@ else
     fi
 fi
 
     fi
 fi
 
-equals_msg `basename $0`: test complete, cleaning up
+
+complete $SECONDS
 mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d'
 rmdir $BASEDIR || true
 rm -f $MACHINEFILE
 mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d'
 rmdir $BASEDIR || true
 rm -f $MACHINEFILE
index efad812..f7b84c1 100644 (file)
@@ -107,7 +107,7 @@ else
     fi
 fi
 
     fi
 fi
 
-equals_msg `basename $0`: test complete, cleaning up
+complete $SECONDS
 mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d'
 rmdir $BASEDIR || true
 rm -f $MACHINEFILE
 mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d'
 rmdir $BASEDIR || true
 rm -f $MACHINEFILE
index 0228c2b..66d9d8e 100755 (executable)
@@ -260,7 +260,7 @@ else
     skip_env "$0 : write_disjoint not found "
 fi
 
     skip_env "$0 : write_disjoint not found "
 fi
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 rm -rf $TESTDIR
 rm -f $MACHINEFILE
 check_and_cleanup_lustre
 rm -rf $TESTDIR
 rm -f $MACHINEFILE
 check_and_cleanup_lustre
index 1da9830..5da2d08 100755 (executable)
@@ -667,6 +667,6 @@ run_test 10 "e2fsck with mounted filesystem"
 mmp_fini
 FAIL_ON_ERROR=$SAVED_FAIL_ON_ERROR
 
 mmp_fini
 FAIL_ON_ERROR=$SAVED_FAIL_ON_ERROR
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 $MMP_RESTORE_MOUNT && setupall
 exit_status
 $MMP_RESTORE_MOUNT && setupall
 exit_status
index 37a4d28..d78f7b4 100644 (file)
@@ -210,7 +210,7 @@ test_3a () {
 }
 run_test 3a "Network survey"
 
 }
 run_test 3a "Network survey"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 cleanup_echo_devs
 check_and_cleanup_lustre
 exit_status
 cleanup_echo_devs
 check_and_cleanup_lustre
 exit_status
index c9c3f22..cd59fa1 100644 (file)
@@ -1447,7 +1447,7 @@ run_test 26 "Choose other OSTs in the pool first in the creation remedy"
 
 cd $ORIG_PWD
 
 
 cd $ORIG_PWD
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 cleanup_pools $FSNAME
 check_and_cleanup_lustre
 exit_status
 cleanup_pools $FSNAME
 check_and_cleanup_lustre
 exit_status
index 013670d..2e0bbd2 100755 (executable)
@@ -106,6 +106,6 @@ elif ! zconf_mount_clients $CLIENTS $MOUNT; then
     error_noexit false "failed to mount lustre after nfs test"
 fi
 
     error_noexit false "failed to mount lustre after nfs test"
 fi
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 28c42af..8746655 100644 (file)
@@ -124,6 +124,6 @@ test_statahead () {
 }
 run_test statahead "statahead test, multiple clients"
 
 }
 run_test statahead "statahead test, multiple clients"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index fd13747..0ddcaa8 100644 (file)
@@ -81,7 +81,7 @@ test_8() {
 }
 run_test 8 "getattr large files ======"
 
 }
 run_test 8 "getattr large files ======"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 [ -f "$LOG" ] && cat $LOG || true
 exit_status
 check_and_cleanup_lustre
 [ -f "$LOG" ] && cat $LOG || true
 exit_status
index 3d75e5e..8615a37 100755 (executable)
@@ -113,6 +113,6 @@ test_1() {
 }
 run_test 1 "build, install, run posix on ext4 and lustre, then compare"
 
 }
 run_test 1 "build, install, run posix on ext4 and lustre, then compare"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index edcf900..8d75c2c 100644 (file)
@@ -60,6 +60,6 @@ test_1() {
 }
 run_test 1 "racer on clients: ${CLIENTS:-$(hostname)} DURATION=$DURATION"
 
 }
 run_test 1 "racer on clients: ${CLIENTS:-$(hostname)} DURATION=$DURATION"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 92ebdff..a5ef06f 100644 (file)
@@ -307,6 +307,6 @@ run_test pairwise_fail "pairwise combination of clients, MDS, and OST failures"
 zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed"
 client_up || error "start client on $HOSTNAME failed"
 
 zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed"
 client_up || error "start client on $HOSTNAME failed"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index ba3b5e6..fb6816b 100644 (file)
@@ -247,6 +247,6 @@ run_test failover_ost "failover OST"
 zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed"
 client_up || error "start client on $HOSTNAME failed"
 
 zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed"
 client_up || error "start client on $HOSTNAME failed"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index bc2e70d..e63523e 100644 (file)
@@ -265,6 +265,6 @@ run_test fail_client_mds "fail client, then failover MDS"
 zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed"
 client_up || error "start client on $HOSTNAME failed"
 
 zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed"
 client_up || error "start client on $HOSTNAME failed"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 5a26d02..a1ca789 100755 (executable)
@@ -1536,6 +1536,6 @@ test_106() { # LU-1789
 }
 run_test 106 "lightweight connection support"
 
 }
 run_test 106 "lightweight connection support"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 639cb85..66fc62b 100755 (executable)
@@ -68,7 +68,7 @@ run_test 0a "expired recovery with lost client"
 if [ -f "$LU482_FAILED" ]; then
        log "Found check file $LU482_FAILED, aborting test script"
        rm -vf "$LU482_FAILED"
 if [ -f "$LU482_FAILED" ]; then
        log "Found check file $LU482_FAILED, aborting test script"
        rm -vf "$LU482_FAILED"
-       complete $(basename $0) $SECONDS
+       complete $SECONDS
        do_nodes $CLIENTS umount -f $MOUNT2 || true
        do_nodes $CLIENTS umount -f $MOUNT || true
        # copied from stopall, but avoid the MDS recovery
        do_nodes $CLIENTS umount -f $MOUNT2 || true
        do_nodes $CLIENTS umount -f $MOUNT || true
        # copied from stopall, but avoid the MDS recovery
@@ -576,7 +576,7 @@ run_test 21b "commit on sharing, two clients"
 
 # end commit on sharing tests 
 
 
 # end commit on sharing tests 
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 SLEEP=$((`date +%s` - $NOW))
 [ $SLEEP -lt $TIMEOUT ] && sleep $SLEEP
 [ "$MOUNTED2" = yes ] && zconf_umount $HOSTNAME $MOUNT2 || true
 SLEEP=$((`date +%s` - $NOW))
 [ $SLEEP -lt $TIMEOUT ] && sleep $SLEEP
 [ "$MOUNTED2" = yes ] && zconf_umount $HOSTNAME $MOUNT2 || true
index 8606cbb..a85031a 100755 (executable)
@@ -367,6 +367,6 @@ test_8e() {
 }
 run_test 8e "Verify that ptlrpc resends request on -EINPROGRESS"
 
 }
 run_test 8e "Verify that ptlrpc resends request on -EINPROGRESS"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index d66190d..21dd7ca 100755 (executable)
@@ -113,6 +113,6 @@ test_3b() {
 }
 run_test 3b "mkdir cross-node dir (fail mds with inode)"
 
 }
 run_test 3b "mkdir cross-node dir (fail mds with inode)"
 
-equals_msg test complete, cleaning up
+complete $SECONDS
 $CLEANUP
 
 $CLEANUP
 
index dd5bdd9..94d4dfc 100755 (executable)
@@ -2374,6 +2374,6 @@ test_90() { # bug 19494
 }
 run_test 90 "lfs find identifies the missing striped file segments"
 
 }
 run_test 90 "lfs find identifies the missing striped file segments"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 50e483f..14c9883 100644 (file)
@@ -1153,6 +1153,6 @@ rm -f $cos_param_file
 
 [ "$CLIENTS" ] && zconf_mount_clients $CLIENTS $DIR
 
 
 [ "$CLIENTS" ] && zconf_mount_clients $CLIENTS $DIR
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index f4297ff..f6b3cd2 100755 (executable)
@@ -127,7 +127,7 @@ if [ `expr $NOWUSED - $USED` -gt 1024 ]; then
        echo "Space not all freed: now ${NOWUSED}kB, was ${USED}kB." 1>&2
 fi
 
        echo "Space not all freed: now ${NOWUSED}kB, was ${USED}kB." 1>&2
 fi
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 rm -f $FILES
 check_and_cleanup_lustre
 exit_status
 rm -f $FILES
 check_and_cleanup_lustre
 exit_status
index 65554fc..adac0d9 100644 (file)
@@ -342,6 +342,6 @@ test_pios_fpp() {
 }
 run_test pios_fpp "pios file per process"
 
 }
 run_test pios_fpp "pios file per process"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 60104e5..701c0db 100644 (file)
@@ -795,6 +795,6 @@ test_151() {
 }
 run_test 151 "secure mgs connection: server flavor control"
 
 }
 run_test 151 "secure mgs connection: server flavor control"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 3cfa36d..582eb22 100755 (executable)
@@ -2405,7 +2405,10 @@ quota_fini()
 quota_fini
 
 cd $ORIG_PWD
 quota_fini
 
 cd $ORIG_PWD
-complete sanity-quota.sh $SECONDS
+
+# override TESTSUITE so Maloo keeps only one set of sanity-quota results
+TESTSUITE=sanity-quota.sh
+complete $SECONDS
 check_and_cleanup_lustre
 export QUOTA_AUTO=$QUOTA_AUTO_OLD
 exit_status
 check_and_cleanup_lustre
 export QUOTA_AUTO=$QUOTA_AUTO_OLD
 exit_status
index d77800b..58cd433 100644 (file)
@@ -2033,7 +2033,7 @@ quota_fini()
 quota_fini
 
 cd $ORIG_PWD
 quota_fini
 
 cd $ORIG_PWD
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 export QUOTA_AUTO=$QUOTA_AUTO_OLD
 exit_status
 check_and_cleanup_lustre
 export QUOTA_AUTO=$QUOTA_AUTO_OLD
 exit_status
index cf54e80..a6754e9 100644 (file)
@@ -738,5 +738,5 @@ OSTSIZE=${SAVED_OSTSIZE}
 # cleanup the system at last
 formatall
 
 # cleanup the system at last
 formatall
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 exit_status
 exit_status
index f320e41..70e1114 100644 (file)
@@ -572,5 +572,5 @@ sec_unsetup
 
 sec_cleanup
 
 
 sec_cleanup
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 exit_status
 exit_status
index d38300b..cfe736d 100644 (file)
@@ -12,7 +12,7 @@ ALWAYS_EXCEPT="                27u   42a  42b  42c  42d  45   51d   68b   $SANIT
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
 # with LOD/OSP landing
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
 # with LOD/OSP landing
-# bug number for skipped tests: LU2036
+# bug number for skipped tests: LU-2036
 ALWAYS_EXCEPT="                 76     $ALWAYS_EXCEPT"
 
 
 ALWAYS_EXCEPT="                 76     $ALWAYS_EXCEPT"
 
 
@@ -9886,7 +9886,7 @@ test_900() {
 }
 run_test 900 "umount should not race with any mgc requeue thread"
 
 }
 run_test 900 "umount should not race with any mgc requeue thread"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 if [ "$I_MOUNTED" != "yes" ]; then
        lctl set_param debug="$OLDDEBUG" 2> /dev/null || true
 check_and_cleanup_lustre
 if [ "$I_MOUNTED" != "yes" ]; then
        lctl set_param debug="$OLDDEBUG" 2> /dev/null || true
index d1ad569..8ada48d 100644 (file)
@@ -1981,6 +1981,6 @@ log "cleanup: ======================================================"
 
 [ "$(mount | grep $MOUNT2)" ] && umount $MOUNT2
 
 
 [ "$(mount | grep $MOUNT2)" ] && umount $MOUNT2
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index 277bb91..0c029e7 100644 (file)
@@ -175,5 +175,5 @@ run_test 0 "OI scrub performance test"
 
 # cleanup the system at last
 scrub_cleanup
 
 # cleanup the system at last
 scrub_cleanup
-complete $(basename $0) $SECONDS
+complete $SECONDS
 exit_status
 exit_status
index ac5da4d..cd4ec0e 100644 (file)
@@ -79,5 +79,5 @@ test_2 () {
 }
 run_test 2 "sgpdd-survey, osts, scsidevs"
 
 }
 run_test 2 "sgpdd-survey, osts, scsidevs"
 
-complete $(basename $0) $SECONDS
+complete $SECONDS
 exit_status
 exit_status
index 1bdf5fe..265bbcb 100644 (file)
@@ -1721,15 +1721,16 @@ cleanup_check() {
 
     check_mem_leak || exit 204
 
 
     check_mem_leak || exit 204
 
-    [ "`lctl dl 2> /dev/null | wc -l`" -gt 0 ] && lctl dl && \
-        echo "$0: lustre didn't clean up..." 1>&2 && return 202 || true
-
-    if module_loaded lnet || module_loaded libcfs; then
-        echo "$0: modules still loaded..." 1>&2
-        /sbin/lsmod 1>&2
-        return 203
-    fi
-    return 0
+       [ "`lctl dl 2> /dev/null | wc -l`" -gt 0 ] && lctl dl &&
+               echo "$TESTSUITE: lustre didn't clean up..." 1>&2 &&
+               return 202 || true
+
+       if module_loaded lnet || module_loaded libcfs; then
+               echo "$TESTSUITE: modules still loaded..." 1>&2
+               /sbin/lsmod 1>&2
+               return 203
+       fi
+       return 0
 }
 
 wait_update () {
 }
 
 wait_update () {
@@ -3870,9 +3871,10 @@ error_noexit() {
         gather_logs $(comma_list $(nodes_list))
     fi
 
         gather_logs $(comma_list $(nodes_list))
     fi
 
-    debugrestore
-    [ "$TESTSUITELOG" ] && echo "$0: ${TYPE}: $TESTNAME $@" >> $TESTSUITELOG
-    echo "$@" > $LOGDIR/err
+       debugrestore
+       [ "$TESTSUITELOG" ] &&
+               echo "$TESTSUITE: $TYPE: $TESTNAME $@" >> $TESTSUITELOG
+       echo "$@" > $LOGDIR/err
 }
 
 exit_status () {
 }
 
 exit_status () {
@@ -4032,10 +4034,6 @@ run_test() {
     return $?
 }
 
     return $?
 }
 
-equals_msg() {
-    banner "$*"
-}
-
 log() {
     echo "$*"
     module_loaded lnet || load_modules
 log() {
     echo "$*"
     module_loaded lnet || load_modules
@@ -4062,9 +4060,11 @@ trace() {
 }
 
 complete () {
 }
 
 complete () {
-    equals_msg $1 test complete, duration $2 sec
+    local duration=$1
+
+    banner test complete, duration $duration sec
     [ -f "$TESTSUITELOG" ] && egrep .FAIL $TESTSUITELOG || true
     [ -f "$TESTSUITELOG" ] && egrep .FAIL $TESTSUITELOG || true
-    echo duration $2 >>$TESTSUITELOG
+    echo duration $duration >>$TESTSUITELOG
 }
 
 pass() {
 }
 
 pass() {