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=10
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 [ "$MOUNT" ] || MOUNT=/mnt/lustre
18 [ "$TMP" ] || TMP=/tmp
19 [ "$COUNT" ] || COUNT=1000
20 #[ "$DEBUG_LVL" ] || DEBUG_LVL=0x370200
21 [ "$DEBUG_LVL" ] || DEBUG_LVL=0
22 [ "$DEBUG_OFF" ] || DEBUG_OFF="eval echo $DEBUG_LVL > /proc/sys/portals/debug"
23 [ "$DEBUG_ON" ] || DEBUG_ON="eval echo -1 > /proc/sys/portals/debug"
25 for NAME in $CONFIGS; do
27 [ -e $NAME.sh ] && sh $NAME.sh
28 [ ! -e $NAME.xml ] && [ -z "$LDAPURL" ] && echo "no config '$NAME.xml'" 1>&2 && exit 1
30 if [ "$RUNTESTS" != "no" ]; then
34 #[ "$SANITY" != "no" ] && sh sanity.sh
35 if [ "$SANITY" != "no" ]; then
36 SANITYLOG=/tmp/sanity.log START=: CLEAN=: sh sanity.sh
39 if [ "$DBENCH" != "no" ]; then
40 mount | grep $MOUNT || sh llmount.sh
41 SPACE=`df $MOUNT | tail -1 | awk '{ print $4 }'`
42 DB_THREADS=`expr $SPACE / 50000`
43 [ $THREADS -lt $DB_THREADS ] && DB_THREADS=$THREADS
50 if [ $DB_THREADS -gt 1 ]; then
52 sh rundbench $DB_THREADS
57 rm -f /mnt/lustre/`hostname`/client.txt
59 chown $UID $MOUNT && chmod 700 $MOUNT
60 if [ "$BONNIE" != "no" ]; then
61 mount | grep $MOUNT || sh llmount.sh
63 bonnie++ -s 0 -n 10 -u $UID -d $MOUNT
68 IOZONE_OPTS="-i 0 -i 1 -i 2 -+d -r $RSIZE -s $SIZE"
69 if [ "$O_DIRECT" -a "$O_DIRECT" != "no" ]; then
70 IOZONE_OPTS="-I $IOZONE_OPTS"
72 IOZONE_FILE="-f $MOUNT/iozone"
73 if [ "$IOZONE" != "no" ]; then
74 mount | grep $MOUNT || sh llmount.sh
76 iozone $IOZONE_OPTS $IOZONE_FILE
81 if [ "$IOZONE_DIR" != "no" ]; then
82 mount | grep $MOUNT || sh llmount.sh
83 SPACE=`df $MOUNT | tail -1 | awk '{ print $4 }'`
84 IOZ_THREADS=`expr $SPACE / \( $SIZE + $SIZE / 1000 \)`
85 [ $THREADS -lt $IOZ_THREADS ] && IOZ_THREADS=$THREADS
88 iozone $IOZONE_OPTS $IOZONE_FILE.odir
89 IOZVER=`iozone -v | awk '/Revision:/ { print $3 }' | tr -d '.'`
93 if [ "$IOZ_THREADS" -gt 1 -a "$IOZVER" -ge 3145 ]; then
97 while [ $THREAD -le $IOZ_THREADS ]; do
98 IOZONE_FILE="$IOZONE_FILE $MOUNT/iozone.$THREAD"
99 THREAD=`expr $THREAD + 1`
101 iozone $IOZONE_OPTS -t $IOZ_THREADS $IOZONE_FILE
105 elif [ $IOZVER -lt 3145 ]; then
106 VER=`iozone -v | awk '/Revision:/ { print $3 }'`
107 echo "iozone $VER too old for multi-threaded tests"
110 if [ "$FSX" != "no" ]; then
111 mount | grep $MOUNT || sh llmount.sh
113 ./fsx -W -c 50 -p 1000 -P $TMP -l 1024000 -N $(($COUNT * 100)) $MOUNT/fsxfile
118 mount | grep $MOUNT && sh llmountcleanup.sh
121 if [ "$REPLAY_SINGLE" != "no" ]; then
124 if [ "$SANITYN" != "no" ]; then
126 mount | grep $MOUNT || sh llmount.sh
128 mount | grep $MOUNT && sh llmountcleanup.sh
131 if [ "$CONF_SANITY" != "no" ]; then