Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / tests / acceptance-small.sh
index e00ab89..4e203a6 100755 (executable)
@@ -6,6 +6,7 @@ set -e
 
 PATH=`dirname $0`/../utils:$PATH
 
+[ -z "$CONFIG" -a "$NAME" ] && CONFIGS=$NAME
 [ "$CONFIGS" ] || CONFIGS="local"  #"local lov"
 [ "$MAX_THREADS" ] || MAX_THREADS=20
 RAMKB=`awk '/MemTotal:/ { print $2 }' /proc/meminfo`
@@ -25,9 +26,18 @@ fi
 [ "$DEBUG_ON" ] || DEBUG_ON="eval sysctl -w lnet.debug=0x33f0484"
 
 
+
 LIBLUSTRE=${LIBLUSTRE:-../liblustre}
 LIBLUSTRETESTS=${LIBLUSTRETESTS:-$LIBLUSTRE/tests}
 
+if [ "$ACC_SM_ONLY" ]; then
+    export RUNTESTS="no" SANITY="no" DBENCH="no" BONNIE="no" IOZONE="no" FSX="no" SANITYN="no" LFSCK="no" LIBLUSTRE="no" REPLAY_SINGLE="no" CONF_SANITY="no" RECOVERY_SMALL="no" REPLAY_OST_SINGLE="no" REPLAY_DUAL="no" INSANITY="no" SANITY_QUOTA="no"
+    for O in $ACC_SM_ONLY; do
+       O=`echo $O | tr "[:lower:]" "[:upper:]"`
+       export ${O}="yes"
+    done
+fi
+
 STARTTIME=`date +%s`
 RANTEST=""
 
@@ -68,7 +78,7 @@ for NAME in $CONFIGS; do
 
        if [ "$SANITY" != "no" ]; then
                title sanity
-               SANITYLOG=/tmp/sanity.log sh sanity.sh
+               sh sanity.sh
                $CLEANUP
                $SETUP
        fi
@@ -179,7 +189,7 @@ for NAME in $CONFIGS; do
                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=: sh sanityN.sh
                umount $MOUNT2
 
                $DEBUG_ON
@@ -190,8 +200,17 @@ for NAME in $CONFIGS; do
        if [ "$LFSCK" != "no" -a -x /usr/sbin/lfsck ]; then
                title lfsck
                E2VER=`e2fsck -V 2>&1 | head -n 1 | cut -d' ' -f 2`
-               [ `echo $E2VER | cut -d. -f2` -ge 39 ] && \
-                       [ "`echo $E2VER | grep cfs`" ] && sh lfscktest.sh
+               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
+                       else
+                               e2fsck -V
+                               echo "e2fsck does not support lfsck, skipping"
+                       fi
+               else
+                       echo "remote OST, skipping test"
+               fi
        fi
 
        if [ "$LIBLUSTRE" != "no" ]; then
@@ -200,7 +219,10 @@ for NAME in $CONFIGS; do
                $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`