<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/misc, branch v9.2</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v9.2</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v9.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2023-03-18T11:44:24Z</updated>
<entry>
<title>tests: aix: avoid unsupported functionality</title>
<updated>2023-03-18T11:44:24Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-17T19:57:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a109106eb8d68569ec0dc7c32f28f755b5e80764'/>
<id>urn:sha1:a109106eb8d68569ec0dc7c32f28f755b5e80764</id>
<content type='text'>
* tests/misc/tee.sh: AIX doesn't support detecting
closed outputs either with poll() or select() so avoid
testing that functionality.
* tests/tail-2/pipe-f.sh: Likewise.
</content>
</entry>
<entry>
<title>tee: support non blocking outputs</title>
<updated>2023-03-08T18:32:05Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-05T15:51:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=16000805eb1bcdf25360471b8bbc8ec3f025e035'/>
<id>urn:sha1:16000805eb1bcdf25360471b8bbc8ec3f025e035</id>
<content type='text'>
Non blocking outputs can be seen for example
when piping telnet through tee to a terminal.
In that case telnet sets its input to nonblocking mode,
which results in tee's output being nonblocking,
in which case in may receive an EAGAIN error upon write().
The same issue was seen with mpirun.
The following can be used to reproduce this
locally at a terminal (in most invocations):

  $ { dd iflag=nonblock count=0 status=none;
      dd bs=10K count=10 if=/dev/zero status=none; } |
    tee || echo fail &gt;/dev/tty

* src/iopoll.c (iopoll_internal): A new function refactored from
iopoll(), to also support a mode where we check the output
descriptor is writeable.
(iopoll): Now refactored to just call iopoll_internal().
(fwait_for_nonblocking_write): A new internal function which
uses iopoll_internal() to wait for writeable output
if an EAGAIN or EWOULDBLOCK was received.
(fwrite_nonblock): An fwrite() wrapper which uses
fwait_for_nonblocking_write() to handle EAGAIN.
(fclose_nonblock): Likewise.
src/iopoll.h: Add fclose_nonblock, fwrite_nonblock.
src/tee.c: Call fclose_nonblock() and fwrite_nonblock wrappers,
instead of the standard functions.
* tests/misc/tee.sh: Add a test case.
* NEWS: Mention the improvement.

The idea was suggested by Kamil Dudka in
https://bugzilla.redhat.com/1615467
</content>
</entry>
<entry>
<title>tee: fix a crash with unwriteable files</title>
<updated>2023-03-07T01:14:00Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-07T01:12:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=35ac97e0d601d5a20bf986bad052f0f94a504561'/>
<id>urn:sha1:35ac97e0d601d5a20bf986bad052f0f94a504561</id>
<content type='text'>
This was introduced recently with commit v9.1-166-g6b12e62d9

* src/tee.c (tee_files): Check the return from fopen()
before passing to fileno() etc.
* tests/misc/tee.sh: Add a test case.
</content>
</entry>
<entry>
<title>tests: tee -p: add test for early exit with closed pipes</title>
<updated>2023-02-28T14:02:42Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-01-03T17:06:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b1376bb829be9147b5699fff637529378b02f758'/>
<id>urn:sha1:b1376bb829be9147b5699fff637529378b02f758</id>
<content type='text'>
* tests/misc/tee.sh: Add a test for the new iopoll logic
to detect closed outputs and exit early without needing
further input.
</content>
</entry>
<entry>
<title>doc: fix some spelling mistakes</title>
<updated>2023-02-21T16:22:20Z</updated>
<author>
<name>ChuanGang Jiang</name>
<email>jiangchuanganghw@outlook.com</email>
</author>
<published>2023-02-21T14:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3edbf016be774e266a659349f513fe265c842e26'/>
<id>urn:sha1:3edbf016be774e266a659349f513fe265c842e26</id>
<content type='text'>
* doc/coreutils.texi: s/functionalty/functionality/,
   s/sychronize/synchronize/, s/millsecond/millisecond/
   s/paramter/parameters/
* init.cfg: s/parmeters/parameters/
* scripts/build-older-versions/README.older-versions: s/vesion/version/
* tests/misc/env-S-script.sh: s/paramaters/parameters/
Fixes https://bugs.gnu.org/61681
</content>
</entry>
<entry>
<title>maint: fix some typos in comments</title>
<updated>2023-02-10T18:06:54Z</updated>
<author>
<name>ChuanGang Jiang</name>
<email>jiangchuanganghw@outlook.com</email>
</author>
<published>2023-02-10T15:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=cf80f988eeb97cc3f8c65ae58e735d36f865277b'/>
<id>urn:sha1:cf80f988eeb97cc3f8c65ae58e735d36f865277b</id>
<content type='text'>
* NEWS: s/commmand/command/
* cfg.mk: Adjust old_NEWS_hash with `make update-NEWS-hash`.
* src/expand-common.c: s/specifed/specified/
* src/pr.c: s/e.g/e.g./
* tests/misc/comm.pl: s/ouput/output/
Fixes https://bugs.gnu.org/61405
</content>
</entry>
<entry>
<title>cksum: add --raw option to output a binary digest</title>
<updated>2023-02-06T13:09:40Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-02-03T16:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ead07bb3d461389bb52336109be7858458e49c38'/>
<id>urn:sha1:ead07bb3d461389bb52336109be7858458e49c38</id>
<content type='text'>
--raw output is the most composable format, and also is a
robust way to discard the file name without parsing (escaped) output.

