Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sanitizer] Fix running sanitizer_bad_report_path_test on Linux as ro…
…ot (#97732) Summary: Running tests as root is not the greatest idea, however, there is one valid use case - running them in a container in order to verify LLVM on different distros. There is no reason to configure unprivileged users in a container, so one works as root. sanitizer_bad_report_path_test assumes that creating a file in a non-writable directory would fail, which is not the always case. For example, when we are on Linux and CAP_DAC_OVERRIDE, which root has, is in effect. Therefore, one solution is to drop it. However, that would be Linux-specific. Instead, use argv[0] as if it were a directory. mkdir() on top of a file should be prohibited by all supported Posix operating systems. Combine this with a partial revert of commit f4214e1 ("[sanitizer] Skip test on Android where chmod is not working"), since we shouldn't need to exclude Android anymore. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251653
- Loading branch information