Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/net Bump timeout for ping and ping6 to 5 sec



details:   https://anonhg.NetBSD.org/src/rev/c13051dc1d60
branches:  trunk
changeset: 808664:c13051dc1d60
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri May 29 02:06:46 2015 +0000

description:
Bump timeout for ping and ping6 to 5 sec

Hope the wait is enough for slow machines, e.g., qemu/anita/i386.

diffstat:

 tests/net/if_bridge/t_bridge.sh |  32 +++++++++++++------------
 tests/net/net/t_forwarding.sh   |  51 ++++++++++++++++++++--------------------
 2 files changed, 43 insertions(+), 40 deletions(-)

diffs (263 lines):

diff -r 2148383990a2 -r c13051dc1d60 tests/net/if_bridge/t_bridge.sh
--- a/tests/net/if_bridge/t_bridge.sh   Fri May 29 01:54:56 2015 +0000
+++ b/tests/net/if_bridge/t_bridge.sh   Fri May 29 02:06:46 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_bridge.sh,v 1.5 2015/05/29 01:54:56 ozaki-r Exp $
+#      $NetBSD: t_bridge.sh,v 1.6 2015/05/29 02:06:46 ozaki-r Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,6 +36,8 @@
 IP61=fc00::1
 IP62=fc00::2
 
+TIMEOUT=5
+
 atf_test_case basic cleanup
 atf_test_case basic6 cleanup
 atf_test_case rtable cleanup
@@ -89,10 +91,10 @@
        atf_check -s exit:0 -o match:shmif0 rump.ifconfig
        if [ $mode = "ipv6" ]; then
                export LD_PRELOAD=/usr/lib/librumphijack.so
-               atf_check -s exit:0 -o ignore ping6 -n -c 1 -X 1 ${addr}
+               atf_check -s exit:0 -o ignore ping6 -n -c 1 -X $TIMEOUT ${addr}
                unset LD_PRELOAD
        else
-               atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 ${addr}
+               atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 ${addr}
        fi
 }
 
@@ -222,21 +224,21 @@
 test_ping_failure()
 {
        export RUMP_SERVER=$SOCK1
-       atf_check -s not-exit:0 -o ignore rump.ping -q -n -w 1 -c 1 $IP2
+       atf_check -s not-exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP2
        export RUMP_SERVER=$SOCK3
-       atf_check -s not-exit:0 -o ignore rump.ping -q -n -w 1 -c 1 $IP1
+       atf_check -s not-exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP1
 }
 
 test_ping_success()
 {
        export RUMP_SERVER=$SOCK1
        rump.ifconfig -v shmif0
-       atf_check -s exit:0 -o ignore rump.ping -q -n -w 1 -c 1 $IP2
+       atf_check -s exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP2
        rump.ifconfig -v shmif0
 
        export RUMP_SERVER=$SOCK3
        rump.ifconfig -v shmif0
-       atf_check -s exit:0 -o ignore rump.ping -q -n -w 1 -c 1 $IP1
+       atf_check -s exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP1
        rump.ifconfig -v shmif0
 }
 
@@ -244,9 +246,9 @@
 {
        export LD_PRELOAD=/usr/lib/librumphijack.so
        export RUMP_SERVER=$SOCK1
-       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X 1 $IP62
+       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP62
        export RUMP_SERVER=$SOCK3
-       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X 1 $IP61
+       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP61
        unset LD_PRELOAD
 }
 
@@ -255,14 +257,14 @@
        export RUMP_SERVER=$SOCK1
        rump.ifconfig -v shmif0
        export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X 1 $IP62
+       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP62
        unset LD_PRELOAD
        rump.ifconfig -v shmif0
 
        export RUMP_SERVER=$SOCK3
        rump.ifconfig -v shmif0
        export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X 1 $IP61
+       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP61
        unset LD_PRELOAD
        rump.ifconfig -v shmif0
 }
@@ -288,7 +290,7 @@
 
        # Refill the MAC addresses of the endpoints.
        export RUMP_SERVER=$SOCK1
-       atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 $IP2
+       atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP2
        export RUMP_SERVER=$SOCK2
        export LD_PRELOAD=/usr/lib/librumphijack.so
        /sbin/brconfig bridge0
@@ -318,7 +320,7 @@
 
        # Test we can cache two addresses again
        export RUMP_SERVER=$SOCK1
-       atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 $IP2
+       atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP2
        export RUMP_SERVER=$SOCK2
        export LD_PRELOAD=/usr/lib/librumphijack.so
        /sbin/brconfig bridge0
@@ -383,7 +385,7 @@
 
        # Make the bridge learn the MAC addresses of the endpoints.
        export RUMP_SERVER=$SOCK1
-       atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 $IP2
+       atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP2
        unset RUMP_SERVER
 
        # Tests the addresses are in the cache.
@@ -402,7 +404,7 @@
 
        # Refill the MAC addresses of the endpoints.
        export RUMP_SERVER=$SOCK1
-       atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 $IP2
+       atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP2
        unset RUMP_SERVER
        export RUMP_SERVER=$SOCK2
        export LD_PRELOAD=/usr/lib/librumphijack.so
diff -r 2148383990a2 -r c13051dc1d60 tests/net/net/t_forwarding.sh
--- a/tests/net/net/t_forwarding.sh     Fri May 29 01:54:56 2015 +0000
+++ b/tests/net/net/t_forwarding.sh     Fri May 29 02:06:46 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_forwarding.sh,v 1.3 2015/05/27 01:12:04 ozaki-r Exp $
+#      $NetBSD: t_forwarding.sh,v 1.4 2015/05/29 02:06:46 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -41,6 +41,7 @@
 IP6DST=fc00:0:0:2::2
 
 DEBUG=false
+TIMEOUT=5
 
 atf_test_case basic cleanup
 atf_test_case basic6 cleanup
@@ -94,10 +95,10 @@
        atf_check -s exit:0 -o match:shmif0 rump.ifconfig
        if [ $mode = "ipv6" ]; then
                export LD_PRELOAD=/usr/lib/librumphijack.so
-               atf_check -s exit:0 -o ignore ping6 -n -c 1 -X 1 ${addr}
+               atf_check -s exit:0 -o ignore ping6 -n -c 1 -X $TIMEOUT ${addr}
                unset LD_PRELOAD
        else
-               atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 ${addr}
+               atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 ${addr}
        fi
 }
 
@@ -164,8 +165,8 @@
        atf_check -s exit:0 -o match:shmif0 rump.ifconfig
        atf_check -s exit:0 -o match:shmif1 rump.ifconfig
 
-       atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 ${IP4SRCGW}
-       atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 ${IP4DSTGW}
+       atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 ${IP4SRCGW}
+       atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 ${IP4DSTGW}
 }
 
 test_setup6()
@@ -178,8 +179,8 @@
        atf_check -s exit:0 -o match:shmif1 rump.ifconfig
 
        export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -n -c 1 -X 1 ${IP6SRCGW}
-       atf_check -s exit:0 -o ignore ping6 -n -c 1 -X 1 ${IP6DSTGW}
+       atf_check -s exit:0 -o ignore ping6 -n -c 1 -X $TIMEOUT ${IP6SRCGW}
+       atf_check -s exit:0 -o ignore ping6 -n -c 1 -X $TIMEOUT ${IP6DSTGW}
        unset LD_PRELOAD
 }
 
