Module Name:    src
Committed By:   ozaki-r
Date:           Fri Sep  4 05:24:57 UTC 2015

Modified Files:
        src/tests/net/net: t_forwarding.sh

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/net/net/t_forwarding.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/net/net/t_forwarding.sh
diff -u src/tests/net/net/t_forwarding.sh:1.6 src/tests/net/net/t_forwarding.sh:1.7
--- src/tests/net/net/t_forwarding.sh:1.6	Fri Aug  7 00:50:12 2015
+++ src/tests/net/net/t_forwarding.sh	Fri Sep  4 05:24:57 2015
@@ -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 @@ test_ping_success()
 	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 @@ test_ping6_success()
 	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()

Reply via email to