Module Name:    src
Committed By:   ozaki-r
Date:           Mon Aug 17 07:47:21 UTC 2015

Modified Files:
        src/tests/net/ndp: t_ndp.sh

Log Message:
Improve test stability

A test for ndp -c was sometimes failed because between the deletion
and the check NS/NA messages were exchanged and a NDP cache was
recreated unexpectedly. To provent this situation, we do ifconfig
shmif0 down of the peer before the test, so the test won't be
interfered by the messages.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/net/ndp/t_ndp.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/ndp/t_ndp.sh
diff -u src/tests/net/ndp/t_ndp.sh:1.4 src/tests/net/ndp/t_ndp.sh:1.5
--- src/tests/net/ndp/t_ndp.sh:1.4	Mon Aug 10 09:32:01 2015
+++ src/tests/net/ndp/t_ndp.sh	Mon Aug 17 07:47:21 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ndp.sh,v 1.4 2015/08/10 09:32:01 ozaki-r Exp $
+#	$NetBSD: t_ndp.sh,v 1.5 2015/08/17 07:47:21 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -127,6 +127,13 @@ cache_expiration_body()
 	atf_check -s exit:0 -o match:'23h59m' rump.ndp -n $IP6DST
 }
 
+ifdown_dst_server()
+{
+	export RUMP_SERVER=$SOCKDST
+	atf_check -s exit:0 rump.ifconfig shmif0 down
+	export RUMP_SERVER=$SOCKSRC
+}
+
 command_body()
 {
 	atf_check -s exit:0 ${inetserver} $SOCKSRC
@@ -170,6 +177,9 @@ command_body()
 	atf_check -s exit:0 -o match:'fc00::11' rump.ndp -n -a
 	atf_check -s exit:0 -o match:'fc00::12' rump.ndp -n -a
 
+	# Ensure no packet upsets the src server
+	ifdown_dst_server
+
 	# Flush all entries (-c)
 	$DEBUG && rump.ndp -n -a
 	atf_check -s exit:0 -o ignore rump.ndp -c

Reply via email to