[libcxx-commits] [PATCH] D97538: [libcxx] [test] Ifdef out tests that rely on perms::none on directories for triggering errors

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 2 09:46:14 PST 2021


mstorsjo added subscribers: amccarth, curdeius.
mstorsjo added a comment.

Tagging @curdeius and @amccarth for input and ideas

In D97538#2597651 <https://reviews.llvm.org/D97538#2597651>, @ldionne wrote:

> So actually, I think those tests are the same that fail when we run under `sudo`. I believe it would be useful to find an alternative way to trigger those failures. This would allow us to both run the tests on Windows and also would remove this weird quirk about running under `sudo` (which is useful e.g. when running in a Docker image).
>
> Can you think of another way to do this? Could we change the owner of the directory?

If a process running as root can iterate over a directory even after chmod 000, I don't think changing the owner would help. Dunno about windows - on the API level we operate so far, permissions only consist of a boolean readonly flag, not much more. On some other level, windows filesystems have full ACLs for controlling access though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97538



More information about the libcxx-commits mailing list