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 Remove "pkill -9 execsnoop". It's ...



details:   https://anonhg.NetBSD.org/src/rev/22e8b9a6786e
branches:  trunk
changeset: 984836:22e8b9a6786e
user:      gson <gson%NetBSD.org@localhost>
date:      Sun Jul 25 10:21:44 2021 +0000

description:
Remove "pkill -9 execsnoop".  It's wrong on so many levels: first of
all, it does not actually kill anything because the process executing
the execsnoop script is called "sh", not "execsnoop".  And even if it
would somehow kill the shell running the execsnoop script, it still
would not kill the dtrace child process.  On the other hand, if there
happened to be an unrelated process actually called "execsnoop", it
would kill that.

The actual killing of the execsnoop sh and dtrace processes happens in
the ATF cleanup stage (as it always has).

diffstat:

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

diffs (18 lines):

diff -r 8faa193f5fe4 -r 22e8b9a6786e tests/usr.sbin/execsnoop/t_execsnoop.sh
--- a/tests/usr.sbin/execsnoop/t_execsnoop.sh   Sun Jul 25 10:11:32 2021 +0000
+++ b/tests/usr.sbin/execsnoop/t_execsnoop.sh   Sun Jul 25 10:21:44 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.6 2021/07/25 10:11:32 gson Exp $
+# $NetBSD: t_execsnoop.sh,v 1.7 2021/07/25 10:21:44 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -49,8 +49,6 @@
        done
 
        sleep 5
-       pkill -9 execsnoop
-       sleep 1
 
        if [ ! $(cat $tmp | grep "whoami" | wc -l) -eq 10 ]; then
                atf_fail "execsnoop does not work"



Home | Main Index | Thread Index | Old Index