test: accept ENOTEMPTY from libc++ in test-fs-rm - #66065
Open
codebytere wants to merge 1 commit into
Open
codebytere wants to merge 1 commit into
codebytere wants to merge 1 commit into
Conversation
fs.rmSync() is implemented with std::filesystem::remove_all(). When a read-only directory has a child, libc++ before LLVM 23 drops the child's EACCES and reports the ENOTEMPTY it then gets for the parent instead. The test pinned that behavior to macOS, but it depends on the C++ standard library rather than on the OS: a Linux build against libc++ fails the test when run as non-root, and macOS will start reporting EACCES once it ships the fixed libc++. Accept either code for that case on all POSIX platforms. Refs: llvm/llvm-project#197104 Refs: nodejs#57103 Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66065 +/- ##
==========================================
- Coverage 90.27% 90.25% -0.03%
==========================================
Files 789 789
Lines 271473 271473
Branches 51808 51808
==========================================
- Hits 245066 245006 -60
- Misses 16880 16939 +59
- Partials 9527 9528 +1 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs: llvm/llvm-project#197104
Refs: #57103
fs.rmSync()is implemented withstd::filesystem::remove_all(). When a read-only directory has a child, libc++ before LLVM 23 drops the child'sEACCESand reports theENOTEMPTYit then gets for the parent instead (llvm/llvm-project#197104). #57103 pinned that to macOS intest-fs-rm, but it depends on the C++ standard library rather than on the OS: a Linux build against libc++ fails the read-only-subdirectory case when the suite runs as non-root, and macOS will start reportingEACCESonce it ships the fixed libc++.This accepts either code for that case on all POSIX platforms. Checked with a standalone
remove_all()program over the same directory layout - libstdc++ 13 reportsEACCES, libc++ 18 reportsENOTEMPTY- and by running the test as non-root against a regular (libstdc++) Linux build before and after.Disclosure: the code and this description were written by Claude Code, directed and reviewed by @codebytere.