On Thu, Dec 8, 2022 at 6:02 AM Tomasz Kłoczko <kloczko.tom...@gmail.com> wrote:
> Looks like test suite is failing>
...
> FAIL: colors
> ============
Thanks for reporting that a single test is failing.
...
> BTW is it any chance to flush currently accumulated commits and make a new 
> version?

Not sure what you mean by currently accumulated commits and making a
new version.
This does not merit a new version. If you've created local commits and
want to delete them
so you can make a new version yourself, you can either clone again to
start from scratch
or discard e.g., the topmost commit along with any uncommitted changes
by running this:

  git reset --hard HEAD^

The issue you found is due to a problem solely with the test, not with
how diff works.
The attached fix makes it so this small test now also passes, even
with newer GNU make.
From 89f3daeaaf021a77177daec8666bcd80ec476833 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyer...@fb.com>
Date: Mon, 16 Jan 2023 15:48:10 -0800
Subject: [PATCH] tests: accommodate newer GNU make's SIGPIPE-ignore
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* tests/colors: Allow an exit code of not just 141 (SIGPIPE),
but also "error": 2.
Reported by Tomasz Kłoczko in http://bugs.gnu.org/59905.
---
 tests/colors | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/colors b/tests/colors
index a14e555..6ef729f 100755
--- a/tests/colors
+++ b/tests/colors
@@ -128,6 +128,9 @@ printf '%1000000s-a' > a
 printf '%1000000s-b' > b
 head -c 10 < fifo > /dev/null &
 diff --color=always ---presume-output-tty a b > fifo
-test $? = 141 || fail=1
+
+# Depending on version of GNU make (4.3.92-4.4 set SIGPIPE to "ignore"),
+# either of these is acceptable.
+case $? in 2|141) ;; *) fail=1 ;; esac

 Exit $fail
-- 
2.39.0.132.g8a4e8f6a67

Reply via email to