GNU bug report logs - #59905
3.8: test suite is failing

Previous Next

Package: diffutils;

Reported by: Tomasz Kłoczko <kloczko.tomasz <at> gmail.com>

Date: Thu, 8 Dec 2022 14:02:02 UTC

Severity: normal

Found in version 3.8

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59905 in the body.
You can then email your comments to 59905 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-diffutils <at> gnu.org:
bug#59905; Package diffutils. (Thu, 08 Dec 2022 14:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tomasz Kłoczko <kloczko.tomasz <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-diffutils <at> gnu.org. (Thu, 08 Dec 2022 14:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tomasz Kłoczko <kloczko.tomasz <at> gmail.com>
To: bug-diffutils <at> gnu.org
Subject: 3.8: test suite is failing
Date: Thu, 8 Dec 2022 14:01:13 +0000
[Message part 1 (text/plain, inline)]
Hi,

Looks like test suite is failing

+ cd diffutils-3.8
+ /usr/bin/make -O -j48 V=1 VERBOSE=1 check
if test -d ./.git                               \
        && git --version >/dev/null 2>&1; then                  \
  cd . &&                                               \
  git submodule --quiet foreach                                 \
      'test "$(git rev-parse "$sha1")"                  \
          = "$(git merge-base origin "$sha1")"'         \
    || { echo 'maint.mk: found non-public submodule commit' >&2;        \
         exit 1; };                                             \
else                                                            \
  : ;                                                           \
fi
Making check in lib
/usr/bin/make  check-am
Making check in src
/usr/bin/make  check-am
make[2]: Nothing to be done for 'check-am'.
Making check in tests
/usr/bin/make  check-TESTS
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: bignum
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: colliding-file-names
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: excess-slash
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: stdin
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: brief-vs-stat-zero-kernel-lies
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: invalid-re
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: ignore-matching-lines
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: new-file
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: function-line-vs-leading-space
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: label-vs-func
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: strcoll-0-names
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: basic
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: diff3
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: no-newline-at-eof
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: filename-quoting
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
FAIL: colors
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
XFAIL: large-subopt
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: no-dereference
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: binary
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: cmp
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: help-version
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
PASS: strip-trailing-cr
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/diffutils-3.8/tests'
=============================================
   GNU diffutils 3.8: tests/test-suite.log
=============================================

# TOTAL: 22
# PASS:  20
# SKIP:  0
# XFAIL: 1
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

XFAIL: large-subopt
===================

XFAIL large-subopt (exit status: 1)

FAIL: colors
============

diff: standard output: Broken pipe
FAIL colors (exit status: 1)

============================================================================
Testsuite summary for GNU diffutils 3.8
============================================================================
# TOTAL: 22
# PASS:  20
# SKIP:  0
# XFAIL: 1
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
Please report to bug-diffutils <at> gnu.org
============================================================================

Please let me know if you need more details.

BTW is it any chance to flush currently accumulated commits and make a new
version?

kloczek
-- 
Tomasz Kłoczko | LinkedIn: *http://lnkd.in/FXPWxH <http://lnkd.in/FXPWxH>*
[Message part 2 (text/html, inline)]

Information forwarded to bug-diffutils <at> gnu.org:
bug#59905; Package diffutils. (Mon, 16 Jan 2023 17:10:01 GMT) Full text and rfc822 format available.

Message #8 received at 59905 <at> debbugs.gnu.org (full text, mbox):

From: Adam Sampson <ats <at> offog.org>
To: 59905 <at> debbugs.gnu.org
Subject: Re: 3.8: test suite is failing
Date: Mon, 16 Jan 2023 17:09:38 +0000
I'm seeing the "colors" tests fail with diffutils 3.8 and 3.9 as well,
and the cause turns out to be a bit surprising.

The last test in "colors" checks that diff exits 141 (128 + SIGPIPE)
when it's writing to a FIFO that is closed early. Modifying the test
script to run diff under strace reveals that SIGPIPE's handler has been
set to SIG_IGN when diff first queries it -- when it should be SIG_DFL
by default. So diff's SIGPIPE handler doesn't run, and it exits 2
instead.

