You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Five of the 22 Windows-specific gap failures identified in #10403 are one
cluster: Perry's fs applies POSIX semantics where libuv deliberately behaves
differently on Windows. Each is a small, independent mapping fix, and all six
divergences below are measured against the pinned oracle (Node 26.5.1, Windows
11 / MSVC).
Measured divergences
fixture
operation
Node
Perry
test_gap_fs_errprop_2735plus
symlink to a dangling target
EPERM
EIO
test_gap_fs_errprop_2735plus
truncate on a directory
EINVAL
EACCES
test_gap_fs_errprop2_2745plus
symlinkSync unprivileged
throwsEPERM (errno -4048) and exits
does not throw
test_gap_fs_fd_2749
fchown on a closed fd
OK
EBADF fchown
test_gap_fs_write_error_propagation
write to an invalid fd (sync, cb, string and buffer)
EBADF write
EACCES write
test_gap_9574_unlink_waits_for_parked_write
unlink while a write is parked
unlink=ENOENT final=exists
unlink=ok final=missing
Notes on the individual cases
fchown returning OK on a closed fd is not a Node bug. chown/fchown
have no meaning on Windows, so libuv no-ops them and never reaches an fd
validity check. Perry validates the descriptor first and reports EBADF.
symlink requires privilege on Windows (admin, or Developer Mode).
Unprivileged, libuv reports EPERM; Perry reports EIO in one fixture and
does not fail at all in the other, so the two fixtures likely reach different
code paths and both want checking.
unlink of an open file is the most semantically loaded one. Windows
refuses to remove a file with an open handle; Node surfaces that and the file
survives, while Perry removes it. That is a real behavioural difference, not
just an errno label — code that relies on the file still existing after a
failed unlink will diverge.
write to an invalid fd wants EBADF, not EACCES — Perry appears to be
reporting the Windows access error rather than mapping the descriptor failure.
Related
Same family as the err.errno mapping fixed in PR #10403, where libuv's errno
is the negated OS errno on Linux/macOS but its own -4xxx space on Windows.
These are the fs-side equivalents: the code rather than the number, and in
two cases the operation's success/failure itself.
Reproduce: PERRY_SKIP_BUILD=1 PERRY_BIN=… PERRY_RUNTIME_DIR=… ./run_parity_tests.sh --filter test_gap_fs_
then diff test-parity/output/node/<t>.txt against test-parity/output/perry/<t>.txt. Clear target/perry-auto-* first (#10404).
Activity