Skip to content

Conversation

mstorsjo
Copy link
Member

@mstorsjo mstorsjo commented Oct 7, 2025

This fixes spurious failures in
std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp on Windows.

As part of that test, libcxx tries to open a fake network path such as "//foo/a". Normally, this sets the error ERROR_BAD_NETPATH, which is mapped to no_such_file_or_directory. However occasionally, it can end up setting the error ERROR_NETNAME_DELETED instead.

Map ERROR_NETNAME_DELETED to no_such_file_or_directory just like ERROR_BAD_NETPATH is mapped. This makes these cases be treated equally within the create_file_status function in
src/filesystem/file_descriptor.h, causing the __weakly_canonical function in operations.cpp to keep iterating, rather than erroring out.

This fixes spurious failures in
std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
on Windows.

As part of that test, libcxx tries to open a fake network path
such as "//foo/a". Normally, this sets the error ERROR_BAD_NETPATH,
which is mapped to no_such_file_or_directory. However occasionally,
it can end up setting the error ERROR_NETNAME_DELETED instead.

Map ERROR_NETNAME_DELETED to no_such_file_or_directory just like
ERROR_BAD_NETPATH is mapped. This makes these cases be treated
equally within the create_file_status function in
src/filesystem/file_descriptor.h, causing the __weakly_canonical
function in operations.cpp to keep iterating, rather than erroring
out.
@mstorsjo mstorsjo merged commit 981dadc into llvm:main Oct 7, 2025
71 of 78 checks passed
@mstorsjo mstorsjo deleted the libcxx-fix-flaky-proximate-test branch October 7, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants