[libcxx-commits] [PATCH] D98166: [libcxx] Test accessing a directory on windows that gives "access denied" errors

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 18 03:02:41 PDT 2021


mstorsjo added a comment.

@curdeius I found another exception to this issue, which seems rather relevant actually...

If the test process is launched from within bash on windows, then suddenly "C:\System Volume Information" is accessible. (I have no idea why though. All versions of bash on windows come with some sort of posix emulation layer - cygwin/msys or derivatives thereof - and I guess that the emulation layer does something funky...) It doesn't matter if one launches a regular cmd.exe shell again within bash, and if one tries to restore the set of env vars to what it is normally, that dir still is fully accessible in such processes.

I hadn't run into the issue when I'm doing cross testing (where the executables get launched via ssh into a WSL subsystem, sidestepping the whole bash issue).

Currently, bash is required for running tests - I'm looking into getting rid of that requirement, but even if they are runnable without bash, users may end up running things in bash (and even if bash is optional, the testsuite would kinda be set up to prefer using bash if available).

With that in mind, do you think it's reasonable to verify that the "C:\System Volume Information" that we found has got the behaviour that we expect (i.e. signals errors already at `exists(path, ec)`), and if it doesn't behaves as expected, we'd let those tests pass (possibly with a warning printed)?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98166/new/

https://reviews.llvm.org/D98166



More information about the libcxx-commits mailing list