From 2310b1c2c8b2f32db238f667747e7d5672480f4a Mon Sep 17 00:00:00 2001 From: Keith Moyer Date: Tue, 19 Feb 2019 02:48:41 -0800 Subject: [PATCH] Ignore SIGCHLD in test setup script SIGCHLD is expected when a subprocess ends, and is not indicative of a failure. So, when trapping on signals to detect issues, do not trap on this signal. This has become important with Bash 5, as it has begun propagating this signal up to this level. Closes #7461. Closes #7441. Progress on #7410 when XML splitting is disabled. PiperOrigin-RevId: 234568715 --- tools/test/test-setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/test/test-setup.sh b/tools/test/test-setup.sh index 05a0d26223c3c8..92e9a38c5ed1ca 100755 --- a/tools/test/test-setup.sh +++ b/tools/test/test-setup.sh @@ -270,6 +270,8 @@ if [[ "${EXPERIMENTAL_SPLIT_XML_GENERATION}" == "1" ]]; then trap 'echo "-- Test timed out at $(date +"%F %T %Z") --"' SIGTERM else for signal in $signals; do + # SIGCHLD is expected when a subprocess dies + [ "${signal}" = "SIGCHLD" ] && continue trap "write_xml_output_file ${signal}" ${signal} done fi