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 stability of the tests
details: https://anonhg.NetBSD.org/src/rev/7a7127a310bc
branches: trunk
changeset: 349603:7a7127a310bc
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Fri Dec 16 03:14:23 2016 +0000
description:
Improve stability of the tests
- Do ifconfig -w 10 after ifconfig up
- Accept /1d0h0m..s/ in addition to /23h59m..s/ for expiration time
- Prevent new RA messages from coming after flushing entries
The changes should fix flapping of test results on babylon5.
diffstat:
tests/net/ndp/t_ra.sh | 37 +++++++++++++++----------------------
1 files changed, 15 insertions(+), 22 deletions(-)
diffs (112 lines):
diff -r ec8dd3db9792 -r 7a7127a310bc tests/net/ndp/t_ra.sh
--- a/tests/net/ndp/t_ra.sh Fri Dec 16 01:42:04 2016 +0000
+++ b/tests/net/ndp/t_ra.sh Fri Dec 16 03:14:23 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_ra.sh,v 1.7 2016/12/14 07:37:26 ozaki-r Exp $
+# $NetBSD: t_ra.sh,v 1.8 2016/12/16 03:14:23 ozaki-r Exp $
#
# Copyright (c) 2015 Internet Initiative Japan Inc.
# All rights reserved.
@@ -43,6 +43,7 @@
export RUMP_SERVER=$sock
atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6ADDR}
atf_check -s exit:0 rump.ifconfig shmif0 up
+ atf_check -s exit:0 rump.ifconfig -w 10
$DEBUG && rump.ifconfig
}
@@ -144,7 +145,7 @@
atf_check -s exit:0 -o match:'if=shmif0' rump.ndp -r
atf_check -s exit:0 -o match:'advertised' rump.ndp -p
atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
- atf_check -s exit:0 -o match:'23h59m..s S R' rump.ndp -n -a
+ atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a
atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a
atf_check -s exit:0 -o match:'fc00:1:' rump.ifconfig shmif0 inet6
unset RUMP_SERVER
@@ -208,10 +209,14 @@
atf_check -s exit:0 -o match:'if=shmif0' rump.ndp -r
atf_check -s exit:0 -o match:'advertised' rump.ndp -p
atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
- atf_check -s exit:0 -o match:'23h59m..s S R' rump.ndp -n -a
+ atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a
atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a
atf_check -s exit:0 -o match:'fc00:1:' rump.ifconfig shmif0 inet6
+ # Terminate rtadvd to prevent new RA messages from coming
+ # Note that ifconfig down; kill -TERM doesn't work
+ kill -KILL `cat ${PIDFILE}`
+
# Flush all the entries in the prefix list
atf_check -s exit:0 rump.ndp -P
@@ -219,25 +224,17 @@
atf_check -s exit:0 -o match:'if=shmif0' rump.ndp -r
atf_check -s exit:0 -o empty rump.ndp -p
atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
- atf_check -s exit:0 -o match:'23h59m..s S R' rump.ndp -n -a
+ atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a
atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a
atf_check -s exit:0 -o not-match:'fc00:1:' rump.ifconfig shmif0 inet6
unset RUMP_SERVER
- atf_check -s exit:0 kill -TERM `cat ${PIDFILE}`
- wait_term ${PIDFILE}
-
rump_server_destroy_ifaces
}
ra_flush_prefix_entries_cleanup()
{
- if [ -f ${PIDFILE} ]; then
- kill -TERM `cat ${PIDFILE}`
- wait_term ${PIDFILE}
- fi
-
$DEBUG && dump
cleanup
}
@@ -283,10 +280,14 @@
atf_check -s exit:0 -o match:'if=shmif0' rump.ndp -r
atf_check -s exit:0 -o match:'advertised' rump.ndp -p
atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
- atf_check -s exit:0 -o match:'23h59m..s S R' rump.ndp -n -a
+ atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a
atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a
atf_check -s exit:0 -o match:'fc00:1:' rump.ifconfig shmif0 inet6
+ # Terminate rtadvd to prevent new RA messages from coming
+ # Note that ifconfig down; kill -TERM doesn't work
+ kill -KILL `cat ${PIDFILE}`
+
# Flush all the entries in the default router list
atf_check -s exit:0 rump.ndp -R
@@ -294,25 +295,17 @@
atf_check -s exit:0 -o empty rump.ndp -r
atf_check -s exit:0 -o match:'No advertising router' rump.ndp -p
atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0
- atf_check -s exit:0 -o match:'23h59m..s S R' rump.ndp -n -a
+ atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a
atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a
atf_check -s exit:0 -o match:'fc00:1:' rump.ifconfig shmif0 inet6
unset RUMP_SERVER
- atf_check -s exit:0 kill -TERM `cat ${PIDFILE}`
- wait_term ${PIDFILE}
-
rump_server_destroy_ifaces
}
ra_flush_defrouter_entries_cleanup()
{
- if [ -f ${PIDFILE} ]; then
- kill -TERM `cat ${PIDFILE}`
- wait_term ${PIDFILE}
- fi
-
$DEBUG && dump
cleanup
}
Home |
Main Index |
Thread Index |
Old Index