[ "$DEBUG_OFF" ] || DEBUG_OFF="eval sysctl -w lnet.debug=\"$DEBUG_LVL\""
[ "$DEBUG_ON" ] || DEBUG_ON="eval sysctl -w lnet.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"
+
+if [ "$ACC_SM_ONLY" ]; then
+ for O in $TESTSUITE_LIST; do
+ export ${O}="no"
+ done
+ for O in $ACC_SM_ONLY; do
+ O=`echo $O | tr "[:lower:]" "[:upper:]"`
+ export ${O}="yes"
+ done
+fi
+LFSCK="no" # bug 13698
-LIBLUSTRE=${LIBLUSTRE:-../liblustre}
-LIBLUSTRETESTS=${LIBLUSTRETESTS:-$LIBLUSTRE/tests}
+LIBLUSTRETESTS=${LIBLUSTRETESTS:-../liblustre/tests}
STARTTIME=`date +%s`
RANTEST=""
}
title() {
- echo "-----============= acceptance-small: "$*" ============-----"
+ log "-----============= acceptance-small: "$*" ============----- `date`"
RANTEST=${RANTEST}$*", "
}
if [ "$RUNTESTS" != "no" ]; then
title runtests
- sh runtests
+ bash runtests
$CLEANUP
$SETUP
+ RUNTESTS="done"
fi
if [ "$SANITY" != "no" ]; then
title sanity
- SANITYLOG=/tmp/sanity.log sh sanity.sh
+ bash sanity.sh
$CLEANUP
$SETUP
+ SANITY="done"
fi
which dbench > /dev/null 2>&1 || DBENCH=no
[ $THREADS -lt $DB_THREADS ] && DB_THREADS=$THREADS
$DEBUG_OFF
- sh rundbench 1
+ bash rundbench 1
$DEBUG_ON
$CLEANUP
$SETUP
if [ $DB_THREADS -gt 1 ]; then
$DEBUG_OFF
- sh rundbench $DB_THREADS
+ bash rundbench $DB_THREADS
$DEBUG_ON
$CLEANUP
$SETUP
fi
rm -f /mnt/lustre/`hostname`/client.txt
+ DBENCH="done"
fi
- chown $UID $MOUNT && chmod 700 $MOUNT
+ chown $UID $MOUNT
which bonnie++ > /dev/null 2>&1 || BONNIE=no
if [ "$BONNIE" != "no" ]; then
title bonnie
- SPACE=`df -P $MOUNT | tail -n 1 | awk '{ print $4 }'`
+ $LFS setstripe $MOUNT 0 -1 -1
+ MIN=`cat /proc/fs/lustre/osc/*-osc-*/kbytesfree | sort -n | head -n1`
+ SPACE=$(( OSTCOUNT * MIN ))
[ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4))
$DEBUG_OFF
bonnie++ -f -r 0 -s $((SIZE / 1024)) -n 10 -u $UID -d $MOUNT
$DEBUG_ON
$CLEANUP
$SETUP
+ BONNIE="done"
fi
export O_DIRECT
which iozone > /dev/null 2>&1 || IOZONE=no
if [ "$IOZONE" != "no" ]; then
title iozone
- SPACE=`df -P $MOUNT | tail -n 1 | awk '{ print $4 }'`
+ MIN=`cat /proc/fs/lustre/osc/*-osc-*/kbytesfree | sort -n | head -n1`
+ SPACE=$(( OSTCOUNT * MIN ))
[ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4))
IOZONE_OPTS="-i 0 -i 1 -i 2 -e -+d -r $RSIZE -s $SIZE"
- IOZFILE="-f $MOUNT/iozone"
+ IOZFILE="$MOUNT/iozone"
+ # $SPACE was calculated with all OSTs
+ $LFS setstripe $IOZFILE 0 -1 -1
$DEBUG_OFF
- iozone $IOZONE_OPTS $IOZFILE
+ iozone $IOZONE_OPTS -f $IOZFILE
$DEBUG_ON
$CLEANUP
$SETUP
VER=`iozone -v | awk '/Revision:/ { print $3 }'`
echo "iozone $VER too old for multi-thread test"
fi
+ IOZONE="done"
fi
if [ "$FSX" != "no" ]; then
$DEBUG_ON
$CLEANUP
$SETUP
+ FSX="done"
fi
if [ "$SANITYN" != "no" ]; then
mkdir -p $MOUNT2
mount_client $MOUNT2
#echo "can't mount2 for '$NAME', skipping sanityN.sh"
- SANITYLOG=$TMP/sanity.log START=: CLEAN=: sh sanityN.sh
+ START=: CLEAN=: bash sanityN.sh
umount $MOUNT2
$DEBUG_ON
$CLEANUP
$SETUP
+ SANITYN="done"
fi
if [ "$LFSCK" != "no" -a -x /usr/sbin/lfsck ]; then
if grep -q obdfilter /proc/fs/lustre/devices; then
if [ `echo $E2VER | cut -d. -f2` -ge 39 ] && \
[ "`echo $E2VER | grep cfs`" ]; then
- sh lfscktest.sh
+ bash lfscktest.sh
else
e2fsck -V
echo "e2fsck does not support lfsck, skipping"
else
echo "remote OST, skipping test"
fi
+ LFSCK="done"
fi
if [ "$LIBLUSTRE" != "no" ]; then
$CLEANUP
unload_modules
# Liblustre needs accept=all, noacl
- LNETOPTS="accept=all" MDS_MOUNT_OPTS="${MDS_MOUNT_OPTS},noacl" $SETUP
+ [ -f /etc/modprobe.conf ] && MODPROBECONF=/etc/modprobe.conf
+ [ -f /etc/modprobe.d/Lustre ] && MODPROBECONF=/etc/modprobe.d/Lustre
+
+ LNETOPTS="$(awk '/^options lnet/ { print $0}' $MODPROBECONF | sed 's/^options lnet //g') accept=all" MDS_MOUNT_OPTS="${MDS_MOUNT_OPTS},noacl" $SETUP
export LIBLUSTRE_MOUNT_POINT=$MOUNT2
export LIBLUSTRE_MOUNT_TARGET=$MGSNID:/$FSNAME
export LIBLUSTRE_TIMEOUT=`cat /proc/sys/lustre/timeout`
#export LIBLUSTRE_DEBUG_MASK=`cat /proc/sys/lnet/debug`
if [ -x $LIBLUSTRETESTS/sanity ]; then
mkdir -p $MOUNT2
+ echo $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
$LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
fi
$CLEANUP
#$SETUP
+ LIBLUSTRE="done"
fi
$CLEANUP
if [ "$REPLAY_SINGLE" != "no" ]; then
title replay-single
- sh replay-single.sh
+ bash replay-single.sh
+ REPLAY_SINGLE="done"
fi
if [ "$CONF_SANITY" != "no" ]; then
title conf-sanity
- sh conf-sanity.sh
+ bash conf-sanity.sh
+ CONF_SANITY="done"
fi
if [ "$RECOVERY_SMALL" != "no" ]; then
title recovery-small
- sh recovery-small.sh
+ bash recovery-small.sh
+ RECOVERY_SMALL="done"
fi
if [ "$REPLAY_OST_SINGLE" != "no" ]; then
title replay-ost-single
- sh replay-ost-single.sh
+ bash replay-ost-single.sh
+ REPLAY_OST_SINGLE="done"
fi
if [ "$REPLAY_DUAL" != "no" ]; then
title replay-dual
- sh replay-dual.sh
+ bash replay-dual.sh
+ REPLAY_DUAL="done"
fi
if [ "$INSANITY" != "no" ]; then
title insanity
- sh insanity.sh -r
+ bash insanity.sh -r
+ INSANITY="done"
fi
if [ "$SANITY_QUOTA" != "no" ]; then
title sanity-quota
- sh sanity-quota.sh
+ bash sanity-quota.sh
+ SANITY_QUOTA="done"
fi
title FINISHED
echo "Finished at `date` in $((`date +%s` - $STARTTIME))s"
echo "Tests ran: $RANTEST"
-
+print_summary
echo "$0: completed with rc $RC" && exit $RC