[libcxx-commits] [libcxx] [libcxx] Require non-root-user for tests that check permissions (PR #119940)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Dec 14 04:45:05 PST 2024
philnik777 wrote:
> > This patch doesn't ever enable non-root-user, so this is just dead code.
>
> It's enabled within lit.
>
> https://github.com/llvm/llvm-project/blob/0ae75eba678a9ab459a382818148ef06afe817b5/llvm/utils/lit/lit/llvm/config.py#L176
Did you actually test that? I don't think libc++ relies on that.
> > It's pretty trivial to change the user, at least in Docker. Another problem is that this will just hide that some tests don't run instead of informing the user.
>
> It's not hard to change the user, and this will hide cause some tests to be unsupported, but I don't think that's necessarily a problem.
I do. This is a much worse user experience than saying you shouldn't run tests as root. All we're doing here is sweeping a misconfiguration under the carpet.
> The precedent across the rest of the monorepo is to disable tests that fail when running under root. See the following PRs:
>
> 1. [[llvm] Add support for running tests as root #75285](https://github.com/llvm/llvm-project/pull/75285)
>
> 2. [[lld] Fix test failures when running as root user #81339](https://github.com/llvm/llvm-project/pull/81339)
>
> 3. [[BOLT] Require non root user for unreadable-profile.test #119816](https://github.com/llvm/llvm-project/pull/119816)
>
> 4. [[flang][unittests] fix test broken when run as root #119604](https://github.com/llvm/llvm-project/pull/119604)
>
>
> It would be somewhat annoying if libc++ deviated from what everyone else is doing.
There is no precedent for this in the runtimes AFAICT, which are significantly different than the rest of the repo.
https://github.com/llvm/llvm-project/pull/119940
More information about the libcxx-commits
mailing list