diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-03-17 19:53:28 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-03-17 19:53:28 +0000 |
commit | 767e07ebfd468a1d4e250f97ee6e609a76be54c5 (patch) | |
tree | c0351e5a3d102793667fc2ef8c9f1649a443e47f /tools | |
parent | b26b2cb1ddc75b3cbe1f411dc4f41093d5ee69f7 (diff) |
Don't clobber the capinfos data if we have a valid capture file. This
should let the original file information show up in bug reports.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36209 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/fuzz-test.sh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh index 2934147a64..e335d57e30 100755 --- a/tools/fuzz-test.sh +++ b/tools/fuzz-test.sh @@ -151,14 +151,12 @@ while [ $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 ] ; do "$CAPINFOS" "$CF" > /dev/null 2> $TMP_DIR/$ERR_FILE RETVAL=$? - if [ $RETVAL -eq 0 ] ; then - # have a valid file - rm -f $TMP_DIR/$ERR_FILE - elif [ $RETVAL -eq 1 ] ; then + if [ $RETVAL -eq 1 ] ; then echo "Not a valid capture file" rm -f $TMP_DIR/$ERR_FILE continue - else + elif [ $RETVAL -ne 0 ] ; then + # Some other error echo "" echo " ERROR" echo -e "Processing failed. Capture info follows:\n" @@ -187,7 +185,7 @@ while [ $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 ] ; do export G_SLICE=debug-blocks # since GLib 2.13 export MALLOC_CHECK_=3 "$TSHARK" $TSHARK_ARGS $TMP_DIR/$TMP_FILE \ - > /dev/null 2> $TMP_DIR/$ERR_FILE + > /dev/null 2>> $TMP_DIR/$ERR_FILE RETVAL=$? # Uncomment the next two lines to enable dissector bug # checking. |