2 # script which _must_ complete successfully (at minimum) before checkins to
3 # the CVS HEAD are allowed.
6 PATH=`dirname $0`/../utils:$PATH
8 [ "$CONFIGS" ] || CONFIGS="local lov"
9 [ "$MAX_THREADS" ] || MAX_THREADS=10
10 if [ -z "$THREADS" ]; then
11 KB=`awk '/MemTotal:/ { print $2 }' /proc/meminfo`
12 THREADS=`expr $KB / 16384`
13 [ $THREADS -gt $MAX_THREADS ] && THREADS=$MAX_THREADS
15 [ "$SIZE" ] || SIZE=40960
16 [ "$RSIZE" ] || RSIZE=512
17 [ "$UID" ] || UID=1000
18 [ "$MOUNT" ] || MOUNT=/mnt/lustre
19 [ "$MOUNT2" ] || MOUNT2=${MOUNT}2
20 [ "$TMP" ] || TMP=/tmp
21 [ "$COUNT" ] || COUNT=1000
22 #[ "$DEBUG_LVL" ] || DEBUG_LVL=0x370200
23 [ "$DEBUG_LVL" ] || DEBUG_LVL=0
24 [ "$DEBUG_OFF" ] || DEBUG_OFF="eval echo $DEBUG_LVL > /proc/sys/portals/debug"
25 [ "$DEBUG_ON" ] || DEBUG_ON="eval echo -1 > /proc/sys/portals/debug"
27 for NAME in $CONFIGS; do
29 [ -e $NAME.sh ] && sh $NAME.sh
30 [ ! -e $NAME.xml ] && [ -z "$LDAPURL" ] && \
31 echo "no config '$NAME.xml'" 1>&2 && exit 1
33 if [ "$RUNTESTS" != "no" ]; then
37 if [ "$SANITY" != "no" ]; then
38 SANITYLOG=/tmp/sanity.log START=: CLEAN=: sh sanity.sh
41 if [ "$DBENCH" != "no" ]; then
42 mount | grep $MOUNT || sh llmount.sh
43 SPACE=`df $MOUNT | tail -n 1 | awk '{ print $4 }'`
44 DB_THREADS=`expr $SPACE / 50000`
45 [ $THREADS -lt $DB_THREADS ] && DB_THREADS=$THREADS
52 if [ $DB_THREADS -gt 1 ]; then
54 sh rundbench $DB_THREADS
59 rm -f /mnt/lustre/`hostname`/client.txt
61 chown $UID $MOUNT && chmod 700 $MOUNT
62 if [ "$BONNIE" != "no" ]; then
63 mount | grep $MOUNT || sh llmount.sh
65 bonnie++ -f -r 0 -s $(($SIZE / 1024)) -n 10 -u $UID -d $MOUNT
70 IOZONE_OPTS="-i 0 -i 1 -i 2 -+d -r $RSIZE -s $SIZE"
71 if [ "$O_DIRECT" -a "$O_DIRECT" != "no" ]; then
72 IOZONE_OPTS="-I $IOZONE_OPTS"
74 IOZONE_FILE="-f $MOUNT/iozone"
75 if [ "$IOZONE" != "no" ]; then
76 mount | grep $MOUNT || sh llmount.sh
78 iozone $IOZONE_OPTS $IOZONE_FILE
83 if [ "$IOZONE_DIR" != "no" ]; then
84 mount | grep $MOUNT || sh llmount.sh
85 SPACE=`df $MOUNT | tail -n 1 | awk '{ print $4 }'`
86 IOZ_THREADS=`expr $SPACE / \( $SIZE + $SIZE / 512 \)`
87 [ $THREADS -lt $IOZ_THREADS ] && IOZ_THREADS=$THREADS
90 iozone $IOZONE_OPTS $IOZONE_FILE.odir
91 IOZVER=`iozone -v | awk '/Revision:/ { print $3 }' | tr -d '.'`
95 if [ "$IOZ_THREADS" -gt 1 -a "$IOZVER" -ge 3145 ]; then
99 while [ $THREAD -le $IOZ_THREADS ]; do
100 IOZONE_FILE="$IOZONE_FILE $MOUNT/iozone.$THREAD"
101 THREAD=`expr $THREAD + 1`
103 iozone $IOZONE_OPTS -t $IOZ_THREADS $IOZONE_FILE
107 elif [ $IOZVER -lt 3145 ]; then
108 VER=`iozone -v | awk '/Revision:/ { print $3 }'`
109 echo "iozone $VER too old for multi-threaded tests"
112 if [ "$FSX" != "no" ]; then
113 mount | grep $MOUNT || sh llmount.sh
115 ./fsx -W -c 50 -p 1000 -P $TMP -l $SIZE \
116 -N $(($COUNT * 100)) $MOUNT/fsxfile
121 if [ "$SANITYN" != "no" ]; then
122 mount | grep $MOUNT || sh llmount.sh
132 *) # we could extract this from $NAME.xml somehow
135 if [ "$MDSNODE" -a "$MDSNAME" -a "$CLIENT" ]; then
136 llmount $MDSNODE:/$MDSNAME/$CLIENT $MOUNT2
137 SANITYLOG=$TMP/sanity.log START=: CLEAN=: sh sanityN.sh
140 echo "don't know \$MDSNODE, \$MDSNAME, \$CLIENT"
141 echo "can't mount2 for '$NAME', skipping sanityN.sh"
149 mount | grep $MOUNT && sh llmountcleanup.sh
152 if [ "$REPLAY_SINGLE" != "no" ]; then
156 if [ "$CONF_SANITY" != "no" ]; then
160 if [ "$RECOVERY_SMALL" != "no" ]; then
164 if [ "$REPLAY_OST_SINGLE" != "no" ]; then
165 sh replay-ost-single.sh
168 if [ "$INSANITY" != "no" ]; then