Add additional error output in case any other problems
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20197
f5534014-38df-0310-8fa8-
9805f1628bb7
# interface with at least a few packets/sec traffic on it
# (e.g. start a web radio to generate some traffic :-)
# an interfaces index (1 based) should do well for recent devbuilds
# interface with at least a few packets/sec traffic on it
# (e.g. start a web radio to generate some traffic :-)
# an interfaces index (1 based) should do well for recent devbuilds
-TRAFFIC_CAPTURE_IFACE=${TRAFFIC_CAPTURE_IFACE:-3}
+TRAFFIC_CAPTURE_IFACE=${TRAFFIC_CAPTURE_IFACE:-1}
# time to capture some traffic (in seconds)
# (you may increase this if you get errors caused by very low traffic)
# time to capture some traffic (in seconds)
# (you may increase this if you get errors caused by very low traffic)
traffic_gen_ping() {
# Generate some traffic for quiet networks.
# This will have to be adjusted for non-Windows systems.
traffic_gen_ping() {
# Generate some traffic for quiet networks.
# This will have to be adjusted for non-Windows systems.
-## ping -n 20 www.wireshark.org > /dev/null 2>&1 &
ping -n 20 www.wireshark.org > ./pingout.txt 2>&1 &
}
ping -n 20 www.wireshark.org > ./pingout.txt 2>&1 &
}
wait # for ping to complete
echo
cat ./testout.txt
wait # for ping to complete
echo
cat ./testout.txt
cat ./pingout.txt
# part of the Prerequisite checks
# wrong interface ? output the possible interfaces
cat ./pingout.txt
# part of the Prerequisite checks
# wrong interface ? output the possible interfaces
if [ $? -eq 0 ]; then
test_step_ok
else
if [ $? -eq 0 ]; then
test_step_ok
else
+ wait # for ping to complete
# part of the Prerequisite checks
# probably wrong interface, output the possible interfaces
$TSHARK -D
# part of the Prerequisite checks
# probably wrong interface, output the possible interfaces
$TSHARK -D
> ./testout.pcap 2>./testout.txt
RETURNVALUE=$?
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
> ./testout.pcap 2>./testout.txt
RETURNVALUE=$?
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
+ wait # for ping to complete
+ echo
+ cat ./testout.txt
+ cat ./pingout.txt
$TSHARK -D
test_step_failed "exit status of $DUT: $RETURNVALUE"
return
$TSHARK -D
test_step_failed "exit status of $DUT: $RETURNVALUE"
return
+ wait # for ping to complete
cat ./testout.txt
cat ./testout2.txt
cat ./testout.txt
cat ./testout2.txt
$TSHARK -D
test_step_failed "No or not enough traffic captured. Probably the wrong interface: $TRAFFIC_CAPTURE_IFACE!"
fi
$TSHARK -D
test_step_failed "No or not enough traffic captured. Probably the wrong interface: $TRAFFIC_CAPTURE_IFACE!"
fi
RETURNVALUE=$?
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
RETURNVALUE=$?
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
+ wait # for ping to complete
+ echo
+ cat ./testout.txt
+ cat ./pingout.txt
# part of the Prerequisite checks
# probably wrong interface, output the possible interfaces
$TSHARK -D
# part of the Prerequisite checks
# probably wrong interface, output the possible interfaces
$TSHARK -D
> ./testout.txt 2>&1
RETURNVALUE=$?
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
> ./testout.txt 2>&1
RETURNVALUE=$?
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
+ wait # for ping to complete
+ echo
+ cat ./testout.txt
+ cat ./pingout.txt
+ # part of the Prerequisite checks
+ # wrong interface ? output the possible interfaces
+ $TSHARK -D
test_step_failed "exit status: $RETURNVALUE"
return
fi
test_step_failed "exit status: $RETURNVALUE"
return
fi
> ./testout.txt 2>&1
RETURNVALUE=$?
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
> ./testout.txt 2>&1
RETURNVALUE=$?
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
+ wait # for ping to complete
+ echo
+ cat ./testout.txt
+ cat ./pingout.txt
+ # part of the Prerequisite checks
+ # wrong interface ? output the possible interfaces
+ $TSHARK -D
test_step_failed "exit status: $RETURNVALUE"
return
fi
test_step_failed "exit status: $RETURNVALUE"
return
fi