From: Pádraig Brady Date: Tue, 15 Nov 2022 13:57:47 +0000 (+0000) Subject: tests: make SIGPIPE trap checking more robust X-Git-Tag: v9.2~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5450c7f8d33f7a9ee10a2700cad9ccc6cec3626e;p=thirdparty%2Fcoreutils.git tests: make SIGPIPE trap checking more robust * init.cfg (trap_sigpipe_or_skip_): A subshell with ignored SIGPIPE was seen to not terminate, on Solaris 11 at least. So protect with a timeout(1). --- diff --git a/init.cfg b/init.cfg index 576f6ecd67..856aa2ee7e 100644 --- a/init.cfg +++ b/init.cfg @@ -636,7 +636,10 @@ mkfifo_or_skip_() trap_sigpipe_or_skip_() { - (trap '' PIPE && yes | :) 2>&1 | grep -F 'Broken pipe' >/dev/null || + timeout --version >/dev/null || + skip_ 'trapping SIGPIPE cannot be safely checked' + + (trap '' PIPE && timeout 10 yes |:) 2>&1 | grep 'Broken pipe' >/dev/null || skip_ 'trapping SIGPIPE is not supported' }