Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/net/ndp Improve test stability
details: https://anonhg.NetBSD.org/src/rev/e4d1e5407e21
branches: trunk
changeset: 339914:e4d1e5407e21
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Mon Aug 17 07:47:21 2015 +0000
description:
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.
diffstat:
tests/net/ndp/t_ndp.sh | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (33 lines):
diff -r 549438fe6bd8 -r e4d1e5407e21 tests/net/ndp/t_ndp.sh
--- a/tests/net/ndp/t_ndp.sh Mon Aug 17 07:32:51 2015 +0000
+++ b/tests/net/ndp/t_ndp.sh Mon Aug 17 07:47:21 2015 +0000
@@ -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 @@
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 @@
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
Home |
Main Index |
Thread Index |
Old Index