test: accept ENOTEMPTY from libc++ in test-fs-rm by codebytere · Pull Request #66065 · nodejs/node · GitHub
Skip to content

test: accept ENOTEMPTY from libc++ in test-fs-rm - #66065

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
codebytere:test-fs-rm-libcxx-enotempty
Sep 24, 2026
Merged

nodejs-github-bot merged 1 commit into
nodejs:mainfrom
codebytere:test-fs-rm-libcxx-enotempty

Conversation

@codebytere

Copy link
Copy Markdown
Member

Refs: llvm/llvm-project#197104
Refs: #57103

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 (llvm/llvm-project#197104). #57103 pinned that to macOS in test-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 reporting EACCES once 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 reports EACCES, libc++ 18 reports ENOTEMPTY - 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.

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>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. labels Sep 16, 2026
@codecov

codecov Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

@codebytere codebytere added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 17, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 17, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@codebytere codebytere added the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 24, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 72bb834 into nodejs:main Sep 24, 2026
92 of 93 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 24, 2026
aduh95 pushed a commit that referenced this pull request Sep 27, 2026
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: #57103
Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: #66065
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants