aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2007-08-23 14:56:18 +0000
committerBill Meier <wmeier@newsguy.com>2007-08-23 14:56:18 +0000
commit2fa88cfca325a8e53e5708fdb408224031024f68 (patch)
tree0f893a7ecaa62d72c3d1dd8a7a23c4dd077fd9ee /tools
parent2c86c376289e4813eceac0f5a614c2b3989f3086 (diff)
Don't rename to self when fuzz err; enable ^C file cleanup trap
svn path=/trunk/; revision=22601
Diffstat (limited to 'tools')
-rwxr-xr-xtools/fuzz-test.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh
index ab028ab3a9..d1fbdf6c0f 100755
--- a/tools/fuzz-test.sh
+++ b/tools/fuzz-test.sh
@@ -96,8 +96,8 @@ fi
echo "Running $TSHARK with args: $TSHARK_ARGS ($HOWMANY)"
echo ""
-# Not yet - properly handle empty filenames
-#trap "rm $TMP_DIR/$TMP_FILE $TMP_DIR/$FUZZ_FILE; exit 1" 1 2 15
+# Clean up on <ctrl>C, etc
+trap "rm -f $TMP_DIR/$TMP_FILE $TMP_DIR/$ERR_FILE; echo ""; exit 1" HUP INT TERM
# Iterate over our capture files.
PASS=0
@@ -132,12 +132,10 @@ while [ $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 ] ; do
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
- FUZZ_FILE="fuzz-`$DATE +%Y-%m-%d`-$$.pcap"
echo ""
echo " ERROR"
echo -e "Processing failed. Capture info follows:\n"
- mv $TMP_DIR/$TMP_FILE $TMP_DIR/$FUZZ_FILE
- echo " Output file: $TMP_DIR/$FUZZ_FILE"
+ echo " Output file: $TMP_DIR/$TMP_FILE"
if [ $DISSECTOR_BUG -ne 0 ] ; then
echo -e "stderr follows:\n"
cat $TMP_DIR/$ERR_FILE