@@ -253,23 +254,23 @@
 test_ping_failure()
 {
        export RUMP_SERVER=$SOCKSRC
-       atf_check -s not-exit:0 -o ignore rump.ping -q -n -w 1 -c 1 $IP4DST
+       atf_check -s not-exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP4DST
        export RUMP_SERVER=$SOCKDST
-       atf_check -s not-exit:0 -o ignore rump.ping -q -n -w 1 -c 1 $IP4SRC
+       atf_check -s not-exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP4SRC
 }
 
 test_ping_success()
 {
        export RUMP_SERVER=$SOCKSRC
        $DEBUG && rump.ifconfig -v shmif0
-       atf_check -s exit:0 -o ignore rump.ping -q -n -w 1 -c 1 $IP4SRCGW
-       atf_check -s exit:0 -o ignore rump.ping -q -n -w 1 -c 1 $IP4DST
+       atf_check -s exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP4SRCGW
+       atf_check -s exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP4DST
        $DEBUG && rump.ifconfig -v shmif0
 
        export RUMP_SERVER=$SOCKDST
        $DEBUG && rump.ifconfig -v shmif0
-       atf_check -s exit:0 -o ignore rump.ping -q -n -w 1 -c 1 $IP4DSTGW
-       atf_check -s exit:0 -o ignore rump.ping -q -n -w 1 -c 1 $IP4SRC
+       atf_check -s exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP4DSTGW
+       atf_check -s exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP4SRC
        $DEBUG && rump.ifconfig -v shmif0
 }
 
@@ -277,9 +278,9 @@
 {
        export RUMP_SERVER=$SOCKSRC
        $DEBUG && rump.ifconfig -v shmif0
-       atf_check -s exit:0 -o ignore rump.ping -q -n -w 1 -c 1 -T 1 $IP4SRCGW
-       atf_check -s not-exit:0 -o ignore rump.ping -q -n -w 1 -c 1 -T 1 $IP4DST
-       atf_check -s exit:0 -o ignore rump.ping -q -n -w 1 -c 1 -T 2 $IP4DST
+       atf_check -s exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 -T 1 $IP4SRCGW
+       atf_check -s not-exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 -T 1 $IP4DST
+       atf_check -s exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 -T 2 $IP4DST
        $DEBUG && rump.ifconfig -v shmif0
 }
 
@@ -287,9 +288,9 @@
 {
        export LD_PRELOAD=/usr/lib/librumphijack.so
        export RUMP_SERVER=$SOCKSRC
-       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X 1 $IP6DST
+       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6DST
        export RUMP_SERVER=$SOCKDST
-       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X 1 $IP6SRC
+       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6SRC
        unset LD_PRELOAD
 }
 
@@ -298,16 +299,16 @@
        export RUMP_SERVER=$SOCKSRC
        $DEBUG && rump.ifconfig -v shmif0
        export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X 1 $IP6SRCGW
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X 1 $IP6DST
+       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6SRCGW
+       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6DST
        unset LD_PRELOAD
        $DEBUG && rump.ifconfig -v shmif0
 
        export RUMP_SERVER=$SOCKDST
        $DEBUG && rump.ifconfig -v shmif0
        export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X 1 $IP6DSTGW
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X 1 $IP6SRC
+       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6DSTGW
+       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -X $TIMEOUT $IP6SRC
        unset LD_PRELOAD
        $DEBUG && rump.ifconfig -v shmif0
 }
@@ -317,9 +318,9 @@
        export RUMP_SERVER=$SOCKSRC
        $DEBUG && rump.ifconfig -v shmif0
        export LD_PRELOAD=/usr/lib/librumphijack.so
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -h 1 -X 1 $IP6SRCGW
-       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -h 1 -X 1 $IP6DST
-       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -h 2 -X 1 $IP6DST
+       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -h 1 -X $TIMEOUT $IP6SRCGW
+       atf_check -s not-exit:0 -o ignore ping6 -q -n -c 1 -h 1 -X $TIMEOUT $IP6DST
+       atf_check -s exit:0 -o ignore ping6 -q -n -c 1 -h 2 -X $TIMEOUT $IP6DST
        unset LD_PRELOAD
        $DEBUG && rump.ifconfig -v shmif0
 }



Home | Main Index | Thread Index | Old Index