Module Name:    src
Committed By:   gson
Date:           Thu Jul 29 14:58:35 UTC 2021

Modified Files:
        src/tests/usr.sbin/execsnoop: t_execsnoop.sh

Log Message:
Skip the test when the dtrace_syscall module is not loaded and can't
be autoloaded, as may be the case on arm because securelevel.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.sbin/execsnoop/t_execsnoop.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/usr.sbin/execsnoop/t_execsnoop.sh
diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.10 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.11
--- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.10	Tue Jul 27 15:29:22 2021
+++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh	Thu Jul 29 14:58:35 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.10 2021/07/27 15:29:22 gson Exp $
+# $NetBSD: t_execsnoop.sh,v 1.11 2021/07/29 14:58:35 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -38,6 +38,13 @@ basic_head() {
 }
 
 basic_body() {
+	if
+		! modstat dtrace_syscall | grep dtrace_syscall &&
+		! modstat -A
+	then
+		atf_skip "dtrace_syscall module not loaded and can't be autoloaded"
+	fi
+
 	n=10
 	atf_check -s exit:0 -o ignore -e empty -x "execsnoop >$stdout 2>$stderr &"
 	sleep 5

Reply via email to