Whamcloud - gitweb
Merge of b_md to HEAD:
[fs/lustre-release.git] / lustre / tests / runiozone
index aa2a2c2..cf198ad 100755 (executable)
@@ -1,16 +1,17 @@
 #!/bin/sh
-SIZE=5g
-COUNT=0
+[ -z "$SIZE" ] && SIZE=5g
+[ -z "$LOOPS" ] && LOOPS=9999
 [ -z "$VERIFY" ] && VERIFY="-+d"
 [ -z "$ODIR" ] && ODIR="-I"
 [ -z "$REC" ] && REC=64
-FILE=/mnt/lustre/test.$$
+[ -z "$FILE" ] && FILE=/mnt/lustre/test.$$
 [ $1 ] && SIZE=$1
+COUNT=0
 rm -f endiozone
 echo 0 > /proc/sys/portals/debug
 while date; do
        echo "Test #$COUNT"
        iozone $VERIFY $ODIR -r $REC -i 0 -i 1 -f $FILE -s $SIZE 2>&1 || exit $?
        COUNT=`expr $COUNT + 1`
-       [ -f endiozone ] && rm endiozone && exit 0
+       [ -f endiozone -o $COUNT -ge $LOOPS ] && rm -f endiozone && exit 0
 done | tee /tmp/iozone.log