It turns out this is a change in GNU Make 4.3.92 and later -- make does
signal(SIGPIPE, SIG_IGN) for its own purposes, and its child processes
inherit that. With make 4.3, the tests work; with 4.4, this one fails.

I'm not sure whether this is a fault in make, diff or the test! There
are other programs (e.g. the Python interpreter) that spawn processes
with SIGPIPE set to SIG_IGN, so perhaps it should be robust against
that.

Cheers,

-- 
Adam Sampson <ats <at> offog.org>                         <http://offog.org/>




Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Tue, 17 Jan 2023 00:10:02 GMT) Full text and rfc822 format available.

Notification sent to Tomasz Kłoczko <kloczko.tomasz <at> gmail.com>:
bug acknowledged by developer. (Tue, 17 Jan 2023 00:10:02 GMT) Full text and rfc822 format available.

Message #13 received at 59905-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Tomasz Kłoczko <kloczko.tomasz <at> gmail.com>
Cc: 59905-done <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#59905: 3.8: test suite is failing
Date: Mon, 16 Jan 2023 16:08:45 -0800
[Message part 1 (text/plain, inline)]
On Thu, Dec 8, 2022 at 6:02 AM Tomasz Kłoczko <kloczko.tomasz <at> 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.
[diff-color-nit.txt (text/plain, attachment)]

Information forwarded to bug-diffutils <at> gnu.org:
bug#59905; Package diffutils. (Tue, 17 Jan 2023 00:11:01 GMT) Full text and rfc822 format available.

Message #16 received at 59905 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Adam Sampson <ats <at> offog.org>
Cc: 59905 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#59905: 3.8: test suite is failing
Date: Mon, 16 Jan 2023 16:10:05 -0800
On Mon, Jan 16, 2023 at 9:10 AM Adam Sampson <ats <at> offog.org> wrote:
> I'm seeing the "colors" tests fail with diffutils 3.8 and 3.9 as well,
> and the cause turns out to be a bit surprising.
>
> The last test in "colors" checks that diff exits 141 (128 + SIGPIPE)
> when it's writing to a FIFO that is closed early. Modifying the test
> script to run diff under strace reveals that SIGPIPE's handler has been
> set to SIG_IGN when diff first queries it -- when it should be SIG_DFL
> by default. So diff's SIGPIPE handler doesn't run, and it exits 2
> instead.
>
> It turns out this is a change in GNU Make 4.3.92 and later -- make does
> signal(SIGPIPE, SIG_IGN) for its own purposes, and its child processes
> inherit that. With make 4.3, the tests work; with 4.4, this one fails.
>
> I'm not sure whether this is a fault in make, diff or the test! There
> are other programs (e.g. the Python interpreter) that spawn processes
> with SIGPIPE set to SIG_IGN, so perhaps it should be robust against
> that.

Thanks for the investigation.
I've made a small adjustment to that test, to make it work with
GNU make before and after that change.




Information forwarded to bug-diffutils <at> gnu.org:
bug#59905; Package diffutils. (Wed, 25 Jan 2023 10:13:02 GMT) Full text and rfc822 format available.

Message #19 received at 59905 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> suse.de>
To: Adam Sampson <ats <at> offog.org>
Cc: 59905 <at> debbugs.gnu.org
Subject: Re: bug#59905: 3.8: test suite is failing
Date: Wed, 25 Jan 2023 11:12:12 +0100
On Jan 16 2023, Adam Sampson wrote:

> It turns out this is a change in GNU Make 4.3.92 and later -- make does
> signal(SIGPIPE, SIG_IGN) for its own purposes, and its child processes
> inherit that. With make 4.3, the tests work; with 4.4, this one fails.

This is a bug in make 4.4 and will be fixed in 4.4.1.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 22 Feb 2023 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.