Source-Changes-HG archive

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

[src/trunk]: src/tests/usr.sbin/execsnoop Skip the test when the dtrace_sysca...



details:   https://anonhg.NetBSD.org/src/rev/62b99a7c754c
branches:  trunk
changeset: 984901:62b99a7c754c
user:      gson <gson%NetBSD.org@localhost>
date:      Thu Jul 29 14:58:35 2021 +0000

description:
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.

diffstat:

 tests/usr.sbin/execsnoop/t_execsnoop.sh |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 512dcc2125de -r 62b99a7c754c tests/usr.sbin/execsnoop/t_execsnoop.sh
--- a/tests/usr.sbin/execsnoop/t_execsnoop.sh   Thu Jul 29 13:42:38 2021 +0000
+++ b/tests/usr.sbin/execsnoop/t_execsnoop.sh   Thu Jul 29 14:58:35 2021 +0000
@@ -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_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



Home | Main Index | Thread Index | Old Index