[compiler-rt] 5be3b3f - [test][sanitizer] Don't use non-portable __WALL
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 14 16:39:00 PST 2023
Author: Vitaly Buka
Date: 2023-12-14T16:38:35-08:00
New Revision: 5be3b3fe1912f9d24f49ef8106297f1ceb8a4f91
URL: https://github.com/llvm/llvm-project/commit/5be3b3fe1912f9d24f49ef8106297f1ceb8a4f91
DIFF: https://github.com/llvm/llvm-project/commit/5be3b3fe1912f9d24f49ef8106297f1ceb8a4f91.diff
LOG: [test][sanitizer] Don't use non-portable __WALL
We don't need it anyway.
Added:
Modified:
compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
Removed:
################################################################################
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c b/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
index 7e3360061276b6..226e9c133ab3fc 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
@@ -85,8 +85,8 @@ int main(void) {
break;
default: {
int status;
- while (waitpid(-1, &status, __WALL) != pid) {
- }
+ pid_t child = waitpid(pid, &status, /*options=*/0);
+ assert(pid == child);
assert(WIFEXITED(status) && WEXITSTATUS(status) == 0);
break;
}
More information about the llvm-commits
mailing list