aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-04-15 09:12:26 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-04-15 09:12:26 +0000
commit0ce8d6c354b3d0108c01ba52c21202464a6eac02 (patch)
treea390d4fd87c0659ee66312a97754471e902a0222 /tools
parent87a476645b4da7372bbfbec79fa5a1c921736e99 (diff)
Added an option (-b) to specify directory containing binaries to use for
fuzz testing (tshark, editcap and capinfos). svn path=/trunk/; revision=25041
Diffstat (limited to 'tools')
-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