Subject: Re: bug#77800: grep-3.12: write-error-msg test failure on fedora rawhide (f43)

From: Jaroslav Škarvada <[email-masked]>
Date: Tue, 15 Apr 2025 12:52:09 +0200

On the system where the test failed (fedora 43/rawhide):
# yes 12345 | head -n 50000 > in
# strace -o out -- grep -q --help >/dev/full
grep: write error: No space left on device

write(1, "Usage: grep [OPTION]... PATTERNS"..., 4068) = -1 ENOSPC (No
space left on device)

It's the system grep 3.11.

With the 3.12 build from the sources:
# yes 12345 | head -n 50000 > in
# strace -o out -- ./grep -q --help >/dev/full
./grep: write error

write(1, "Usage: grep [OPTION]... PATTERNS"..., 4096) = -1 ENOSPC (No
space left on device)

It's compiled the same way as the 3.11 was except the 3.11 build used
the 'autoreconf -fi' which was dropped, because autoreconf fails now
probably due to version incompatibility:
configure:9031: error: possibly undefined macro: gl_ANYTHREADLIB_EARLY
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

autoconf-2.72

Jaroslav

On Mon, Apr 14, 2025 at 9:32 PM Jim Meyering <[email-masked]> wrote:
>
> On Mon, Apr 14, 2025 at 5:56 AM Jaroslav Škarvada via Bug reports for
> GNU grep <[email-masked]> wrote:
> > test log is attached
>
> Hi Jaroslav,
> Thanks for testing!
>
> The test that's failing is ensuring that a disk-full write failure
> elicits a diagnostic like this:
>   grep: write error: No space left on device
>
> On your system, it prints only this:
>   grep: write error
>
> Can you run the following and share the strace output file, "out"?
>   yes 12345 | head -n 50000 > in
>   strace -o out -- grep -q --help >/dev/full
>
> We expect the first write to fail like this:
>   write(1, "Usage: grep [OPTION]... PATTERNS"..., 4096) = -1 ENOSPC
> (No space left on device)
>