bug#68989: grep -m[2+] > /dev/null

2024-02-08 Thread Grisha Levit
This example file will require multiple reads: $ printf '%07d\n' {0..98304} > txt When limiting the match count to 1, the input offset is correctly restored before grep exits, no matter the output: $ { grep -m1 . >/dev/zero; head -n1; } < txt 001 $ { grep -m1 . >/dev/null; head -n1; } < txt

bug#74539: [PATCH] tests: fix define for glibc-infloop

2024-11-25 Thread Grisha Levit
This doesn't affect anything right now since the value is only examined by an unconditionally skipped test. * configure.ac (USE_INCLUDED_REGEX): fix condition for definition. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 88b26c1..5e0a89c 10

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

2025-04-17 Thread Grisha Levit
On Fri, Apr 18, 2025 at 1:51 AM Jim Meyering wrote: > > Surprised to find that coreutils-9.5 (fedora 41 stock) works fine: > > $ { /bin/printf %4095s; /bin/printf %4096s; } > /dev/full > /bin/printf: write error: No space left on device > /bin/printf: write error: No space left on device Th

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

2025-04-17 Thread Grisha Levit
On Fri, Apr 18, 2025, 01:18 Jim Meyering wrote: > > On Tue, Apr 15, 2025 at 9:17 PM Jim Meyering wrote: > ... > > We're going to have to revise that code. > > The difference I see is that before rawhide, that fclose would fail. > > It's perfectly fine for fclose to succeed in this case, as now ha

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

2025-04-18 Thread Grisha Levit
On Fri, Apr 18, 2025 at 2:58 AM Jim Meyering wrote: > > Now, as for what changed in F42 to make us go from printing the ENOSPC > expansion to not printing it, so far I haven't reproduced the failure. > Just built there and this works just as it does on F41: > > $ src/grep --help > /dev/full > >

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

2025-04-15 Thread Grisha Levit
On Tue, Apr 15, 2025 at 6:38 PM wrote: > > >> This seems to be fixed if the patch here [1] is _not_ applied when > >> building the RPM > > Can you check, perhaps using strace, whether that problematic patch pushes > the total amount of bytes written to stdout by grep, writing to /dev/full as > yo

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

2025-04-15 Thread Grisha Levit
On Tue, Apr 15, 2025 at 9:54 PM Jim Meyering wrote: > Whoa. Thanks. It looks like this is a >19-year-old bug in stream-close.c > Here's a tentative fix -- the ChangeLog entry still lacks details of > when it was introduced: - if (! fclose_fail) + if (!fclose_fail && !prev_fail)

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

2025-04-15 Thread Grisha Levit
On Tue, Apr 15, 2025 at 6:53 AM Jaroslav Škarvada via Bug reports for GNU grep wrote: > With the 3.12 build from the sources: > # yes 12345 | head -n 5 > in > # strace -o out -- ./grep -q --help >/dev/full > ./grep: write error > This seems to be fixed if the patch here [1] is _not_ applied w