From 498db62022d6877ddbda86ae00718983f2c7cf3e Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 2 Oct 2012 17:58:00 +0000 Subject: Test with the presence (-nVxr) and absence (-nr) of the tree. We now use an array of arguments so additional combinations can be added. svn path=/trunk/; revision=45258 --- tools/fuzz-test.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'tools/fuzz-test.sh') diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh index f150e42638..c8b0fb8ae7 100755 --- a/tools/fuzz-test.sh +++ b/tools/fuzz-test.sh @@ -94,7 +94,7 @@ ulimit -c unlimited if [ $VALGRIND -eq 1 ]; then RUNNER="$BIN_DIR/tools/valgrind-wireshark.sh" - RUNNER_ARGS="${CONFIG_PROFILE}${TWO_PASS}" + declare -a RUNNER_ARGS=("${CONFIG_PROFILE}${TWO_PASS}") else # Not using valgrind, use regular tshark. # TShark arguments (you won't have to change these) @@ -103,7 +103,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" - RUNNER_ARGS="${CONFIG_PROFILE}${TWO_PASS}-nVxr" + declare -a RUNNER_ARGS=("${CONFIG_PROFILE}${TWO_PASS}-nVxr" "${CONFIG_PROFILE}${TWO_PASS}-nr") fi @@ -148,7 +148,9 @@ HOWMANY="forever" if [ $MAX_PASSES -gt 0 ]; then HOWMANY="$MAX_PASSES passes" fi -echo "Running $RUNNER with args: $RUNNER_ARGS ($HOWMANY)" +echo -n "Running $RUNNER with args: " +printf "\"%s\" " "${RUNNER_ARGS[@]}" +echo "($HOWMANY)" echo "" # Clean up on C, etc @@ -254,9 +256,13 @@ while [ \( $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 \) -a $DONE -ne 1 ] ; do fi fi - "$RUNNER" $RUNNER_ARGS $TMP_DIR/$TMP_FILE \ - > /dev/null 2>> $TMP_DIR/$ERR_FILE - RETVAL=$? + for ARGS in "${RUNNER_ARGS[@]}" ; do + echo -n "($ARGS) " + "$RUNNER" $ARGS $TMP_DIR/$TMP_FILE \ + > /dev/null 2>> $TMP_DIR/$ERR_FILE + RETVAL=$? + if [ $RETVAL -ge 128 ] ; then break ; fi + done # Uncomment the next two lines to enable dissector bug # checking. -- cgit v1.2.3