Date: Mon, 20 Mar 2017 23:07:34 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315656 - head/tests/sys/netinet Message-ID: <201703202307.v2KN7Y5n071357@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Mon Mar 20 23:07:34 2017 New Revision: 315656 URL: https://svnweb.freebsd.org/changeset/base/315656 Log: Fix back-to-back runs of sys/netinet/fibs_test;slaac_on_nondefault_fib6 This test was failing if run twice because rtadvd takes too long to die. The rtadvd process from the first run was still running when the second run created its interfaces. The solution is to use SIGKILL during the cleanup instead of SIGTERM so rtadvd will die faster. While I'm here, randomize the addresses used for the test, which makes bugs like this easier to spot, and fix the cleanup order to be the opposite of the setup order PR: 217871 MFC after: 18 days X-MFC-With: 315458 Sponsored by: Spectra Logic Corp Modified: head/tests/sys/netinet/fibs_test.sh Modified: head/tests/sys/netinet/fibs_test.sh ============================================================================== --- head/tests/sys/netinet/fibs_test.sh Mon Mar 20 22:36:28 2017 (r315655) +++ head/tests/sys/netinet/fibs_test.sh Mon Mar 20 23:07:34 2017 (r315656) @@ -451,12 +451,12 @@ slaac_on_nondefault_fib6_head() } slaac_on_nondefault_fib6_body() { - atf_skip "BUG217871 SLAAC on a newly created epair sometimes fails to add routes" # Configure the epair interfaces to use nonrouteable RFC3849 # addresses and non-default FIBs - ADDR="2001:db8::2" - GATEWAY="2001:db8::1" - SUBNET="2001:db8:" + PREFIX="2001:db8:$(printf "%x" `jot -r 1 0 65535`):$(printf "%x" `jot -r 1 0 65535`)" + ADDR="$PREFIX::2" + GATEWAY="$PREFIX::1" + SUBNET="$PREFIX:" MASK="64" # Check system configuration @@ -509,19 +509,23 @@ slaac_on_nondefault_fib6_body() } slaac_on_nondefault_fib6_cleanup() { - cleanup_ifaces if [ -f "rtadvd.pid" ]; then - pkill -F rtadvd.pid + # rtadvd can take a long time to shutdown. Use SIGKILL to kill + # it right away. The downside to using SIGKILL is that it + # won't send final RAs to all interfaces, but we don't care + # because we're about to destroy its interface anyway. + pkill -kill -F rtadvd.pid rm -f rtadvd.pid fi - if [ -f "rfc6204w3.state" ] ; then - sysctl "net.inet6.ip6.rfc6204w3"=`cat "rfc6204w3.state"` - rm "rfc6204w3.state" - fi + cleanup_ifaces if [ -f "forwarding.state" ] ; then sysctl "net.inet6.ip6.forwarding"=`cat "forwarding.state"` rm "forwarding.state" fi + if [ -f "rfc6204w3.state" ] ; then + sysctl "net.inet6.ip6.rfc6204w3"=`cat "rfc6204w3.state"` + rm "rfc6204w3.state" + fi } # Regression test for kern/187550
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703202307.v2KN7Y5n071357>