Source-Changes-HG archive

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

[src/trunk]: src/tests/net/net Add tests to check if nexthop route lookup works



details:   https://anonhg.NetBSD.org/src/rev/8753fab53bd8
branches:  trunk
changeset: 340420:8753fab53bd8
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Sep 04 05:24:57 2015 +0000

description:
Add tests to check if nexthop route lookup works

These tests reproduce a panic on assertion "ro->_ro_rt ==NULL ||
ro->_ro_rt->rt_refcnt > 0" failure that had been fixed.

diffstat:

 tests/net/net/t_forwarding.sh |  20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r eeaa68f80967 -r 8753fab53bd8 tests/net/net/t_forwarding.sh
--- a/tests/net/net/t_forwarding.sh     Fri Sep 04 05:13:32 2015 +0000
+++ b/tests/net/net/t_forwarding.sh     Fri Sep 04 05:24:57 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_forwarding.sh,v 1.6 2015/08/07 00:50:12 ozaki-r Exp $
+#      $NetBSD: t_forwarding.sh,v 1.7 2015/09/04 05:24:57 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -268,6 +268,15 @@
        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
+
+       # Check if nexthop lookup involving a rtentry creation
+       # on sending a packet works
+       export RUMP_SERVER=$SOCKSRC
+       $DEBUG && rump.netstat -nr
+       atf_check -s exit:0 -o ignore rump.route delete $IP4SRCGW
+       $DEBUG && rump.netstat -nr
+       atf_check -s exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 2 $IP4DST
+       $DEBUG && rump.netstat -nr
 }
 
 test_ttl()
@@ -302,6 +311,15 @@
        atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP6DSTGW
        atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 1 -X $TIMEOUT $IP6SRC
        $DEBUG && rump.ifconfig -v shmif0
+
+       # Check if nexthop lookup involving a rtentry creation
+       # on sending a packet works
+       export RUMP_SERVER=$SOCKSRC
+       $DEBUG && rump.netstat -nr
+       atf_check -s exit:0 -o ignore rump.route delete -inet6 $IP6SRCGW
+       $DEBUG && rump.netstat -nr
+       atf_check -s exit:0 -o ignore rump.ping6 -q -n -c 2 -X $TIMEOUT $IP6DST
+       $DEBUG && rump.netstat -nr
 }
 
 test_hoplimit()



Home | Main Index | Thread Index | Old Index