]> Savannah Git Hosting - gnulib.git/commitdiff
execute tests: Avoid test failure with GNU make 4.4.
authorBruno Haible <bruno@clisp.org>
Tue, 17 Jan 2023 21:13:36 +0000 (22:13 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 17 Jan 2023 21:13:36 +0000 (22:13 +0100)
Reported by Eric Blake in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-01/msg00157.html>.

* tests/test-execute-main.c (main): Reset the SIGPIPE handler to
default on all platforms.

ChangeLog
tests/test-execute-main.c

index 4ec2207df93943c1ffc10e3fb8689ca0b0bc69be..111c957c1ed81e4161130c1c3513861c047bd7f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-01-17  Bruno Haible  <bruno@clisp.org>
+
+       execute tests: Avoid test failure with GNU make 4.4.
+       Reported by Eric Blake in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2023-01/msg00157.html>.
+       * tests/test-execute-main.c (main): Reset the SIGPIPE handler to
+       default on all platforms.
+
 2023-01-17  Bruno Haible  <bruno@clisp.org>
 
        fflush: Tweak last commit.
index fbaa9c9d2e75bacbe97a6ac7693db1d96bcf3bda..2088408756d6d9e5dfc299177215da3c99361534 100644 (file)
@@ -58,17 +58,16 @@ main (int argc, char *argv[])
   const char *progname = "test-execute-child";
   int test = atoi (argv[2]);
 
-#if defined __ANDROID__
-  /* On Android 11, when this test is executed through 'make' (GNU make 4.4) and
+  /* When this test is executed through 'make' (GNU make 4.4) and
      build-aux/test-driver, i.e. through
        make check TESTS=test-execute.sh
      or
        rm -f test-execute.sh.log; make test-execute.sh.log
-     the signal handler for SIGPIPE is set to SIG_IGN.  This causes the tests
-     3 and 4 to fail.  Work around it by resetting the signal handler for
-     SIGPIPE to the default.  */
+     the signal handler for SIGPIPE is set to SIG_IGN.  This is a bug in
+     GNU make 4.4: <https://savannah.gnu.org/bugs/index.php?63307>.
+     It causes the tests 3 and 4 to fail.  Work around it by resetting
+     the signal handler for SIGPIPE to the default.  */
   signal (SIGPIPE, SIG_DFL);
-#endif
 
   switch (test)
     {