Module Name:    src
Committed By:   jruoho
Date:           Mon Jul 27 07:36:19 UTC 2020

Modified Files:
        src/tests/sbin/ifconfig: t_random_garbage.sh
        src/tests/sbin/sysctl: t_random_garbage.sh

Log Message:
Use the new "run_unsafe" atf_config_get() option also with a couple of other
tests that are known to be unsafe.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_random_garbage.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/sysctl/t_random_garbage.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/sbin/ifconfig/t_random_garbage.sh
diff -u src/tests/sbin/ifconfig/t_random_garbage.sh:1.3 src/tests/sbin/ifconfig/t_random_garbage.sh:1.4
--- src/tests/sbin/ifconfig/t_random_garbage.sh:1.3	Fri Jul  3 07:03:14 2020
+++ src/tests/sbin/ifconfig/t_random_garbage.sh	Mon Jul 27 07:36:19 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_random_garbage.sh,v 1.3 2020/07/03 07:03:14 jruoho Exp $
+# $NetBSD: t_random_garbage.sh,v 1.4 2020/07/27 07:36:19 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -63,7 +63,9 @@ random_garbage_body() {
 	#
 	# Take care.
 	#
-	atf_skip "The test is not safe (PR kern/55451)"
+	if ! [ $(atf_config_get "run_unsafe" "no") = "yes" ]; then
+		atf_skip "The test is not safe (PR kern/55451)"
+	fi
 
 	opts="advbase advskew broadcast carpdev description \
 	      media mediaopt -mediaopt mode instance metric mtu \

Index: src/tests/sbin/sysctl/t_random_garbage.sh
diff -u src/tests/sbin/sysctl/t_random_garbage.sh:1.3 src/tests/sbin/sysctl/t_random_garbage.sh:1.4
--- src/tests/sbin/sysctl/t_random_garbage.sh:1.3	Fri Jul  3 07:03:14 2020
+++ src/tests/sbin/sysctl/t_random_garbage.sh	Mon Jul 27 07:36:19 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_random_garbage.sh,v 1.3 2020/07/03 07:03:14 jruoho Exp $
+# $NetBSD: t_random_garbage.sh,v 1.4 2020/07/27 07:36:19 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -47,7 +47,9 @@ random_garbage_head() {
 
 random_garbage_body() {
 
-	atf_skip "The test is not safe (PR kern/55451)"
+	if ! [ $(atf_config_get "run_unsafe" "no") = "yes" ]; then
+		atf_skip "The test is not safe (PR kern/55451)"
+	fi
 
 	while read line; do
 
@@ -87,7 +89,9 @@ random_garbage_body() {
 
 random_garbage_cleanup() {
 
-	atf_skip "The test is not safe (PR kern/55451)"
+	if ! [ $(atf_config_get "run_unsafe" "no") = "yes" ]; then
+		atf_skip "The test is not safe (PR kern/55451)"
+	fi
 
 	while read line; do
 		var=$(echo $line | awk '{print $1}')

Reply via email to