Source-Changes-HG archive

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

[src/trunk]: src/tests/net Consistently use "drvctl -l qemufwcfg0" to check if



details:   https://anonhg.NetBSD.org/src/rev/da364d72f4ff
branches:  trunk
changeset: 1026451:da364d72f4ff
user:      hannken <hannken%NetBSD.org@localhost>
date:      Thu Nov 25 14:17:22 2021 +0000

description:
Consistently use "drvctl -l qemufwcfg0" to check if
running under qemu in general.

diffstat:

 tests/net/mpls/t_ldp_regen.sh    |  4 ++--
 tests/net/net/t_ipv6_lifetime.sh |  4 ++--
 tests/net/net_common.sh          |  4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r fd78c7145603 -r da364d72f4ff tests/net/mpls/t_ldp_regen.sh
--- a/tests/net/mpls/t_ldp_regen.sh     Thu Nov 25 10:31:50 2021 +0000
+++ b/tests/net/mpls/t_ldp_regen.sh     Thu Nov 25 14:17:22 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_ldp_regen.sh,v 1.10 2020/04/01 01:51:02 christos Exp $
+# $NetBSD: t_ldp_regen.sh,v 1.11 2021/11/25 14:17:22 hannken Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -139,7 +139,7 @@
 
 ldp_regen_body() {
 
-        if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1
+       if drvctl -l qemufwcfg0 >/dev/null 2>&1
        then
            atf_skip "unreliable under qemu, skip until PR kern/43997 fixed"
        fi
diff -r fd78c7145603 -r da364d72f4ff tests/net/net/t_ipv6_lifetime.sh
--- a/tests/net/net/t_ipv6_lifetime.sh  Thu Nov 25 10:31:50 2021 +0000
+++ b/tests/net/net/t_ipv6_lifetime.sh  Thu Nov 25 14:17:22 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipv6_lifetime.sh,v 1.6 2016/11/25 08:51:17 ozaki-r Exp $
+#      $NetBSD: t_ipv6_lifetime.sh,v 1.7 2021/11/25 14:17:22 hannken Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -97,7 +97,7 @@
        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
+       if drvctl -l qemufwcfg0 >/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"
diff -r fd78c7145603 -r da364d72f4ff tests/net/net_common.sh
--- a/tests/net/net_common.sh   Thu Nov 25 10:31:50 2021 +0000
+++ b/tests/net/net_common.sh   Thu Nov 25 14:17:22 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: net_common.sh,v 1.42 2021/07/09 05:54:11 yamaguchi Exp $
+#      $NetBSD: net_common.sh,v 1.43 2021/11/25 14:17:22 hannken Exp $
 #
 # Copyright (c) 2016 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -537,7 +537,7 @@
 
 skip_if_qemu()
 {
-       if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1
+       if drvctl -l qemufwcfg0 >/dev/null 2>&1
        then
            atf_skip "unreliable under qemu, skip until PR kern/43997 fixed"
        fi



Home | Main Index | Thread Index | Old Index