Use interface '1' for the capture tests;
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 22 Dec 2006 13:00:40 +0000 (13:00 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 22 Dec 2006 13:00:40 +0000 (13:00 +0000)
Add additional error output in case any other problems

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20197 f5534014-38df-0310-8fa8-9805f1628bb7

test/config.sh
test/suite-capture.sh

index 0ee6d931158b768153b8cd9ab69ac46b56b60476..0cb97a2e4b7a5e662934a2d1ccd5b853a182be0d 100644 (file)
@@ -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)
index c210d944175761ec0fdf61d6785b1cf77b00b7a4..453b90f5cd9a6400dfb84aa5c0539dcfcfc646b1 100644 (file)
@@ -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