forked from osmocom/wireshark
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
This commit is contained in:
parent
ff3bd58b74
commit
498db62022
|
@ -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 <ctrl>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.
|
||||
|
|
|
@ -58,7 +58,7 @@ ulimit -c unlimited
|
|||
# V Print a view of the details of the packet rather than a one-line summary of the packet
|
||||
# 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
|
||||
TSHARK_ARGS="-nVxr"
|
||||
declare -a TSHARK_ARGS=("-nVxr" "-nr")
|
||||
RANDPKT_ARGS="-b 2000 -c 5000"
|
||||
|
||||
NOTFOUND=0
|
||||
|
@ -76,7 +76,9 @@ HOWMANY="forever"
|
|||
if [ $MAX_PASSES -gt 0 ]; then
|
||||
HOWMANY="$MAX_PASSES passes"
|
||||
fi
|
||||
echo "Running $TSHARK with args: $TSHARK_ARGS ($HOWMANY)"
|
||||
echo -n "Running $TSHARK with args: "
|
||||
printf "\"%s\" " "${TSHARK_ARGS[@]}"
|
||||
echo "($HOWMANY)"
|
||||
echo "Running $RANDPKT with args: $RANDPKT_ARGS"
|
||||
echo ""
|
||||
|
||||
|
@ -118,9 +120,13 @@ while [ $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 ] ; do
|
|||
"$RANDPKT" $RANDPKT_ARGS -t $PKT_TYPE $TMP_DIR/$TMP_FILE \
|
||||
> /dev/null 2>&1
|
||||
|
||||
"$TSHARK" $TSHARK_ARGS $TMP_DIR/$TMP_FILE \
|
||||
> /dev/null 2> $TMP_DIR/$ERR_FILE
|
||||
RETVAL=$?
|
||||
for ARGS in "${TSHARK_ARGS[@]}" ; do
|
||||
echo -n "($ARGS) "
|
||||
"$TSHARK" $ARGS $TMP_DIR/$TMP_FILE \
|
||||
> /dev/null 2> $TMP_DIR/$ERR_FILE
|
||||
RETVAL=$?
|
||||
if [ $RETVAL -ge 128 ] ; then break ; fi
|
||||
done
|
||||
grep -i "dissector bug" $TMP_DIR/$ERR_FILE \
|
||||
> /dev/null 2>&1 && DISSECTOR_BUG=1
|
||||
if [ $RETVAL -ne 0 -o $DISSECTOR_BUG -ne 0 ] ; then
|
||||
|
|
Loading…
Reference in New Issue