Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make/unit-tests Use plain kill to test signaled child



details:   https://anonhg.NetBSD.org/src/rev/3d4476f9a7ac
branches:  trunk
changeset: 980466:3d4476f9a7ac
user:      sjg <sjg%NetBSD.org@localhost>
date:      Sat Feb 06 04:55:08 2021 +0000

description:
Use plain kill to test signaled child

Recent update to Darwin18 make the test using kill -14
stop working.

Reviewed by: rillig

diffstat:

 usr.bin/make/unit-tests/var-op-shell.exp |   4 ++--
 usr.bin/make/unit-tests/var-op-shell.mk  |  13 +++++--------
 2 files changed, 7 insertions(+), 10 deletions(-)

diffs (40 lines):

diff -r dfe5640adfaa -r 3d4476f9a7ac usr.bin/make/unit-tests/var-op-shell.exp
--- a/usr.bin/make/unit-tests/var-op-shell.exp  Sat Feb 06 00:08:58 2021 +0000
+++ b/usr.bin/make/unit-tests/var-op-shell.exp  Sat Feb 06 04:55:08 2021 +0000
@@ -1,7 +1,7 @@
 make: "var-op-shell.mk" line 28: warning: "echo "failed"; false" returned non-zero status
 make: "var-op-shell.mk" line 34: warning: "false" returned non-zero status
-make: "var-op-shell.mk" line 59: warning: "kill -14 $$" exited on a signal
+make: "var-op-shell.mk" line 56: warning: "kill $$" exited on a signal
 /bin/no/such/command: not found
-make: "var-op-shell.mk" line 65: warning: "/bin/no/such/command" returned non-zero status
+make: "var-op-shell.mk" line 62: warning: "/bin/no/such/command" returned non-zero status
 stderr
 exit status 0
diff -r dfe5640adfaa -r 3d4476f9a7ac usr.bin/make/unit-tests/var-op-shell.mk
--- a/usr.bin/make/unit-tests/var-op-shell.mk   Sat Feb 06 00:08:58 2021 +0000
+++ b/usr.bin/make/unit-tests/var-op-shell.mk   Sat Feb 06 04:55:08 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: var-op-shell.mk,v 1.3 2020/11/09 20:39:46 rillig Exp $
+# $NetBSD: var-op-shell.mk,v 1.4 2021/02/06 04:55:08 sjg Exp $
 #
 # Tests for the != variable assignment operator, which runs its right-hand
 # side through the shell.
@@ -50,13 +50,10 @@
 .  error
 .endif
 
-# NB: The signal number must be numeric since some shells (which ones?) don't
-# accept symbolic signal names.  14 is typically SIGALRM.
-#
-# XXX: The number of the signal is not mentioned in the warning since that
-# would have been difficult to implement; currently the errfmt is a format
-# string containing a single %s conversion.
-OUTPUT!=       kill -14 $$$$
+# This should result in a warning about "exited on a signal".
+# This used to be kill -14 (SIGALRM), but that stopped working on
+# Darwin18 after recent update.
+OUTPUT!=       kill $$$$
 .if ${OUTPUT} != ""
 .  error
 .endif



Home | Main Index | Thread Index | Old Index