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:
86b75a4
)
[TSan] Deflake test
author
Alexey Samsonov
<vonosmas@gmail.com>
Mon, 24 Nov 2014 22:27:34 +0000
(22:27 +0000)
committer
Alexey Samsonov
<vonosmas@gmail.com>
Mon, 24 Nov 2014 22:27:34 +0000
(22:27 +0000)
llvm-svn: 222699
compiler-rt/test/tsan/simple_race.cc
patch
|
blob
|
history
diff --git
a/compiler-rt/test/tsan/simple_race.cc
b/compiler-rt/test/tsan/simple_race.cc
index
0236b9f
..
f711bb5
100644
(file)
--- a/
compiler-rt/test/tsan/simple_race.cc
+++ b/
compiler-rt/test/tsan/simple_race.cc
@@
-1,10
+1,12
@@
// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t 2>&1 | FileCheck %s
#include <pthread.h>
#include <stdio.h>
+#include <unistd.h>
int Global;
void *Thread1(void *x) {
+ sleep(1);
Global++;
return NULL;
}
@@
-20,6
+22,7
@@
int main() {
pthread_create(&t[1], NULL, Thread2, NULL);
pthread_join(t[0], NULL);
pthread_join(t[1], NULL);
+ return 0;
}
// CHECK: WARNING: ThreadSanitizer: data race