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 [ "$SANITY" != "no" ] && START=" " CLEAN=" " sh sanity.sh
35 if [ "$DBENCH" != "no" ]; then
36 mount | grep $MNT || sh llmount.sh
37 SPACE=`df $MNT | tail -1 | awk '{ print $4 }'`
38 DB_THREADS=`expr $SPACE / 50000`
39 [ $THREADS -lt $DB_THREADS ] && DB_THREADS=$THREADS
46 if [ $DB_THREADS -gt 1 ]; then
48 sh rundbench $DB_THREADS
53 rm -f /mnt/lustre/client.txt
55 chown $UID $MNT && chmod 700 $MNT
56 if [ "$BONNIE" != "no" ]; then
57 mount | grep $MNT || sh llmount.sh
59 bonnie++ -s 0 -n 10 -u $UID -d $MNT
64 IOZONE_OPTS="-i 0 -i 1 -i 2 -+d -r $RSIZE -s $SIZE"
65 IOZONE_FILE="-f $MNT/iozone"
66 if [ "$IOZONE" != "no" ]; then
67 mount | grep $MNT || sh llmount.sh
69 iozone $IOZONE_OPTS $IOZONE_FILE
74 if [ "$IOZONE_DIR" != "no" ]; then
75 mount | grep $MNT || sh llmount.sh
76 SPACE=`df $MNT | tail -1 | awk '{ print $4 }'`
77 IOZ_THREADS=`expr $SPACE / $SIZE`
78 [ $THREADS -lt $IOZ_THREADS ] && IOZ_THREADS=$THREADS
81 iozone -I $IOZONE_OPTS $IOZONE_FILE.odir
82 IOZVER=`iozone -v | awk '/Revision:/ { print $3 }' | tr -d '.'`
86 if [ "$IOZ_THREADS" -gt 1 -a "$IOZVER" -ge 3145 ]; then
90 while [ $THREAD -le $IOZ_THREADS ]; do
91 IOZONE_FILE="$IOZONE_FILE $MNT/iozone.$THREAD"
92 THREAD=`expr $THREAD + 1`
94 iozone -I $IOZONE_OPTS -t $IOZ_THREADS $IOZONE_FILE
98 elif [ $IOZVER -lt 3145 ]; then
99 VER=`iozone -v | awk '/Revision:/ { print $3 }'`
100 echo "iozone $VER too old for multi-threaded tests"
103 if [ "$FSX" != "no" ]; then
104 mount | grep $MNT || sh llmount.sh
106 ./fsx -W -c 50 -p 1000 -P $TMP -l 1024000 -N $(($COUNT * 100)) $MNT/fsxfile
111 mount | grep $MNT && sh llmountcleanup.sh
114 if [ "$SANITYN" != "no" ]; then
116 mount | grep $MNT || sh llmount.sh
118 mount | grep $MNT && sh llmountcleanup.sh