diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2013-11-21 12:23:17 +0000 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2013-11-21 12:23:17 +0000 |
| commit | 5f1a783914220cb6689bbde596899b3698094dab (patch) | |
| tree | 466f3fb1c03941de2e2aafb2aa2e8d6b4130cbc5 /compiler-rt/lib/tsan | |
| parent | 1bdf5c93e1b8c1a2df9842cfee0c2b0a19bf02d2 (diff) | |
| download | bcm5719-llvm-5f1a783914220cb6689bbde596899b3698094dab.tar.gz bcm5719-llvm-5f1a783914220cb6689bbde596899b3698094dab.zip | |
tsan: deflake tests
the tests produce episodic flakes
the hypothesis is that it's due to our "racy" race detection algorithm
sleeps should remove the flakes
llvm-svn: 195351
Diffstat (limited to 'compiler-rt/lib/tsan')
| -rw-r--r-- | compiler-rt/lib/tsan/lit_tests/tls_race.cc | 2 | ||||
| -rw-r--r-- | compiler-rt/lib/tsan/lit_tests/tls_race2.cc | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/lit_tests/tls_race.cc b/compiler-rt/lib/tsan/lit_tests/tls_race.cc index 3cbcc9dbba4..7b1f38d62de 100644 --- a/compiler-rt/lib/tsan/lit_tests/tls_race.cc +++ b/compiler-rt/lib/tsan/lit_tests/tls_race.cc @@ -1,8 +1,10 @@ // RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s #include <pthread.h> #include <stddef.h> +#include <unistd.h> void *Thread(void *a) { + sleep(1); *(int*)a = 43; return 0; } diff --git a/compiler-rt/lib/tsan/lit_tests/tls_race2.cc b/compiler-rt/lib/tsan/lit_tests/tls_race2.cc index 136087065c1..2cf44ae54a8 100644 --- a/compiler-rt/lib/tsan/lit_tests/tls_race2.cc +++ b/compiler-rt/lib/tsan/lit_tests/tls_race2.cc @@ -4,6 +4,7 @@ #include <unistd.h> void *Thread2(void *a) { + sleep(1); *(int*)a = 43; return 0; } |

