1 From 89f3daeaaf021a77177daec8666bcd80ec476833 Mon Sep 17 00:00:00 2001
2 From: Jim Meyering <meyering@fb.com>
3 Date: Mon, 16 Jan 2023 15:48:10 -0800
4 Subject: tests: accommodate newer GNU make's SIGPIPE-ignore
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 * tests/colors: Allow an exit code of not just 141 (SIGPIPE),
11 Reported by Tomasz Kłoczko in http://bugs.gnu.org/59905.
13 tests/colors | 5 ++++-
14 1 file changed, 4 insertions(+), 1 deletion(-)
16 diff --git a/tests/colors b/tests/colors
17 index a14e555..6ef729f 100755
20 @@ -128,6 +128,9 @@ printf '%1000000s-a' > a
21 printf '%1000000s-b' > b
22 head -c 10 < fifo > /dev/null &
23 diff --color=always ---presume-output-tty a b > fifo
24 -test $? = 141 || fail=1
26 +# Depending on version of GNU make (4.3.92-4.4 set SIGPIPE to "ignore"),
27 +# either of these is acceptable.
28 +case $? in 2|141) ;; *) fail=1 ;; esac