forked from osmocom/wireshark
Use interface '1' for the capture tests;
Add additional error output in case any other problems svn path=/trunk/; revision=20197
This commit is contained in:
parent
e257cd4437
commit
c582bce50d
|
@ -47,7 +47,7 @@ DUMPCAP=$WS_BIN_PATH/dumpcap
|
|||
# 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)
|
||||
|
|
|
@ -32,7 +32,6 @@ EXIT_ERROR=2
|
|||
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 &
|
||||
}
|
||||
|
||||
|
@ -55,7 +54,6 @@ capture_step_10packets() {
|
|||
wait # for ping to complete
|
||||
echo
|
||||
cat ./testout.txt
|
||||
echo
|
||||
cat ./pingout.txt
|
||||
# part of the Prerequisite checks
|
||||
# wrong interface ? output the possible interfaces
|
||||
|
@ -76,8 +74,10 @@ capture_step_10packets() {
|
|||
if [ $? -eq 0 ]; then
|
||||
test_step_ok
|
||||
else
|
||||
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
|
||||
|
@ -101,6 +101,10 @@ capture_step_10packets_stdout() {
|
|||
> ./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
|
||||
|
@ -119,8 +123,10 @@ capture_step_10packets_stdout() {
|
|||
test_step_ok
|
||||
else
|
||||
echo
|
||||
wait # for ping to complete
|
||||
cat ./testout.txt
|
||||
cat ./testout2.txt
|
||||
cat ./pingout.txt
|
||||
$TSHARK -D
|
||||
test_step_failed "No or not enough traffic captured. Probably the wrong interface: $TRAFFIC_CAPTURE_IFACE!"
|
||||
fi
|
||||
|
@ -176,6 +182,10 @@ capture_step_2multi_10packets() {
|
|||
|
||||
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
|
||||
|
@ -219,6 +229,13 @@ capture_step_read_filter() {
|
|||
> ./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
|
||||
|
@ -261,6 +278,13 @@ capture_step_snapshot() {
|
|||
> ./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
|
||||
|
|
Loading…
Reference in New Issue