diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2012-04-27 16:58:21 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2012-04-27 16:58:21 +0000 |
commit | 7891f04d8c6e2c72bd25bbd6754f1f63b3018389 (patch) | |
tree | 752d2de315ce8c77cfa52f00f8b38f73ac7a31f4 /tools/fuzz-test.sh | |
parent | 8a4268505be06aea5a5a419ff8ec780801c5d0ca (diff) |
Get the script working again in the "unlimited passes" mode.
svn path=/trunk/; revision=42293
Diffstat (limited to 'tools/fuzz-test.sh')
-rwxr-xr-x | tools/fuzz-test.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh index 06e37aa68d..ab750d46ec 100755 --- a/tools/fuzz-test.sh +++ b/tools/fuzz-test.sh @@ -185,7 +185,10 @@ while [ $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 ] ; do RUN=0 for CF in "$@" ; do - if [ $PASS -gt $MAX_PASSES ] ; then break ; fi # We caught a signal + if [ $PASS -gt $MAX_PASSES -a $MAX_PASSES -gt 1 ] + then + break # We caught a signal + fi RUN=$(( $RUN + 1 )) if [ $(( $RUN % 50 )) -eq 0 ] ; then echo " [Pass $PASS]" @@ -231,8 +234,8 @@ while [ $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 ] ; do # checking. #grep -i "dissector bug" $TMP_DIR/$ERR_FILE \ # > /dev/null 2>&1 && DISSECTOR_BUG=1 - if [ $RETVAL -ne 0 -o $DISSECTOR_BUG -ne 0 ] ; then - echo "" + if [ \( $RETVAL -ne 0 -o $DISSECTOR_BUG -ne 0 \) -a $PASS -le $MAX_PASSES ] ; then + echo "" echo " ERROR" echo -e "Processing failed. Capture info follows:\n" echo " Output file: $TMP_DIR/$TMP_FILE" @@ -240,7 +243,8 @@ while [ $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 ] ; do cat $TMP_DIR/$ERR_FILE exit 1 fi + echo " OK" - rm -f $TMP_DIR/$TMP_FILE $TMP_DIR/$ERR_FILE + rm -f $TMP_DIR/$TMP_FILE $TMP_DIR/$ERR_FILE done done |