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.

Full log


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/>




This bug report was last modified 2 years and 118 days ago.

Previous Next


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