1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-16 00:36:08 +02:00

10 Commits

Author SHA1 Message Date
Pádraig Brady
bc79ba83ac tests: avoid intermittent false failures with ksh
As noted in https://bugs.gnu.org/9089
ksh gives intermittent ECONNRESET errors with closed pipes.
This can be seen reliably on Linux with:
ksh -c 'yes | (sleep .1; head -n10 >/dev/null)'

* tests/misc/io-errors.sh: Avoid part of test on ksh.
* tests/misc/write-errors.sh: Likewise.
2026-04-15 15:34:19 +01:00
Collin Funk
30a5cbec0e tac: promptly diagnose write errors
This patch also fixes a bug where 'tac' would print a vague error on
some inputs:

    $ seq 10000 | ./src/tac-prev > /dev/full
    tac-prev: write error
    $ seq 10000 | ./src/tac > /dev/full
    tac: write error: No space left on device

In this case ferror (stdout) is true, but errno has been set back to
zero by a successful fclose (stdout) call.

* src/tac.c (output): Call write_error() if fwrite fails.
* tests/misc/io-errors.sh: Check that 'tac' prints a detailed write
error.
* NEWS: Mention the improvement.
2026-03-21 12:10:59 -07:00
Pádraig Brady
4b680f8392 tests: support checking for specific write errors
* tests/misc/io-errors.sh: Support checkout for a specific error
in commands that don't run indefinitely.  Currently all the explicitly
listed commands output a specific error and do not need to be tagged.
2026-03-21 12:43:38 +00:00
Collin Funk
4195e36664 id: promptly diagnose write errors
* NEWS: Mention the improvement.
* src/id.c (print_stuff): Call fflush for each listed user to check for
write errors.
* tests/misc/io-errors.sh: Add an invocation of 'id'.
2026-02-26 19:07:21 -08:00
Collin Funk
80b229be71 groups: promptly diagnose write errors
* NEWS: Mention the improvement.
* src/groups.c (main): Call fflush for each listed user to check for
write errors.
* tests/misc/io-errors.sh: Add an invocation of 'groups'.
2026-02-26 19:05:32 -08:00
Pádraig Brady
724253d9b7 maint: fix description of tests/misc/io-errors.sh
* tests/misc/io-errors.sh: Promptness is checked in
write-errors.sh, not this test.
2026-02-26 12:47:34 +00:00
Pádraig Brady
448a7dc072 maint: tests: avoid ENOSPC specific handling
* tests/csplit/csplit-io-err.sh: Adjust determination of ENOSPC.
* tests/csplit/split-io-err.sh: Likewise.
* tests/fold/fold-zero-width.sh: Verify full ENOSPC message.
* tests/tac/tac-continue.sh: Likewise.
* tests/misc/io-errors.sh: Likewise.
* tests/misc/write-errors.sh: Likewise.
2026-02-18 18:31:49 +00:00
Paul Eggert
23e696b0b2 maint: spelling fixes 2026-01-16 13:22:28 -08:00
Collin Funk
73d3a49f45 maint: run 'make update-copyright' 2026-01-01 10:56:16 -08:00
Pádraig Brady
e10205bab2 tests: check I/O error handling with /dev/full and closed pipes
* tests/misc/io-errors.sh: Verify that all commands diagnose write
errors, and handle a closed pipe appropriately.
* tests/local.mk: Reference the new test.
2025-12-27 16:55:48 +00:00