<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/cp, 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-04-13T19:19:18Z</updated>
<entry>
<title>tests: avoid dependence on file layout for cp sparse check</title>
<updated>2023-04-13T19:19:18Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-04-12T13:37:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=daa1e4f55702e03e9bcf06d2d0906652fb1619b0'/>
<id>urn:sha1:daa1e4f55702e03e9bcf06d2d0906652fb1619b0</id>
<content type='text'>
* tests/cp/sparse-2.sh: Don't depend on the copy taking
&lt;= allocation of the source.  Instead leverage --debug
to check that zero detection is being enabled.
</content>
</entry>
<entry>
<title>tests: avoid non portable brace expansion</title>
<updated>2023-04-10T17:54:19Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-04-10T17:51:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=09ded7049bfe11036452334b2128c65e208fd453'/>
<id>urn:sha1:09ded7049bfe11036452334b2128c65e208fd453</id>
<content type='text'>
* tests/cp/backup-dir.sh: Avoid non portable brace expansion
which is not supported by FreeBSD or Solaris shells at least.
</content>
</entry>
<entry>
<title>cp,mv: issue "skipped" messages when skipping files</title>
<updated>2023-04-08T11:11:58Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-04-07T09:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f6c21f6d3addb6461c41af612e73fbb15d21545f'/>
<id>urn:sha1:f6c21f6d3addb6461c41af612e73fbb15d21545f</id>
<content type='text'>
* NEWS: Mention the change in behavior to issue a "not replaced"
error diagnostic with -n, and the "skipped" message with -v.
* src/copy.c (copy_internal): Adjust to output the "skipped" messages
depending on -i, -n, -u.
* tests/cp/cp-i.sh: Adjust accordingly.
* tests/mv/mv-n.sh: Likewise.
</content>
</entry>
<entry>
<title>cp: fix --backup with subdirectories</title>
<updated>2023-04-04T11:00:11Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-04-03T17:12:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5891d28edebe229f1a6057275e281b10c1f2247b'/>
<id>urn:sha1:5891d28edebe229f1a6057275e281b10c1f2247b</id>
<content type='text'>
* gnulib: Reference the latest gnulib including the
fix to the backupfile module in commit 94496522.
* tests/cp/backup-dir.sh: Add a test to ensure
we rename appropriately when backing up through subdirs.
* NEWS: Mention the bug fix.
Fixes https://bugs.gnu.org/62607
</content>
</entry>
<entry>
<title>test: avoid a test hang on Hurd</title>
<updated>2023-03-15T18:11:00Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-15T18:11:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1d03781daa034b77f82c1dac7c0095ce65b1cb63'/>
<id>urn:sha1:1d03781daa034b77f82c1dac7c0095ce65b1cb63</id>
<content type='text'>
* tests/cp/sparse-to-pipe.sh: Protect the cp call seen to
hang on Hurd/i686 with a timeout.
Reported By: Bruno Haible
</content>
</entry>
<entry>
<title>tests: determine if SEEK_HOLE is enabled</title>
<updated>2023-02-24T00:35:18Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-02-23T20:28:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5c8c2a5161c0b6f84212778f694c526105f10dab'/>
<id>urn:sha1:5c8c2a5161c0b6f84212778f694c526105f10dab</id>
<content type='text'>
Upcomming gnulib changes may disable SEEK_HOLE
even if the system supports it, so dynamically
check if we've SEEK_HOLE enabled.

* init.cfg (seek_data_capable_): SEEK_DATA may be disabled in the build
if the system support is deemed insufficient, so also use `cp --debug`
to determine if it's enabled.
* tests/cp/sparse-2.sh: Adjust to a more general diagnostic.
* tests/cp/sparse-extents-2.sh: Likewise.
* tests/cp/sparse-extents.sh: Likewise.
* tests/cp/sparse-perf.sh: Likewise.
</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>tests: fix exit status check in cp -u test</title>
<updated>2023-02-03T16:38:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-02-03T16:37:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ce5225bcef6209509a9cc812adfd4cc74078fa73'/>
<id>urn:sha1:ce5225bcef6209509a9cc812adfd4cc74078fa73</id>
<content type='text'>
* tests/cp/preserve-link.sh: This should have been part
of commit v9.1-134-g01503ce73.
</content>
</entry>
<entry>
<title>cp,mv: skipping due to -u is success, not failure</title>
<updated>2023-01-31T17:25:25Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-01-31T17:24:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=01503ce7319b099d9deaeab43628e1b2b07a874a'/>
<id>urn:sha1:01503ce7319b099d9deaeab43628e1b2b07a874a</id>
<content type='text'>
This reverts the previous change, so that when a file
is skipped due to -u, this is not considered a failure.
* doc/coreutils.texi: Document this.
* src/copy.c (copy_internal): If --update says to skip,
treat this as success instead of failure.
* tests/mv/update.sh, tests/cp/slink-2-slink.sh:
Revert previous change, to match reverted behavior.
</content>
</entry>
<entry>
<title>cp,ln,mv: when skipping exit with nonzero status</title>
<updated>2023-01-31T16:54:37Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-01-31T16:46:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7a69df88999bedd8e9fccf9f3dfa9ac6907fab66'/>
<id>urn:sha1:7a69df88999bedd8e9fccf9f3dfa9ac6907fab66</id>
<content type='text'>
* NEWS, doc/coreutils.texi: Document this.
* src/copy.c (copy_internal):
* src/ln.c (do_link): Return false when skipping action due to
--interactive or --no-clobber.
* tests/cp/cp-i.sh, tests/cp/preserve-link.sh:
* tests/cp/slink-2-slink.sh, tests/mv/i-1.pl, tests/mv/i-5.sh:
* tests/mv/mv-n.sh, tests/mv/update.sh:
Adjust expectations of exit status to match revised behavior.
</content>
</entry>
</feed>
