cleanup_gss
-complete $(basename $0) $SECONDS
+complete $SECONDS
exit_status
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
-#
[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
SETUP=${SETUP:-""}
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
}
run_test 10 "Running Availability for 6 hours..."
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
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=""
# 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
run_test 3a "recovery time, $CLIENTCOUNT clients"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
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.
fi
fi
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 1 "liblustre sanity"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 3 "Remove testset"
-equals_msg test complete, cleaning up
+complete $SECONDS
FORCE=--force $CLEANUP
-echo "$0: completed"
-#!/bin/sh
+#!/bin/bash
# -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*-
# vim:shiftwidth=4:softtabstop=4:tabstop=4:
#
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}
}
run_test smoke "lst regression test"
-complete $(basename $0) $SECONDS
+complete $SECONDS
if [ "$RESTORE_MOUNT" = yes ]; then
setupall
fi
run_test 9 "Replicate recursive directory removal"
cd $ORIG_PWD
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
# remount the clients
restore_mount $MOUNT
-complete $(basename $0) $SECONDS
+complete $SECONDS
cleanup_echo_devs
check_and_cleanup_lustre
exit_status
fi
fi
-equals_msg `basename $0`: test complete, cleaning up
+complete $SECONDS
rmdir $BASEDIR || true
rm -f $MACHINEFILE
check_and_cleanup_lustre
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
- 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
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
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
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
skip_env "$0 : write_disjoint not found "
fi
-complete $(basename $0) $SECONDS
+complete $SECONDS
rm -rf $TESTDIR
rm -f $MACHINEFILE
check_and_cleanup_lustre
mmp_fini
FAIL_ON_ERROR=$SAVED_FAIL_ON_ERROR
-complete $(basename $0) $SECONDS
+complete $SECONDS
$MMP_RESTORE_MOUNT && setupall
exit_status
}
run_test 3a "Network survey"
-complete $(basename $0) $SECONDS
+complete $SECONDS
cleanup_echo_devs
check_and_cleanup_lustre
exit_status
cd $ORIG_PWD
-complete $(basename $0) $SECONDS
+complete $SECONDS
cleanup_pools $FSNAME
check_and_cleanup_lustre
exit_status
error_noexit false "failed to mount lustre after nfs test"
fi
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test statahead "statahead test, multiple clients"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 8 "getattr large files ======"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
[ -f "$LOG" ] && cat $LOG || true
exit_status
}
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
}
run_test 1 "racer on clients: ${CLIENTS:-$(hostname)} DURATION=$DURATION"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
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
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
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
}
run_test 106 "lightweight connection support"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
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
# 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
}
run_test 8e "Verify that ptlrpc resends request on -EINPROGRESS"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 3b "mkdir cross-node dir (fail mds with inode)"
-equals_msg test complete, cleaning up
+complete $SECONDS
$CLEANUP
}
run_test 90 "lfs find identifies the missing striped file segments"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
[ "$CLIENTS" ] && zconf_mount_clients $CLIENTS $DIR
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
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
}
run_test pios_fpp "pios file per process"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 151 "secure mgs connection: server flavor control"
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
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
quota_fini
cd $ORIG_PWD
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
export QUOTA_AUTO=$QUOTA_AUTO_OLD
exit_status
# cleanup the system at last
formatall
-complete $(basename $0) $SECONDS
+complete $SECONDS
exit_status
sec_cleanup
-complete $(basename $0) $SECONDS
+complete $SECONDS
exit_status
# 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"
}
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
[ "$(mount | grep $MOUNT2)" ] && umount $MOUNT2
-complete $(basename $0) $SECONDS
+complete $SECONDS
check_and_cleanup_lustre
exit_status
# cleanup the system at last
scrub_cleanup
-complete $(basename $0) $SECONDS
+complete $SECONDS
exit_status
}
run_test 2 "sgpdd-survey, osts, scsidevs"
-complete $(basename $0) $SECONDS
+complete $SECONDS
exit_status
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 () {
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 () {
return $?
}
-equals_msg() {
- banner "$*"
-}
-
log() {
echo "$*"
module_loaded lnet || load_modules
}
complete () {
- equals_msg $1 test complete, duration $2 sec
+ local duration=$1
+
+ banner test complete, duration $duration sec
[ -f "$TESTSUITELOG" ] && egrep .FAIL $TESTSUITELOG || true
- echo duration $2 >>$TESTSUITELOG
+ echo duration $duration >>$TESTSUITELOG
}
pass() {