[llvm] [llvm] Add support for running tests as root (PR #75285)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 14:33:45 PST 2024


arichardson wrote:

> Thanks for the feedback. I would prefer to keep the patch as-is. The reason I don't want to use os.getuid() is that it is only available on Unix systems, and I don't want to have to add extra code to do OS detection. I also don't want to do a specific ACL test, because creating temporary files is adding another point of failure to lit start up. Since this check is only needed by 4 tests, I want to make it as simple as possible and reduce the risk that it will impact users running as non-root, which is the most common case.

That sounds fine to me. I think using os.getuid instead of getpass is still possible since it's already wrapped inside a bare try-except so that should be safe and avoids an extra import?

https://github.com/llvm/llvm-project/pull/75285


More information about the llvm-commits mailing list