Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/net/net This test works fine on real hardware, but due...



details:   https://anonhg.NetBSD.org/src/rev/261d2bb6a657
branches:  trunk
changeset: 818188:261d2bb6a657
user:      kre <kre%NetBSD.org@localhost>
date:      Sun Oct 02 15:27:32 2016 +0000

description:
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).

diffstat:

 tests/net/net/t_ipv6_lifetime.sh |  17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r 56f8b2aad488 -r 261d2bb6a657 tests/net/net/t_ipv6_lifetime.sh
--- a/tests/net/net/t_ipv6_lifetime.sh  Sun Oct 02 14:38:46 2016 +0000
+++ b/tests/net/net/t_ipv6_lifetime.sh  Sun Oct 02 15:27:32 2016 +0000
@@ -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 @@
        # 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 @@
        # 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
 }
 



Home | Main Index | Thread Index | Old Index