Source-Changes-HG archive

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

[src/trunk]: src/tests/sbin/sysctl Skip a few more nodes, and enable this tes...



details:   https://anonhg.NetBSD.org/src/rev/6fe83dcb611a
branches:  trunk
changeset: 935331:6fe83dcb611a
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue Jun 30 11:49:26 2020 +0000

description:
Skip a few more nodes, and enable this test for Qemu runs.

diffstat:

 tests/sbin/sysctl/t_random_garbage.sh |  24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diffs (56 lines):

diff -r 3da74360e8f9 -r 6fe83dcb611a tests/sbin/sysctl/t_random_garbage.sh
--- a/tests/sbin/sysctl/t_random_garbage.sh     Tue Jun 30 11:48:20 2020 +0000
+++ b/tests/sbin/sysctl/t_random_garbage.sh     Tue Jun 30 11:49:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_random_garbage.sh,v 1.1 2020/06/27 08:50:46 jruoho Exp $
+# $NetBSD: t_random_garbage.sh,v 1.2 2020/06/30 11:49:26 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -46,18 +46,32 @@
 
 random_garbage_body() {
 
-       atf_skip "The test is not safe"
+       sysctl machdep.cpu_brand 2>/dev/null | grep "QEMU"
+
+       if [ $? -eq 1 ]; then
+               atf_skip "The test is not safe"
+       fi
 
        while read line; do
 
                var=$(echo $line | awk '{print $1}')
 
                case $var in
+                       hw.acpi.sleep.state)
+                       echo "Skipping $var"
+                       continue
+                       ;;
+
                        kern.securelevel*)
                        echo "Skipping $var"
                        continue
                        ;;
 
+                       kern.veriexec.strict)
+                       echo "Skipping $var"
+                       continue
+                       ;;
+
                        security*)
                        echo "Skipping $var"
                        continue
@@ -76,7 +90,11 @@
 
 random_garbage_cleanup() {
 
-       atf_skip "The test is not safe"
+       sysctl machdep.cpu_brand 2>/dev/null | grep "QEMU"
+
+       if [ $? -eq 1 ]; then
+               atf_skip "The test is not safe"
+       fi
 
        while read line; do
                var=$(echo $line | awk '{print $1}')



Home | Main Index | Thread Index | Old Index