Whamcloud - gitweb
b=3983
[fs/lustre-release.git] / lustre / tests / acceptance-small.sh
index 949c627..1387cf3 100755 (executable)
@@ -3,18 +3,20 @@
 # the CVS HEAD are allowed.
 set -vxe
 
-[ "$CONFIGS" -a -z "$SANITYN" ] && SANITYN=no
-[ "$CONFIGS" ] || CONFIGS="local-large-inode local lov"
+PATH=`dirname $0`/../utils:$PATH
+
+[ "$CONFIGS" ] || CONFIGS="local lov"
 [ "$MAX_THREADS" ] || MAX_THREADS=10
 if [ -z "$THREADS" ]; then
        KB=`awk '/MemTotal:/ { print $2 }' /proc/meminfo`
        THREADS=`expr $KB / 16384`
        [ $THREADS -gt $MAX_THREADS ] && THREADS=$MAX_THREADS
 fi
-[ "$SIZE" ] || SIZE=20480
-[ "$RSIZE" ] || RSIZE=64
+[ "$SIZE" ] || SIZE=40960
+[ "$RSIZE" ] || RSIZE=512
 [ "$UID" ] || UID=1000
 [ "$MOUNT" ] || MOUNT=/mnt/lustre
+[ "$MOUNT2" ] || MOUNT2=${MOUNT}2
 [ "$TMP" ] || TMP=/tmp
 [ "$COUNT" ] || COUNT=1000
 #[ "$DEBUG_LVL" ] || DEBUG_LVL=0x370200
@@ -25,20 +27,20 @@ fi
 for NAME in $CONFIGS; do
        export NAME MOUNT
        [ -e $NAME.sh ] && sh $NAME.sh
-       [ ! -e $NAME.xml ] && [ -z "$LDAPURL" ] && echo "no config '$NAME.xml'" 1>&2 && exit 1
+       [ ! -e $NAME.xml ] && [ -z "$LDAPURL" ] && \
+               echo "no config '$NAME.xml'" 1>&2 && exit 1
 
        if [ "$RUNTESTS" != "no" ]; then
                sh runtests
        fi
 
-       #[ "$SANITY" != "no" ] && sh sanity.sh
        if [ "$SANITY" != "no" ]; then
                SANITYLOG=/tmp/sanity.log START=: CLEAN=: sh sanity.sh
        fi
 
        if [ "$DBENCH" != "no" ]; then
                mount | grep $MOUNT || sh llmount.sh
-               SPACE=`df $MOUNT | tail -1 | awk '{ print $4 }'`
+               SPACE=`df $MOUNT | tail -1 | awk '{ print $4 }'`
                DB_THREADS=`expr $SPACE / 50000`
                [ $THREADS -lt $DB_THREADS ] && DB_THREADS=$THREADS
 
@@ -60,7 +62,7 @@ for NAME in $CONFIGS; do
        if [ "$BONNIE" != "no" ]; then
                mount | grep $MOUNT || sh llmount.sh
                $DEBUG_OFF
-               bonnie++ -s 0 -n 10 -u $UID -d $MOUNT
+               bonnie++ -f -r 0 -s $(($SIZE / 1024)) -n 10 -u $UID -d $MOUNT
                $DEBUG_ON
                sh llmountcleanup.sh
                sh llrmount.sh
@@ -80,8 +82,8 @@ for NAME in $CONFIGS; do
        fi
        if [ "$IOZONE_DIR" != "no" ]; then
                mount | grep $MOUNT || sh llmount.sh
-               SPACE=`df $MOUNT | tail -1 | awk '{ print $4 }'`
-               IOZ_THREADS=`expr $SPACE / \( $SIZE + $SIZE / 1000 \)`
+               SPACE=`df $MOUNT | tail -1 | awk '{ print $4 }'`
+               IOZ_THREADS=`expr $SPACE / \( $SIZE + $SIZE / 512 \)`
                [ $THREADS -lt $IOZ_THREADS ] && IOZ_THREADS=$THREADS
 
                $DEBUG_OFF
@@ -110,24 +112,59 @@ for NAME in $CONFIGS; do
        if [ "$FSX" != "no" ]; then
                mount | grep $MOUNT || sh llmount.sh
                $DEBUG_OFF
-               ./fsx -W -c 50 -p 1000 -P $TMP -l 1024000 -N $(($COUNT * 100)) $MOUNT/fsxfile
+               ./fsx -W -c 50 -p 1000 -P $TMP -l $SIZE \
+                       -N $(($COUNT * 100)) $MOUNT/fsxfile
                $DEBUG_ON
                sh llmountcleanup.sh
-               #sh llrmount.sh
+               sh llrmount.sh
        fi      
+       if [ "$SANITYN" != "no" ]; then
+               mount | grep $MOUNT || sh llmount.sh
+               $DEBUG_OFF
+
+               mkdir -p $MOUNT2
+               case $NAME in
+               local|lov)
+                       MDSNODE=`hostname`
+                       MDSNAME=mds1
+                       CLIENT=client
+                       ;;
+               *)      # we could extract this from $NAME.xml somehow
+                       ;;
+               esac
+               if [ "$MDSNODE" -a "$MDSNAME" -a "$CLIENT" ]; then
+                       llmount $MDSNODE:/$MDSNAME/$CLIENT $MOUNT2
+                       SANITYLOG=$TMP/sanity.log START=: CLEAN=: sh sanityN.sh
+                       umount $MOUNT2
+               else
+                       echo "don't know \$MDSNODE, \$MDSNAME, \$CLIENT"
+                       echo "can't mount2 for '$NAME', skipping sanityN.sh"
+               fi
+
+               $DEBUG_ON
+               sh llmountcleanup.sh
+               #sh llrmount.sh
+       fi
+
        mount | grep $MOUNT && sh llmountcleanup.sh
 done
 
 if [ "$REPLAY_SINGLE" != "no" ]; then
        sh replay-single.sh
 fi
-if [ "$SANITYN" != "no" ]; then
-       export NAME=mount2
-       mount | grep $MOUNT || sh llmount.sh
-       sh sanityN.sh
-       mount | grep $MOUNT && sh llmountcleanup.sh
-fi
 
 if [ "$CONF_SANITY" != "no" ]; then
         sh conf-sanity.sh
 fi
+
+if [ "$RECOVERY_SMALL" != "no" ]; then
+        sh recovery-small.sh
+fi
+
+if [ "$REPLAY_OST_SINGLE" != "no" ]; then
+        sh replay-ost-single.sh
+fi
+
+if [ "$INSANITY" != "no" ]; then
+        sh insanity.sh -r
+fi