[compiler-rt] [sanitizer_common][test] Move fork_threaded.c to Linux (PR #75480)

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 06:56:42 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Rainer Orth (rorth)

<details>
<summary>Changes</summary>

Since the new `Posix/fork_threaded.c` test was enabled for `ubsan`, the test `FAIL`s on Solaris (and most likely all other non-Linux targets):

```
FAIL: SanitizerCommon-ubsan-sparc-SunOS::fork_threaded.cpp
FAIL: SanitizerCommon-ubsan-sparcv9-SunOS::fork_threaded.cpp

/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.cpp:79:33: error: use of undeclared identifier '__WALL'; did you mean 'P_ALL'?
   79 |     while (waitpid(-1, &status, __WALL) != pid) {
      |                                 ^~~~~~
      |                                 P_ALL
/usr/include/sys/procset.h:45:2: note: 'P_ALL' declared here
   45 |         P_ALL,          /* all processes                                */
      |         ^
```
The use of `__WALL` is unportable, AFAICS it's a glibc addition, certainly not POSIX.

This patch moves the test to `Linux` to match this.

Tested on `x86_64-pc-linux-gnu` and `amd64-pc-solaris2.11`.

---
Full diff: https://github.com/llvm/llvm-project/pull/75480.diff


1 Files Affected:

- (renamed) compiler-rt/test/sanitizer_common/TestCases/Linux/fork_threaded.c () 


``````````diff
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c b/compiler-rt/test/sanitizer_common/TestCases/Linux/fork_threaded.c
similarity index 100%
rename from compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
rename to compiler-rt/test/sanitizer_common/TestCases/Linux/fork_threaded.c

``````````

</details>


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


More information about the llvm-commits mailing list