. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
init_logging
-if ! [ "$REFORMAT" ]; then
+if [ "$REFORMAT" != "yes" ]; then
skip_env "$0 reformats all devices,\
please set REFORMAT to run this test"
exit 0
[ "$SLOW" = no ] && { crghi=2; thrhi=2; }
-if ! ([ "$SGPDD_YES" ] && [ "$REFORMAT" ]); then
- skip_env "$0 reformats all devices, please set SGPDD_YES and REFORMAT to run this test"
- exit 0
+if [ "$SGPDD_YES" != "yes" -o "$REFORMAT" != "yes" ]; then
+ skip_env "$0 reformats all devices, set SGPDD_YES=yes REFORMAT=yes"
+ exit 0
fi
# Skip these tests
export SHUTDOWN_ATTEMPTS=${SHUTDOWN_ATTEMPTS:-3}
export OSD_TRACK_DECLARES_LBUG=${OSD_TRACK_DECLARES_LBUG:-"yes"}
- # command line
-
- while getopts "rvwf:" opt $*; do
- case $opt in
- f) CONFIG=$OPTARG;;
- r) REFORMAT=--reformat;;
- v) VERBOSE=true;;
- w) WRITECONF=writeconf;;
- \?) usage;;
- esac
- done
+ # command line
+
+ while getopts "rvwf:" opt $*; do
+ case $opt in
+ f) CONFIG=$OPTARG;;
+ r) REFORMAT=yes;;
+ v) VERBOSE=true;;
+ w) WRITECONF=writeconf;;
+ \?) usage;;
+ esac
+ done
- shift $((OPTIND - 1))
- ONLY=${ONLY:-$*}
+ shift $((OPTIND - 1))
+ ONLY=${ONLY:-$*}
# print the durations of each test if "true"
DDETAILS=${DDETAILS:-false}
local MOUNTED=$(mounted_lustre_filesystems)
local do_check=true
- # 1.
- # both MOUNT and MOUNT2 are not mounted
- if ! is_mounted $MOUNT && ! is_mounted $MOUNT2; then
- [ "$REFORMAT" ] && formatall
- # setupall mounts both MOUNT and MOUNT2 (if MOUNT_2 is set)
- setupall
- is_mounted $MOUNT || error "NAME=$NAME not mounted"
- export I_MOUNTED=yes
- do_check=false
+ # 1.
+ # both MOUNT and MOUNT2 are not mounted
+ if ! is_mounted $MOUNT && ! is_mounted $MOUNT2; then
+ [ "$REFORMAT" = "yes" ] && formatall
+ # setupall mounts both MOUNT and MOUNT2 (if MOUNT_2 is set)
+ setupall
+ is_mounted $MOUNT || error "NAME=$NAME not mounted"
+ export I_MOUNTED=yes
+ do_check=false
# 2.
# MOUNT2 is mounted
elif is_mounted $MOUNT2; then