]> git.kaiwu.me - njs.git/commit
Test262: accept ENOTEMPTY and EEXIST in fs/rename.t.mjs
authorVadim Zhestikov <v.zhestikov@f5.com>
Wed, 29 Jul 2026 21:52:06 +0000 (14:52 -0700)
committerVadimZhestikov <108960056+VadimZhestikov@users.noreply.github.com>
Wed, 29 Jul 2026 22:56:25 +0000 (15:56 -0700)
commitf109134d50ccdd7e18769376b0eff35664dd3c2b
tree862a8d3724f6cff19185e7e29d9f70945efcff3e
parent24de0ce206edadb102463bbf9fd35c7d7e080ec1
Test262: accept ENOTEMPTY and EEXIST in fs/rename.t.mjs

Renaming a regular file onto an existing directory is permitted by POSIX
to fail with EISDIR, ENOTDIR, ENOTEMPTY or EEXIST, and the exact errno
depends on the kernel and filesystem.  The test only accepted ENOTDIR
and EISDIR, so it began failing on the ubuntu-26.04 CI runners whose
newer kernel returns ENOTEMPTY (or EEXIST) for this case.

Accept ENOTEMPTY and EEXIST in all three variants (sync, callback and
promise based) to make the test robust across kernels while still
rejecting genuinely unexpected errors.
test/fs/rename.t.mjs