Examples:

  $ cksum --raw -a crc "$afile" | basenc --base16
  4ACFC4F0

  $ cksum --raw -a crc "$afile" | basenc --base2msbf
  01001010110011111100010011110000

  $ cksum --raw -a sha256 "$bfile" | basenc --base32
  AAAAAAAADHLGRHAILLQWLAY6SNH7OY5OI2RKNQLSWPY3MCUM4JXQ====

* doc/coreutils.texi (cksum invocation): Describe the new feature.
* src/digest.c (output_file): Inspect the new RAW_DIGEST global,
and output the bytes directly if set.
* src/cksum.c (output_crc): Likewise.
* src/sum.c (output_bsd, output_sysv): Likewise.
* tests/misc/cksum-raw.sh: A new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the new feature.
</content>
</entry>
<entry>
<title>cksum: accept new option: --base64 (-b)</title>
<updated>2023-02-01T02:24:28Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@fb.com</email>
</author>
<published>2023-01-21T02:09:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b319685c6e12e66bf357c2384fe69f1c63f66aed'/>
<id>urn:sha1:b319685c6e12e66bf357c2384fe69f1c63f66aed</id>
<content type='text'>
* src/digest.c [HASH_ALGO_CKSUM]: Include "base64.h"
[HASH_ALGO_CKSUM] (base64_digest): New global.
[HASH_ALGO_CKSUM] (enum BASE64_DIGEST_OPTION): New enum.
[HASH_ALGO_CKSUM] (long_options): Add "base64".
(valid_digits): Rename from hex_digits, now taking an input length argument.
Adjust callers.
(bsd_split_3): Rename arg from hex_digits to digest.
Add new *d_len parameter for length of extracted digest.
Move "i" declaration down to first use.
(split_3): Rename arg from hex_digits to digest.
Add new *d_len parameter for length of extracted digest.
Instead of relying on "known" length of digest to find the following
must-be-whitespace byte, search for the first whitespace byte.
[HASH_ALGO_CKSUM] (output_file): Handle base64_digest.
[HASH_ALGO_CKSUM] (main): Set base64_digest.
[HASH_ALGO_CKSUM] (b64_equal): New function.
(hex_equal): New function, factored out of digest_check.
(digest_check) Factored part into b64_equal and hex_equal.
Rename local hex_digest to digest.
* tests/misc/cksum-base64.pl: Add tests.
* tests/local.mk (all_tests): Add to the list.
* cfg.mk (_cksum): Define.
(exclude_file_name_regexp--sc_prohibit_test_backticks): Exempt new test.
(exclude_file_name_regexp--sc_long_lines): Likewise.
* doc/coreutils.texi (cksum invocation): Document it.
(md5sum invocation) [--check]: Mention digest encoding auto-detect.
* NEWS (New Features): Mention this.
</content>
</entry>
<entry>
<title>tests: cksum: fix test to include more cases</title>
<updated>2023-01-30T19:29:38Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-01-30T19:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=666a7fc1d5075807eac7e70f333febf1b99ee980'/>
<id>urn:sha1:666a7fc1d5075807eac7e70f333febf1b99ee980</id>
<content type='text'>
* tests/misc/cksum-c.sh: Fix typo which caused part
of the test data to be ignored.
</content>
</entry>
<entry>
<title>all: further adjustments for new Ronna, Quetta SI prefixes</title>
<updated>2023-01-06T14:26:40Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-01-06T13:13:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f4567ed953d3eb14b8eefc4744603c2594bb73f3'/>
<id>urn:sha1:f4567ed953d3eb14b8eefc4744603c2594bb73f3</id>
<content type='text'>
* src/dd.c (parse_integer): Support Q,R suffixes.
* src/od.c (main): Likewise.
* src/split.c (main): Likewise.
* src/stdbuf.c (parse_size): Likewise.
* src/truncate.c (main): Likewise.
* src/sort.c (specify_size_size): Likewise.
Also line length syntax check fix.
* tests/misc/numfmt.pl: Adust top end large number checks
to the new largest values.
* doc/coreutils.texi (numfmt invocation): Add a numfmt example.
* NEWS: Tweak to aid searchability.
</content>
</entry>
</feed>
