Module Name: src Committed By: kre Date: Sun Oct 2 15:27:32 UTC 2016
Modified Files: src/tests/net/net: t_ipv6_lifetime.sh Log Message: This test works fine on real hardware, but due to PR kern/43997 (qemu timing problems) fails when run under qemu. Attempt to compensate for that (by skipping the problematic test case) when running in qemu. This should be reverted when the PR gets fixed (either in qemu or in the NetBSD kernel). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/net/net/t_ipv6_lifetime.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/net/t_ipv6_lifetime.sh diff -u src/tests/net/net/t_ipv6_lifetime.sh:1.3 src/tests/net/net/t_ipv6_lifetime.sh:1.4 --- src/tests/net/net/t_ipv6_lifetime.sh:1.3 Fri Sep 16 00:44:14 2016 +++ src/tests/net/net/t_ipv6_lifetime.sh Sun Oct 2 15:27:32 2016 @@ -1,4 +1,4 @@ -# $NetBSD: t_ipv6_lifetime.sh,v 1.3 2016/09/16 00:44:14 ozaki-r Exp $ +# $NetBSD: t_ipv6_lifetime.sh,v 1.4 2016/10/02 15:27:32 kre Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -89,12 +89,23 @@ basic_body() # Shouldn't remain anymore atf_check -s exit:0 -o not-match:"$ip" rump.ifconfig -L shmif0 + # Setting both preferred and valid lifetimes (pltime > vltime) + atf_check -s not-exit:0 -e match:'Invalid argument' rump.ifconfig \ + shmif0 inet6 $ip pltime $(($time * 2)) vltime $time + # Setting both preferred and valid lifetimes (pltime < vltime) atf_check -s exit:0 rump.ifconfig shmif0 inet6 $ip \ pltime $time vltime $((time * 2)) $DEBUG && rump.ifconfig -L shmif0 atf_check -s exit:0 -o match:'pltime' rump.ifconfig -L shmif0 atf_check -s exit:0 -o match:'vltime' rump.ifconfig -L shmif0 + + if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1 + then + atf_check -s exit:0 rump.ifconfig shmif0 inet6 $ip delete + atf_skip "unreliable under qemu, skip until PR kern/43997 fixed" + fi + atf_check -s exit:0 sleep $(($time + $bonus)) $DEBUG && rump.ifconfig -L shmif0 # Should remain but marked as deprecated @@ -104,10 +115,6 @@ basic_body() # Shouldn't remain anymore atf_check -s exit:0 -o not-match:"$ip" rump.ifconfig -L shmif0 - # Setting both preferred and valid lifetimes (pltime > vltime) - atf_check -s not-exit:0 -e match:'Invalid argument' rump.ifconfig \ - shmif0 inet6 $ip pltime $(($time * 2)) vltime $time - return 0 }