projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8fc9f8
)
tsan: don't use pipe2 in tests
author
Dmitry Vyukov
<dvyukov@google.com>
Fri, 24 Sep 2021 15:48:48 +0000
(17:48 +0200)
committer
Dmitry Vyukov
<dvyukov@google.com>
Fri, 24 Sep 2021 15:52:16 +0000
(17:52 +0200)
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
compiler-rt/test/tsan/stress.cpp
patch
|
blob
|
history
diff --git
a/compiler-rt/test/tsan/stress.cpp
b/compiler-rt/test/tsan/stress.cpp
index 0565c676160b54c26f64a34f09fb046f8aa29987..d678395fd8dfd1d2b18a5a030dc807359328bb99 100644
(file)
--- 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];