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"
21 [ "$DEBUG_ON" ] || DEBUG_ON="eval echo -1 > /proc/sys/portals/debug"
23 for NAME in $CONFIGS; do
25 [ -e $NAME.sh ] && sh $NAME.sh
26 [ ! -e $NAME.xml ] && [ -z "$LDAPURL" ] && echo "no config '$NAME.xml'" 1>&2 && exit 1
28 if [ "$RUNTESTS" != "no" ]; then
32 #[ "$SANITY" != "no" ] && sh sanity.sh
33 if [ "$SANITY" != "no" ]; then
34 START=: CLEAN=: sh sanity.sh
37 if [ "$DBENCH" != "no" ]; then
38 mount | grep $MNT || sh llmount.sh
39 SPACE=`df $MNT | tail -1 | awk '{ print $4 }'`
40 DB_THREADS=`expr $SPACE / 50000`
41 [ $THREADS -lt $DB_THREADS ] && DB_THREADS=$THREADS
48 if [ $DB_THREADS -gt 1 ]; then
50 sh rundbench $DB_THREADS
55 rm -f /mnt/lustre/client.txt
57 chown $UID $MNT && chmod 700 $MNT
58 if [ "$BONNIE" != "no" ]; then
59 mount | grep $MNT || sh llmount.sh
61 bonnie++ -s 0 -n 10 -u $UID -d $MNT
66 IOZONE_OPTS="-i 0 -i 1 -i 2 -+d -r $RSIZE -s $SIZE"
67 IOZONE_FILE="-f $MNT/iozone"
68 if [ "$IOZONE" != "no" ]; then
69 mount | grep $MNT || sh llmount.sh
71 iozone $IOZONE_OPTS $IOZONE_FILE
76 if [ "$IOZONE_DIR" != "no" ]; then
77 mount | grep $MNT || sh llmount.sh
78 SPACE=`df $MNT | tail -1 | awk '{ print $4 }'`
79 IOZ_THREADS=`expr $SPACE / $SIZE`
80 [ $THREADS -lt $IOZ_THREADS ] && IOZ_THREADS=$THREADS
83 iozone -I $IOZONE_OPTS $IOZONE_FILE.odir
84 IOZVER=`iozone -v | awk '/Revision:/ { print $3 }' | tr -d '.'`
88 if [ "$IOZ_THREADS" -gt 1 -a "$IOZVER" -ge 3145 ]; then
92 while [ $THREAD -le $IOZ_THREADS ]; do
93 IOZONE_FILE="$IOZONE_FILE $MNT/iozone.$THREAD"
94 THREAD=`expr $THREAD + 1`
96 iozone -I $IOZONE_OPTS -t $IOZ_THREADS $IOZONE_FILE
100 elif [ $IOZVER -lt 3145 ]; then
101 VER=`iozone -v | awk '/Revision:/ { print $3 }'`
102 echo "iozone $VER too old for multi-threaded tests"
105 if [ "$FSX" != "no" ]; then
106 mount | grep $MNT || sh llmount.sh
108 ./fsx -W -c 50 -p 1000 -P $TMP -l 1024000 -N $(($COUNT * 100)) $MNT/fsxfile
113 mount | grep $MNT && sh llmountcleanup.sh
116 if [ "$SANITYN" != "no" ]; then
118 mount | grep $MNT || sh llmount.sh
120 mount | grep $MNT && sh llmountcleanup.sh