aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2006-12-22 13:00:40 +0000
committerBill Meier <wmeier@newsguy.com>2006-12-22 13:00:40 +0000
commitc582bce50de4f01d10267f805fa499ae6a9b21c3 (patch)
tree9d215d2809e99617c78fa8027b7befca19b7f064 /test
parente257cd4437d568d1f33df16da31422252428da98 (diff)
Use interface '1' for the capture tests;
Add additional error output in case any other problems svn path=/trunk/; revision=20197
Diffstat (limited to 'test')
-rw-r--r--test/config.sh2
-rw-r--r--test/suite-capture.sh28
2 files changed, 27 insertions, 3 deletions
diff --git a/test/config.sh b/test/config.sh
index 0ee6d93115..0cb97a2e4b 100644
--- a/test/config.sh
+++ b/test/config.sh
@@ -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)
diff --git a/test/suite-capture.sh b/test/suite-capture.sh
index c210d94417..453b90f5cd 100644
--- a/test/suite-capture.sh
+++ b/test/suite-capture.sh
@@ -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