From owner-svn-src-all@freebsd.org Mon Mar 20 23:07:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 150B9D15161; Mon, 20 Mar 2017 23:07:36 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFD2B1B6C; Mon, 20 Mar 2017 23:07:35 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2KN7Ypl071358; Mon, 20 Mar 2017 23:07:34 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2KN7Y5n071357; Mon, 20 Mar 2017 23:07:34 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201703202307.v2KN7Y5n071357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 20 Mar 2017 23:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315656 - head/tests/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2017 23:07:36 -0000 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