<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/local.mk, branch v9.3</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v9.3</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v9.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2023-03-28T13:24:29Z</updated>
<entry>
<title>dircolors: diagnose read errors</title>
<updated>2023-03-28T13:24:29Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-28T13:24:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a9bd274616a8d2e99736b498e657cda4e6954f3f'/>
<id>urn:sha1:a9bd274616a8d2e99736b498e657cda4e6954f3f</id>
<content type='text'>
* NEWS: Mention the fix.
* src/dircolors.c: Fail upon read error from getline().
* tests/misc/dircolors.sh: Add a new test.
* tests/local.mk: Reference the new test.
</content>
</entry>
<entry>
<title>tests: add a test case for the previous date fix</title>
<updated>2023-03-28T12:40:43Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-28T12:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a4525de1ef593cb3873eb88caa7279eb32669bda'/>
<id>urn:sha1:a4525de1ef593cb3873eb88caa7279eb32669bda</id>
<content type='text'>
* NEWS: Also mention this bug fix.
* tests/misc/date-f.sh: Add a new test.
* tests/local.mk: Reference the new test.
</content>
</entry>
<entry>
<title>maint: pacify ‘make syntax-check’</title>
<updated>2023-03-06T23:39:07Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-03-06T23:37:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a4778006c8f2b669afcc45456acf0d21f228208d'/>
<id>urn:sha1:a4778006c8f2b669afcc45456acf0d21f228208d</id>
<content type='text'>
Problem reported by Pádraig Brady (Bug#61386#226).
* src/split.c (parse_chunk): Use die instead of error.
(main): Quote a string.
* tests/local.mk (all_root_tests): Move du/apparent.sh from here ...
(all_tests): ... to here.
</content>
</entry>
<entry>
<title>du: --apparent counts only symlinks and regular</title>
<updated>2023-03-05T00:57:16Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-03-05T00:51:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=110bcd28386b1f47a4cd876098acb708fdcbbb25'/>
<id>urn:sha1:110bcd28386b1f47a4cd876098acb708fdcbbb25</id>
<content type='text'>
Problem reported by Christoph Anton Mitterer (Bug#61884).
* src/du.c (process_file): When counting apparent sizes, count
only usable st_size members.
* tests/du/apparent.sh: New file.
* tests/local.mk (all_root_tests): Add it.
</content>
</entry>
<entry>
<title>cp,install,mv: add --debug to explain how a file is copied</title>
<updated>2023-02-24T00:35:18Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-02-17T13:46:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d899f9e3320bb2a4727ca894163f6b104118c973'/>
<id>urn:sha1:d899f9e3320bb2a4727ca894163f6b104118c973</id>
<content type='text'>
How a file is copied is dependent on the sparseness of the file,
what file system it is on, what file system the destination is on,
the attributes of the file, and whether they're being copied or not.
Also the --reflink and --sparse options directly impact the operation.

Given it's hard to reason about the combination of all of the above,
the --debug option is useful for users to directly identify if
copy offloading, reflinking, or sparse detection are being used.

It will also be useful for tests to directly query if
these operations are supported.

The new output looks as follows:

  $ src/cp --debug src/cp file.sparse
  'src/cp' -&gt; 'file.sparse'
  copy offload: yes, reflink: unsupported, sparse detection: no

  $ truncate -s+1M file.sparse

  $ src/cp --debug file.sparse file.sparse.cp
  'file.sparse' -&gt; 'file.sparse.cp'
  copy offload: yes, reflink: unsupported, sparse detection: SEEK_HOLE

  $ src/cp --reflink=never --debug file.sparse file.sparse.cp
  'file.sparse' -&gt; 'file.sparse.cp'
  copy offload: avoided, reflink: no, sparse detection: SEEK_HOLE

* doc/coreutils.texi (cp invocation): Describe the --debug option.
(mv invocation): Likewise.
(install invocation): Likewise.
* src/copy.h: Add a new DEBUG member to cp_options, to control
whether to output debug info or not.
* src/copy.c (copy_debug): A new global structure to
unconditionally store debug into from the last copy_reg operations.
(copy_debug_string, emit_debug): New functions to print debug info.
* src/cp.c: if ("--debug") x-&gt;debug=true;
* src/install.c: Likewise.
* src/mv.c: Likewise.
* tests/cp/debug.sh: Add a new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the new feature.
</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>mv: new option --no-copy</title>
<updated>2023-01-27T19:03:38Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-01-27T18:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=20005ca733e111a61212ee8a6890a54583c55562'/>
<id>urn:sha1:20005ca733e111a61212ee8a6890a54583c55562</id>
<content type='text'>
Wishlist item from Mike Frysinger (Bug#61050).
* src/copy.c (copy_internal):
Do not fall back on copying if x-&gt;no_copy.
* src/copy.h (struct cp_options): New member no_copy.
* src/mv.c (NO_COPY_OPTION): New constant.
(long_options, usage, main): Support --no-copy.
* tests/mv/no-copy.sh: New test.
* tests/local.mk (all_tests): Add it.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2023-01-01T14:50:15Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-01-01T14:50:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=01755d36e7389aef48f712193976205e7381115b'/>
<id>urn:sha1:01755d36e7389aef48f712193976205e7381115b</id>
<content type='text'>
Update to latest gnulib with new copyright year.
Run "make update-copyright" and then...

* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Manually update copyright year,
until we fully sync with gnulib at a later stage.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>wc: add --total={auto,never,always,only} option</title>
<updated>2022-09-26T14:04:56Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2022-06-25T23:27:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ce2b875cd725d8d64aae5b1f250382f3fa987593'/>
<id>urn:sha1:ce2b875cd725d8d64aae5b1f250382f3fa987593</id>
<content type='text'>
without this option, control of when the total is output
is quite awkward. Consider trying to suppress the total line,
which could be achieved with something like:

   wc-no-total() { wc "$@" /dev/null | head -n-2; }

As well as being non obvious, it's also non general.
It would give a non failure, but zero count if passed a file on stdin.
Also it doesn't work in conjunction with the --files0-from option,
which would need to be handled differently with something like:

   { find files -print0; printf '%s\0' /dev/null; } |
   wc --files0-from=- |
   head -n2

Also getting just the total can be awkward as file names
are only suppressed when processing stdin, and
also a total line is only printed if processing more than one file.
For completness this might be achieved currently with:

  wc-only-total() {
    wc "$@" |
    tail -n1 |
    sed 's/^ *//; s/ [^ 0-9]*$//'
  }

* src/wc.c: Add new --total option.
* tests/misc/wc-total.sh: New test suite for the new option.
* tests/local.mk: Reference the new test.
* doc/coreutils.texi (wc invocation): Document the new option.
* THANKS.in: Add suggestor.
* NEWS: Mention the new feature.
</content>
</entry>
</feed>
