if [ "$REFORMAT" != "yes" ]; then
skip_env "$0 reformats all devices,\
please set REFORMAT to run this test"
- exit 0
fi
# Variable to run mdsrate
test_1 () {
[ $(facet_fstype $SINGLEMDS) != ldiskfs ] &&
- skip "ldiskfs only test" && return
+ skip_env "ldiskfs only test"
local dev
for num in $(seq $OSTCOUNT); do
dev=$(ostdevname $num)
run_test 2 "run llverfs on OST ldiskfs/zfs filesystem"
test_3 () {
- [ -z "$CLIENTS" ] && skip_env "CLIENTS not defined, skipping" && return
- [ -z "$MPIRUN" ] && skip_env "MIPRUN not defined, skipping" && return
- [ -z "$MDSRATE" ] && skip_env "MDSRATE not defined, skipping" && return
- [ ! -x $MDSRATE ] && skip_env "$MDSRATE not built, skipping" && return
+ [ -z "$CLIENTS" ] && skip_env "CLIENTS not defined, skipping"
+ [ -z "$MPIRUN" ] && skip_env "MIPRUN not defined, skipping"
+ [ -z "$MDSRATE" ] && skip_env "MDSRATE not defined, skipping"
+ [ ! -x $MDSRATE ] && skip_env "$MDSRATE not built, skipping"
# Setup the Lustre filesystem.
log "setup the lustre filesystem"
REFORMAT="yes" check_and_setup_lustre
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
init_logging
-remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0
+remote_mds_nodsh && skip "remote MDS with nodsh"
-[ -z "$CLIENTS" ] && skip_env "$TESTSUITE: Need two or more clients" && exit 0
+[ -z "$CLIENTS" ] && skip_env "$TESTSUITE: Need two or more clients"
[ $CLIENTCOUNT -lt 2 ] &&
- skip_env "$TESTSUITE: Need 2+ clients, have only $CLIENTCOUNT" && exit 0
+ skip_env "$TESTSUITE: Need 2+ clients, have only $CLIENTCOUNT"
-#
[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
MOUNT_2=""
require_dsh_ost || exit 0
[ "$SLOW" = "no" ] &&
- skip "skip lfsck performance test under non-SLOW mode" && exit 0
+ skip "skip lfsck performance test under non-SLOW mode"
NTHREADS=${NTHREADS:-0}
UNIT=${UNIT:-8192}
test_1() {
[ $(facet_fstype $SINGLEMDS) != ldiskfs ] &&
- skip "not implemented for ZFS" && return
+ skip_env "not implemented for ZFS"
local BCOUNT=0
local i
run_test 7c "namespace LFSCK performance (repairing bad FID-in-dirent) for DNE"
test_8() {
- [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
+ [ $MDSCOUNT -lt 2 ] && skip_env "needs >= 2 MDTs"
[ $INCFACTOR -gt 25 ] && INCFACTOR=25
#
ALWAYS_EXCEPT="$ALWAYS_EXCEPT $LNET_SELFTEST_EXCEPT"
-[ x$LST = x ] && { skip_env "lst not found LST=$LST" && exit 0; }
+[ x$LST = x ] && skip_env "lst not found LST=$LST"
# FIXME: what is the reasonable value here?
lst_LOOP=${lst_LOOP:-100000}
# Test 4 - Replicate files created by iozone
test_4() {
- which iozone > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- skip "iozone not found. Skipping test"
- return
- fi
+ which iozone > /dev/null 2>&1
+ [ $? -ne 0 ] && skip "iozone not found"
- init_src
- init_changelog
+ init_src
+ init_changelog
- END_RUN_FILE=${DIR}/$tdir/run LOAD_PID_FILE=${DIR}/$tdir/pid \
- MOUNT=${DIR}/$tdir run_iozone.sh &
- sleep 30
- child_pid=$(pgrep iozone)
+ END_RUN_FILE=${DIR}/$tdir/run LOAD_PID_FILE=${DIR}/$tdir/pid \
+ MOUNT=${DIR}/$tdir run_iozone.sh &
+ sleep 30
+ child_pid=$(pgrep iozone)
stop_procs $child_pid
local LRSYNC_LOG=$(generate_logname "lrsync_log")
ALWAYS_EXCEPT="$MDS_SURVEY_EXCEPT"
MDSSURVEY=${MDSSURVEY:-$(which mds-survey 2>/dev/null || true)}
-if [ -z ${MDSSURVEY} ]; then
- skip_env "mds-survey not found" && exit
-fi
+[ -z ${MDSSURVEY} ] && skip_env "mds-survey not found"
if [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.3.51) ]; then
- skip_env "Need MDS version at least 2.3.51" && exit
+ skip_env "Need MDS version at least 2.3.51"
fi
build_test_filter
test_2() {
local mdscount=$(get_node_count "$(mdts_nodes)")
- if [ $mdscount -gt 1 ]; then
- skip_env "Only run this test on single MDS" && return
- fi
+ [ $mdscount -gt 1 ] && skip_env "Only run this test on single MDS"
+ [ $ost_count -eq 0 ] && skip_env "Need to mount OST to test"
- if [ $ost_count -eq 0 ]; then
- skip_env "Need to mount OST to test" && return
- fi
mds_survey_run "mdd" "1"
}
run_test 2 "Metadata survey with stripe_count = 1"
machine_file=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
numloops=1000
- if [ ! -f "$WRITE_DISJOINT" ]; then
- skip_env "$0 : write_disjoint not found "
- return
- fi
+ [ ! -f "$WRITE_DISJOINT" ] && skip_env "write_disjoint not found"
set $TRACE
generate_machine_file $NODES_TO_USE $machine_file