2 # script which _must_ complete successfully (at minimum) before checkins to
3 # the CVS HEAD are allowed.
6 [ "$CONFIGS" -a -z "$SANITYN" ] && SANITYN=no
7 [ "$CONFIGS" ] || CONFIGS="local lov"
8 [ "$MAX_THREADS" ] || MAX_THREADS=50
9 if [ -z "$THREADS" ]; then
10 KB=`awk '/MemTotal:/ { print $2 }' /proc/meminfo`
11 THREADS=`expr $KB / 16384`
12 [ $THREADS -gt $MAX_THREADS ] && THREADS=$MAX_THREADS
14 [ "$SIZE" ] || SIZE=20480
15 [ "$RSIZE" ] || RSIZE=64
16 [ "$UID" ] || UID=1000
17 [ "$MNT" ] || MNT=/mnt/lustre
18 [ "$TMP" ] || TMP=/tmp
19 [ "$COUNT" ] || COUNT=1000
20 [ "$DEBUG_OFF" ] || DEBUG_OFF="eval echo 0 > /proc/sys/portals/debug"
22 for NAME in $CONFIGS; do
24 [ -e $NAME.sh ] && sh $NAME.sh
25 [ ! -e $NAME.xml ] && echo "no config '$NAME.xml'" 1>&2 && exit 1
27 if [ "$RUNTESTS" != "no" ]; then
31 [ "$SANITY" != "no" ] && sh sanity.sh
32 [ "$SANITY" != "no" ] && START=" " CLEAN=" " sh sanity.sh
34 if [ "$DBENCH" != "no" ]; then
35 mount | grep $MNT || sh llmount.sh
36 SPACE=`df $MNT | tail -1 | awk '{ print $4 }'`
37 DB_THREADS=`expr $SPACE / 50000`
38 [ $THREADS -lt $DB_THREADS ] && DB_THREADS=$THREADS
44 if [ $DB_THREADS -gt 1 ]; then
46 sh rundbench $DB_THREADS
50 rm -f /mnt/lustre/client.txt
52 chown $UID $MNT && chmod 700 $MNT
53 if [ "$BONNIE" != "no" ]; then
54 mount | grep $MNT || sh llmount.sh
56 bonnie++ -s 0 -n 10 -u $UID -d $MNT
60 IOZONE_OPTS="-i 0 -i 1 -i 2 -+d -r $RSIZE -s $SIZE"
61 IOZONE_FILE="-f $MNT/iozone"
62 if [ "$IOZONE" != "no" ]; then
63 mount | grep $MNT || sh llmount.sh
65 iozone $IOZONE_OPTS $IOZONE_FILE
69 if [ "$IOZONE_DIR" != "no" ]; then
70 mount | grep $MNT || sh llmount.sh
71 SPACE=`df $MNT | tail -1 | awk '{ print $4 }'`
72 IOZ_THREADS=`expr $SPACE / $SIZE`
73 [ $THREADS -lt $IOZ_THREADS ] && IOZ_THREADS=$THREADS
76 iozone -I $IOZONE_OPTS $IOZONE_FILE.odir
77 IOZVER=`iozone -v | awk '/Revision:/ { print $3 }' | tr -d '.'`
80 if [ "$IOZ_THREADS" -gt 1 -a "$IOZVER" -ge 3145 ]; then
84 while [ $THREAD -le $IOZ_THREADS ]; do
85 IOZONE_FILE="$IOZONE_FILE $MNT/iozone.$THREAD"
86 THREAD=`expr $THREAD + 1`
88 iozone -I $IOZONE_OPTS -t $IOZ_THREADS $IOZONE_FILE
91 elif [ $IOZVER -lt 3145 ]; then
92 VER=`iozone -v | awk '/Revision:/ { print $3 }'`
93 echo "iozone $VER too old for multi-threaded tests"
96 if [ "$FSX" != "no" ]; then
97 mount | grep $MNT || sh llmount.sh
99 ./fsx -W -c 50 -p 1000 -P $TMP -l 1024000 -N $(($COUNT * 100)) $MNT/fsxfile
103 mount | grep $MNT && sh llmountcleanup.sh
106 if [ "$SANITYN" != "no" ]; then
108 mount | grep $MNT || sh llmount.sh
110 mount | grep $MNT && sh llmountcleanup.sh