<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/cp, 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-15T18:11:00Z</updated>
<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>
<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>maint: avoid recent syntax check failure</title>
<updated>2022-12-29T14:15:54Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2022-12-29T14:14:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4bf990bf658d4070e74fc64b0fafef4d305af8f4'/>
<id>urn:sha1:4bf990bf658d4070e74fc64b0fafef4d305af8f4</id>
<content type='text'>
* tests/cp/proc-short-read.sh: Adjust so shorter lines.
</content>
</entry>
<entry>
<title>tests: accommodate bogomips capitalizations</title>
<updated>2022-12-26T17:01:37Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2022-12-26T17:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=16fc0f30feafac3f1124ad5d0625d7de5d28cf10'/>
<id>urn:sha1:16fc0f30feafac3f1124ad5d0625d7de5d28cf10</id>
<content type='text'>
* tests/cp/proc-short-read.sh: Kernel on ARMv7 Processor rev 3 (v7l)
spells it "BogoMIPS", so allow any capitalization.  Patch from
Zach van Rijn in &lt;https://bugs.gnu.org/60339&gt;.
</content>
</entry>
<entry>
<title>cp,mv,install: avoid opening non directory destination</title>
<updated>2022-04-09T21:21:24Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2022-04-09T14:46:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=cc01b8a8f43bd1e02339322595f7a20e72a8c155'/>
<id>urn:sha1:cc01b8a8f43bd1e02339322595f7a20e72a8c155</id>
<content type='text'>
commit v9.0-66-ge2daa8f79 introduced an issue, for example
where cp could hang when overwriting a destination fifo,
when it would try to open() the fifo on systems
like Solaris 10 that didn't support the O_DIRECTORY flag.

This is still racy on such systems, but only in the
case where a directory is replaced by a fifo in
the small window between stat() and open().

* src/system.h (target_directory_operand): On systems without
O_DIRECTORY, ensure the file is a directory before attempting to open().
* tests/cp/special-f.sh: Protect cp with timeout(1),
as cp was seen to hang when trying to overwrite an existing fifo.
* NEWS: Mention the bug fix.
</content>
</entry>
</feed>
