aboutsummaryrefslogtreecommitdiffstats
path: root/tools/fuzz-test.sh
diff options
context:
space:
mode:
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2008-04-15 09:12:26 +0000
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2008-04-15 09:12:26 +0000
commit17f874d2742f6bfc29da12fd0c3621cebf70ee03 (patch)
treea390d4fd87c0659ee66312a97754471e902a0222 /tools/fuzz-test.sh
parentadd3b1a35adfe77a56d04dac9db1e101845f6847 (diff)
Added an option (-b) to specify directory containing binaries to use for
fuzz testing (tshark, editcap and capinfos). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25041 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools/fuzz-test.sh')
-rwxr-xr-xtools/fuzz-test.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh
index 5b25d5bf4e..b69c460470 100755
--- a/tools/fuzz-test.sh
+++ b/tools/fuzz-test.sh
@@ -9,15 +9,13 @@
# each fuzzed file and checks for errors. The files are processed
# repeatedly until an error is found.
-# Tweak the following to your liking. Editcap must support "-E".
-TSHARK=./tshark
-EDITCAP=./editcap
-CAPINFOS=./capinfos
-
# This needs to point to a 'date' that supports %s.
DATE=/bin/date
BASE_NAME=fuzz-`$DATE +%Y-%m-%d`-$$
+# Directory containing binaries. Default current directory.
+BIN_DIR=.
+
# Temporary file directory and names.
# (had problems with this on cygwin, tried TMP_DIR=./ which worked)
TMP_DIR=/tmp
@@ -43,14 +41,20 @@ WIRESHARK_ABORT_ON_DISSECTOR_BUG="True"
# To do: add options for file names and limits
-while getopts ":d:p:" OPTCHAR ; do
+while getopts ":b:d:p:" OPTCHAR ; do
case $OPTCHAR in
+ b) BIN_DIR=$OPTARG ;;
d) TMP_DIR=$OPTARG ;;
p) MAX_PASSES=$OPTARG ;;
esac
done
shift $(($OPTIND - 1))
+# Tweak the following to your liking. Editcap must support "-E".
+TSHARK="$BIN_DIR/tshark"
+EDITCAP="$BIN_DIR/editcap"
+CAPINFOS="$BIN_DIR/capinfos"
+
# set some limits to the child processes, e.g. stop it if it's running longer then MAX_CPU_TIME seconds
# (ulimit is not supported well on cygwin and probably other platforms, e.g. cygwin shows some warnings)
ulimit -S -t $MAX_CPU_TIME -v $MAX_VMEM