ONLY=${ONLY:-"$*"}
-# bug number for skipped test:
-ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"$MMP_EXCEPT"}
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-
-SRCDIR=$(cd $(dirname $0); echo $PWD)
-export PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH:/sbin
-
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
init_logging
+# bug number for skipped test:
+ALWAYS_EXCEPT=$MMP_EXCEPT
+# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
+
+build_test_filter
+
remote_mds_nodsh && skip "remote MDS with nodsh"
remote_ost_nodsh && skip "remote OST with nodsh"
SAVED_FAIL_ON_ERROR=$FAIL_ON_ERROR
FAIL_ON_ERROR=false
-build_test_filter
-
# Get the failover facet.
get_failover_facet() {
local facet=$1
# Run e2fsck on the Lustre server target.
run_e2fsck() {
local facet=$1
- shift
- local device=$1
- shift
+ local device=$2
+ shift 2
local opts="$@"
+ # turn on pfsck if it is supported
+ do_facet $facet $E2FSCK -h 2>&1 | grep -qw -- -m && opts+=" -m8"
echo "Running e2fsck on the device $device on $facet..."
do_facet $facet "$E2FSCK $opts $device"
return ${PIPESTATUS[0]}