#set -vx
set -e
-PATH=`dirname $0`/../utils:$PATH
-
[ -z "$CONFIG" -a "$NAME" ] && CONFIGS=$NAME
[ "$CONFIGS" ] || CONFIGS="local" #"local lov"
[ "$MAX_THREADS" ] || MAX_THREADS=20
[ "$TMP" ] || TMP=/tmp
[ "$COUNT" ] || COUNT=1000
[ "$DEBUG_LVL" ] || DEBUG_LVL=0
-[ "$DEBUG_OFF" ] || DEBUG_OFF="eval sysctl -w lnet.debug=\"$DEBUG_LVL\""
-[ "$DEBUG_ON" ] || DEBUG_ON="eval sysctl -w lnet.debug=0x33f0484"
+[ "$DEBUG_OFF" ] || DEBUG_OFF="eval lctl set_param debug=\"$DEBUG_LVL\""
+[ "$DEBUG_ON" ] || DEBUG_ON="eval lctl set_param debug=0x33f0484"
export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL INSANITY SANITY_QUOTA SANITY_SEC"
done
fi
LFSCK="no" # bug 13698
-LIBLUSTRE="no" #bug 14387
+SANITY_QUOTA="no" # bug 13058
LIBLUSTRETESTS=${LIBLUSTRETESTS:-../liblustre/tests}
STARTTIME=`date +%s`
RANTEST=""
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
. $LUSTRE/tests/test-framework.sh
init_test_env $@
for NAME in $CONFIGS; do
export NAME MOUNT START CLEAN
. $LUSTRE/tests/cfg/$NAME.sh
+
+ if [ ! -f /lib/modules/$(uname -r)/kernel/fs/lustre/mds.ko -a \
+ ! -f `dirname $0`/../mds/mds.ko ]; then
+ export CLIENTMODSONLY=true
+ fi
assert_env mds_HOST MDS_MKFS_OPTS MDSDEV
assert_env ost_HOST OST_MKFS_OPTS OSTCOUNT
$DEBUG_OFF
myUID=$RUNAS_ID
myRUNAS=$RUNAS
- FAIL_ON_ERROR=false check_runas_id $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
+ FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
chown $myUID:$myUID $DBENCHDIR
duration=""
[ "$SLOW" = "no" ] && duration=" -t 120"
$DEBUG_OFF
myUID=$RUNAS_ID
myRUNAS=$RUNAS
- FAIL_ON_ERROR=false check_runas_id $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
+ FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
chown $myUID:$myUID $BONDIR
$myRUNAS bonnie++ -f -r 0 -s$((SIZE / 1024)) -n 10 -u$myUID:$myUID -d$BONDIR
$DEBUG_ON
$DEBUG_OFF
myUID=$RUNAS_ID
myRUNAS=$RUNAS
- FAIL_ON_ERROR=false check_runas_id $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
+ FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
chown $myUID:$myUID $IOZDIR
$myRUNAS iozone $IOZONE_OPTS -f $IOZFILE
$DEBUG_ON
SANITYN="done"
fi
+ remote_mds && log "Remote MDS, skipping LFSCK test" && LFSCK=no
+ remote_ost && log "Remote OST, skipping LFSCK test" && LFSCK=no
+
if [ "$LFSCK" != "no" -a -x /usr/sbin/lfsck ]; then
title lfsck
E2VER=`e2fsck -V 2>&1 | head -n 1 | cut -d' ' -f 2`
- if grep -q obdfilter /proc/fs/lustre/devices; then
- if [ `echo $E2VER | cut -d. -f2` -ge 39 ] && \
- [ "`echo $E2VER | grep cfs`" ]; then
- bash lfscktest.sh
- else
- e2fsck -V
- echo "e2fsck does not support lfsck, skipping"
- fi
+ if [ `echo $E2VER | cut -d. -f2` -ge 39 ] && \
+ [ "`echo $E2VER | grep cfs`" -o \
+ "`echo $E2VER | grep sun`" ]; then
+ bash lfscktest.sh
else
- echo "remote OST, skipping test"
+ e2fsck -V
+ echo "e2fsck does not support lfsck, skipping"
fi
LFSCK="done"
fi
+ [ "$NETTYPE" = "tcp" -o "$NETTYPE" = "ptl" ] || LIBLUSTRE=no # bug 15660
if [ "$LIBLUSTRE" != "no" ]; then
title liblustre
assert_env MGSNID MOUNT2
[ -f /etc/modprobe.d/Lustre ] && MODPROBECONF=/etc/modprobe.d/Lustre
LNETOPTS="$(awk '/^options lnet/ { print $0}' $MODPROBECONF | \
- sed 's/^options lnet //g') accept=all" \
+ sed 's/^options lnet //g; s/"//g') accept=all" \
MDS_MOUNT_OPTS=$(echo $MDS_MOUNT_OPTS | sed 's/^[ \t]*//;s/[ \t]*$//') \
MDS_MOUNT_OPTS="${MDS_MOUNT_OPTS},noacl" \
MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS/#,/-o } \
if [ "$SANITY_SEC" != "no" ]; then
title sanity-sec
bash sanity-sec.sh
+ SANITY_SEC="done"
fi
RC=$?