Module Name: src
Committed By: hannken
Date: Thu Nov 25 14:17:22 UTC 2021
Modified Files:
src/tests/net: net_common.sh
src/tests/net/mpls: t_ldp_regen.sh
src/tests/net/net: t_ipv6_lifetime.sh
Log Message:
Consistently use "drvctl -l qemufwcfg0" to check if
running under qemu in general.
To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/tests/net/net_common.sh
cvs rdiff -u -r1.10 -r1.11 src/tests/net/mpls/t_ldp_regen.sh
cvs rdiff -u -r1.6 -r1.7 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_common.sh
diff -u src/tests/net/net_common.sh:1.42 src/tests/net/net_common.sh:1.43
--- src/tests/net/net_common.sh:1.42 Fri Jul 9 05:54:11 2021
+++ src/tests/net/net_common.sh Thu Nov 25 14:17:22 2021
@@ -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 @@ dump()
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
Index: src/tests/net/mpls/t_ldp_regen.sh
diff -u src/tests/net/mpls/t_ldp_regen.sh:1.10 src/tests/net/mpls/t_ldp_regen.sh:1.11
--- src/tests/net/mpls/t_ldp_regen.sh:1.10 Wed Apr 1 01:51:02 2020
+++ src/tests/net/mpls/t_ldp_regen.sh Thu Nov 25 14:17:22 2021
@@ -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 @@ wait_ldp_ok() {
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
Index: src/tests/net/net/t_ipv6_lifetime.sh
diff -u src/tests/net/net/t_ipv6_lifetime.sh:1.6 src/tests/net/net/t_ipv6_lifetime.sh:1.7
--- src/tests/net/net/t_ipv6_lifetime.sh:1.6 Fri Nov 25 08:51:17 2016
+++ src/tests/net/net/t_ipv6_lifetime.sh Thu Nov 25 14:17:22 2021
@@ -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 @@ basic_body()
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"