From 0ce8d6c354b3d0108c01ba52c21202464a6eac02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Tue, 15 Apr 2008 09:12:26 +0000 Subject: Added an option (-b) to specify directory containing binaries to use for fuzz testing (tshark, editcap and capinfos). svn path=/trunk/; revision=25041 --- tools/fuzz-test.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'tools') 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 -- cgit v1.2.3