[compiler-rt] 34412ce - tsan: don't use pipe2 in tests
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 08:52:21 PDT 2021
Author: Dmitry Vyukov
Date: 2021-09-24T17:52:16+02:00
New Revision: 34412cea5c247e30e49958213df10dd8f128d7e5
URL: https://github.com/llvm/llvm-project/commit/34412cea5c247e30e49958213df10dd8f128d7e5
DIFF: https://github.com/llvm/llvm-project/commit/34412cea5c247e30e49958213df10dd8f128d7e5.diff
LOG: tsan: don't use pipe2 in tests
MacOS buildbots failed:
stress.cpp:57:7: error: use of undeclared identifier 'pipe2'
https://green.lab.llvm.org/green//job/clang-stage1-RA/24209/consoleFull#-3468768778254eaf0-7326-4999-85b0-388101f2d404
Fix the test to not use pipe2.
Differential Revision: https://reviews.llvm.org/D110423
Added:
Modified:
compiler-rt/test/tsan/stress.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/tsan/stress.cpp b/compiler-rt/test/tsan/stress.cpp
index 0565c676160b..d678395fd8df 100644
--- a/compiler-rt/test/tsan/stress.cpp
+++ b/compiler-rt/test/tsan/stress.cpp
@@ -54,8 +54,12 @@ void *Thread(void *x) {
int main() {
ANNOTATE_BENIGN_RACE(stop);
- if (pipe2(fds, O_NONBLOCK))
- exit((perror("pipe2"), 1));
+ if (pipe(fds))
+ exit((perror("pipe"), 1));
+ if (fcntl(fds[0], F_SETFL, O_NONBLOCK))
+ exit((perror("fcntl"), 1));
+ if (fcntl(fds[1], F_SETFL, O_NONBLOCK))
+ exit((perror("fcntl"), 1));
const int kActions = 9;
const int kMultiplier = 4;
pthread_t t[kActions * kMultiplier];
More information about the llvm-commits
mailing list