<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/rm, 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-02-26T18:31:35Z</updated>
<entry>
<title>tests: avoid hang in new test</title>
<updated>2023-02-26T18:31:35Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-02-26T18:10:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=995021cb0ce72ea9c235bbf71c69d3b96bfa84e9'/>
<id>urn:sha1:995021cb0ce72ea9c235bbf71c69d3b96bfa84e9</id>
<content type='text'>
* tests/rm/empty-inacc.sh: Ensure we're not reading from stdin
when we're relying on no prompt to proceed.  Also change the
file being tested so that a failure in one test doesn't impact
following tests causing a framework failure.
</content>
</entry>
<entry>
<title>tests: avoid gdb on macOS</title>
<updated>2023-02-26T18:31:28Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-02-24T15:40:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3ead67dd163977fb03932e67485a4a27d498185d'/>
<id>urn:sha1:3ead67dd163977fb03932e67485a4a27d498185d</id>
<content type='text'>
gdb was seen to hang intermittently on macOS 12.
Also gdb requires signing on newer macOS systems:
https://sourceware.org/gdb/wiki/PermissionsDarwin
So restrict its use on macOS systems for now.

* tests/rm/r-root.sh: Skip on darwin systems.
* tests/tail-2/inotify-race.sh: Restrict the test to
inotify capable systems to avoid the hang with some gdbs.
* tests/tail-2/inotify-race.sh: Likewise.
</content>
</entry>
<entry>
<title>tests: initialize a variable</title>
<updated>2023-02-21T15:18:17Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@fb.com</email>
</author>
<published>2023-02-20T16:37:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c62488a80142207ca3e26a8c28ba573bfc0c0ca3'/>
<id>urn:sha1:c62488a80142207ca3e26a8c28ba573bfc0c0ca3</id>
<content type='text'>
* tests/rm/interactive-once.sh (write_prot_msg1): Initialize it,
so an envvar setting cannot perturb the test.
</content>
</entry>
<entry>
<title>rm: --dir (-d): fix bugs in handling of empty, inaccessible directories</title>
<updated>2023-02-21T15:18:17Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@meta.com</email>
</author>
<published>2023-02-06T17:01:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a0803c4bad6f8e11bb05effcc42ef433f4fc3f9b'/>
<id>urn:sha1:a0803c4bad6f8e11bb05effcc42ef433f4fc3f9b</id>
<content type='text'>
* src/remove.c (prompt, rm_fts): In the dir-handling code of both of
these functions, relax a "get_dir_status (...) == DS_EMPTY" condition
to instead test only "get_dir_status (...) != 0", enabling flow control
to reach the prompt function also for unreadable directories. However,
that function itself also needed special handling for this case:
(prompt): Handle empty, inaccessible directories properly,
deleting them with -d (--dir), and prompting about whether to delete
with -i (--interactive).
* tests/rm/empty-inacc.sh: Add tests for the new code.
Reported by наб &lt;nabijaczleweli@nabijaczleweli.xyz&gt; in
bugs.debian.org/1015273
* NEWS (Bug fixes): Mention this.
</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>rm: fix diagnostics on I/O error</title>
<updated>2022-09-24T23:34:31Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2022-09-21T21:05:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=eb7841426ce8cfb0150d4d2f4879ce455005fbbb'/>
<id>urn:sha1:eb7841426ce8cfb0150d4d2f4879ce455005fbbb</id>
<content type='text'>
I ran into this problem when attempting to recursively
remove a directory in a filesystem on flaky hardware.
Although the underlying readdir syscall failed with errno == EIO,
rm issued no diagnostic about the I/O error.

Without this patch I see this behavior:

  $ rm -fr baddir
  rm: cannot remove 'baddir': Directory not empty
  $ rm -ir baddir
  rm: descend into directory 'baddir'? y
  rm: remove directory 'baddir'? y
  rm: cannot remove 'baddir': Directory not empty

With this patch I see the following behavior, which
lets the user know about the I/O error when rm tries
to read baddir's directory entries:

  $ rm -fr baddir
  rm: cannot remove 'baddir': Input/output error
  $ rm -ir baddir
  rm: cannot remove 'baddir': Input/output error

* src/remove.c (Ternary): Remove.  All uses removed.
(get_dir_status): New static function.
(prompt): Last arg is now directory status, not ternary.
Return RM_USER_ACCEPTED if user explicitly accepted.
All uses changed.
Report any significant error in directory status right away.
(prompt, rm_fts): Use get_dir_status to get directory status lazily.
(excise): Treat any FTS_DNR errno as being more descriptive, not
just EPERM and EACCESS.  For example, EIO is more descriptive.
(rm_fts): Distinguish more clearly between explicit and implied
user OK.
* src/remove.h (RM_USER_ACCEPTED): New constant.
(VALID_STATUS): Treat it as valid.
* src/system.h (is_empty_dir): Remove, replacing with ...
(directory_status): ... this more-general function.
All uses changed.  Avoid undefined behavior of looking at
a non-null readdir pointer after corresponding closedir.
* tests/rm/rm-readdir-fail.sh: Adjust test of internals
to match current behavior.
</content>
</entry>
<entry>
<title>rm: fix readdir test</title>
<updated>2022-09-24T23:34:30Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2022-09-24T20:40:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5a14ccad485f62d759157e925c7fddf33b9a5829'/>
<id>urn:sha1:5a14ccad485f62d759157e925c7fddf33b9a5829</id>
<content type='text'>
* tests/rm/rm-readdir-fail.sh [_DIRENT_HAVE_D_NAMELEN]:
Fix off-by-1 bug in directory entry length.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2022-01-02T16:15:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2022-01-02T15:42:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3067a9293af07ba2cf1ababe6b4482196717f806'/>
<id>urn:sha1:3067a9293af07ba2cf1ababe6b4482196717f806</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>doc: modernize usage of “disk” and “core”</title>
<updated>2021-07-28T19:30:12Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2021-07-28T19:22:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d60b2922ffb30d15e81b0019025b8e62af070a6e'/>
<id>urn:sha1:d60b2922ffb30d15e81b0019025b8e62af070a6e</id>
<content type='text'>
In documentation and comments, don’t assume that secondary storage
devices are disk devices.  Similarly, don’t assume that main memory
uses magnetic cores, which became obsolete in the 1970s.
* src/du.c (usage):
* src/ls.c (usage):
* src/shred.c (usage): Reword to avoid “disk” in usage messages.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2021-01-01T16:36:09Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-01-01T16:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=32ff1d1313ff566685b9092ac929251a4c22e7c4'/>
<id>urn:sha1:32ff1d1313ff566685b9092ac929251a4c22e7c4</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
</feed>
