From 6d881f008253fa18022587f4d3d74df314695143 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 17 Jan 2023 22:13:36 +0100 Subject: [PATCH] execute tests: Avoid test failure with GNU make 4.4. Reported by Eric Blake in . * tests/test-execute-main.c (main): Reset the SIGPIPE handler to default on all platforms. --- ChangeLog | 8 ++++++++ tests/test-execute-main.c | 11 +++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ec2207df9..111c957c1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2023-01-17 Bruno Haible + + execute tests: Avoid test failure with GNU make 4.4. + Reported by Eric Blake in + . + * tests/test-execute-main.c (main): Reset the SIGPIPE handler to + default on all platforms. + 2023-01-17 Bruno Haible fflush: Tweak last commit. diff --git a/tests/test-execute-main.c b/tests/test-execute-main.c index fbaa9c9d2e..2088408756 100644 --- a/tests/test-execute-main.c +++ b/tests/test-execute-main.c @@ -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: . + 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) { -- 2.39.5