<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/misc/write-errors.sh, branch v9.4</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v9.4</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v9.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2023-07-17T10:28:36Z</updated>
<entry>
<title>join: promptly diagnose write errors</title>
<updated>2023-07-17T10:28:36Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-07-15T20:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=02a4ebd6c451d013ecc4a93a809416781fbaf6ab'/>
<id>urn:sha1:02a4ebd6c451d013ecc4a93a809416781fbaf6ab</id>
<content type='text'>
* src/join.c (prjoin): Check for write errors after each line.
* tests/misc/write-errors.sh: enable the test for join.
* NEWS: Mention the improvement.
</content>
</entry>
<entry>
<title>comm: promptly diagnose write errors</title>
<updated>2023-07-17T10:28:36Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-07-15T20:43:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b1df1d557eb8e3c40778a01af9cd972c80a19d95'/>
<id>urn:sha1:b1df1d557eb8e3c40778a01af9cd972c80a19d95</id>
<content type='text'>
* src/comm.c (writeline): Simplify by removing the unneeded STREAM
parameter.  Call write_error() upon ferror().
(compare_files): Adjust to simplified writeline().
* tests/misc/write-errors.sh: Enable comm test.
* NEWS: Mention the improvement.
</content>
</entry>
<entry>
<title>cut: promptly diagnose write errors</title>
<updated>2023-07-17T10:28:36Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-07-15T20:23:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e0a4a60af52e40e5ee5c7d5f1764150301d3dea9'/>
<id>urn:sha1:e0a4a60af52e40e5ee5c7d5f1764150301d3dea9</id>
<content type='text'>
* src/cut.c (cut_bytes): Diagnose errors from fwrite() and putchar().
(cut_fields): Likewise.
* tests/misc/write-errors.sh: Enable the test for cut,
and augment to cover both cut_bytes() and cut_fields().
* NEWS: Mention the improvement.
</content>
</entry>
<entry>
<title>uniq: promptly diagnose write errors</title>
<updated>2023-07-17T10:28:36Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-07-15T20:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ca7711456f8cedbf40bec00ced04e7d6d9fc85be'/>
<id>urn:sha1:ca7711456f8cedbf40bec00ced04e7d6d9fc85be</id>
<content type='text'>
* src/uniq.c (write_line): Check the output from fwrite() immediately.
(check_file): Likewise.
* tests/misc/write-errors.sh: Enable the test case.
* NEWS: Mention the improvement.
</content>
</entry>
<entry>
<title>od: promptly diagnose write errors</title>
<updated>2023-07-17T10:28:36Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-07-11T11:46:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a03c00023a700386453b91142116279bb79fb59d'/>
<id>urn:sha1:a03c00023a700386453b91142116279bb79fb59d</id>
<content type='text'>
* src/od.c (dump): Check for write errors after each block written,
to exit early even with large / unbounded inputs.
* tests/misc/write-errors.sh: enable od check.
* NEWS: Mention the improvement.
Fixes https://bugs.gnu.org/64540
</content>
</entry>
<entry>
<title>all: avoid repeated diagnostic upon write error</title>
<updated>2023-07-17T10:28:36Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-07-15T19:41:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0b2ff7637f1eabba48e461f9f6e3aec956bed7d1'/>
<id>urn:sha1:0b2ff7637f1eabba48e461f9f6e3aec956bed7d1</id>
<content type='text'>
* cfg.mk (sc_some_programs_must_avoid_exit_failure): Adjust to
avoid false positive.
(sc_prohibit_exit_write_error): A new syntax check to prohibit
open coding error(..., "write error"); instead directing to use...
* src/system.h (write_error): ... a new function to clear stdout errors
before we explicitly diagnose a write error and exit.
* src/basenc.c: Use write_error() to ensure no repeated diagnostics.
* src/cat.c: Likewise.
* src/expand.c: Likewise.
* src/factor.c: Likewise.
* src/paste.c: Likewise.
* src/seq.c: Likewise.
* src/shuf.c: Likewise.
* src/split.c: Likewise.
* src/tail.c: Likewise.
* src/tr.c: Likewise.
* src/unexpand.c: Likewise.
* tests/misc/write-errors.sh: Remove TODOs for the fixed utilities:
expand, factor, paste, shuf, tr, unexpand.
</content>
</entry>
<entry>
<title>tests: ensure utilties exit promptly upon write error</title>
<updated>2023-07-17T10:28:30Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-07-11T12:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ef47b928d0b4fb96c8d458450c941fe1eb487542'/>
<id>urn:sha1:ef47b928d0b4fb96c8d458450c941fe1eb487542</id>
<content type='text'>
* tests/local.mk: Reference the new test.
* tests/misc/write-errors.sh: A new test to ensure utilities
exit promptly upon writing to /dev/full.
</content>
</entry>
</feed>
