summaryrefslogtreecommitdiff
path: root/tools/fuzz-test.sh
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-08-16 13:45:00 +0000
committerEvan Huus <eapache@gmail.com>2013-08-16 13:45:00 +0000
commit0ea379e46d4f61af6d39b07bc7cea9c53267917f (patch)
treeab20f5d3289fabb166d02b03019366dc07cafa4a /tools/fuzz-test.sh
parentc5ae1bbbcaf3141a7c6b538932ea87452aba0aeb (diff)
downloadwireshark-0ea379e46d4f61af6d39b07bc7cea9c53267917f.tar.gz
Be sure to forward BIN_DIR to the valgrind script, probably also needed on the
fuzz-but. svn path=/trunk/; revision=51391
Diffstat (limited to 'tools/fuzz-test.sh')
-rwxr-xr-xtools/fuzz-test.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh
index c471777770..b68c71b7b9 100755
--- a/tools/fuzz-test.sh
+++ b/tools/fuzz-test.sh
@@ -72,9 +72,11 @@ shift $(($OPTIND - 1))
### usually you won't have to change anything below this line ###
+COMMON_ARGS="${CONFIG_PROFILE}${TWO_PASS}"
if [ $VALGRIND -eq 1 ]; then
RUNNER="`dirname $0`/valgrind-wireshark.sh"
- declare -a RUNNER_ARGS=("${CONFIG_PROFILE}${TWO_PASS}" "${CONFIG_PROFILE}${TWO_PASS}-T")
+ COMMON_ARGS="-b $BIN_DIR $COMMON_ARGS"
+ declare -a RUNNER_ARGS=("" "-T")
else
# Not using valgrind, use regular tshark.
# TShark arguments (you won't have to change these)
@@ -83,7 +85,7 @@ else
# x Cause TShark to print a hex and ASCII dump of the packet data after printing the summary or details
# r Read packet data from the following infile
RUNNER="$TSHARK"
- declare -a RUNNER_ARGS=("${CONFIG_PROFILE}${TWO_PASS}-nVxr" "${CONFIG_PROFILE}${TWO_PASS}-nr")
+ declare -a RUNNER_ARGS=("-nVxr" "-nr")
# Running with a read filter but without generating the tree exposes some
# "More than 100000 items in tree" bugs.
# Not sure if we want to add even more cycles to the fuzz bot's work load...
@@ -131,7 +133,7 @@ HOWMANY="forever"
if [ $MAX_PASSES -gt 0 ]; then
HOWMANY="$MAX_PASSES passes"
fi
-echo -n "Running $RUNNER with args: "
+echo -n "Running $RUNNER $COMMON_ARGS with args: "
printf "\"%s\" " "${RUNNER_ARGS[@]}"
echo "($HOWMANY)"
echo ""
@@ -198,7 +200,7 @@ while [ \( $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 \) -a $DONE -ne 1 ] ; do
ulimit -S -t $MAX_CPU_TIME -v $MAX_VMEM -s $MAX_STACK
ulimit -c unlimited
- "$RUNNER" $ARGS $TMP_DIR/$TMP_FILE \
+ "$RUNNER" $COMMON_ARGS $ARGS $TMP_DIR/$TMP_FILE \
> /dev/null 2>> $TMP_DIR/$ERR_FILE
)
RETVAL=$?