diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2013-11-28 10:12:16 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2013-11-28 10:12:16 +0000 |
commit | 25ecfcf00cc1c06a3c4743b29dc0ea6749adabc1 (patch) | |
tree | 804bcc7d9a48bc539010a3be5bda080a712254a3 | |
parent | a3365ac962ab6f8f90ae7360fb16704c6784bede (diff) | |
download | bcm5719-llvm-25ecfcf00cc1c06a3c4743b29dc0ea6749adabc1.tar.gz bcm5719-llvm-25ecfcf00cc1c06a3c4743b29dc0ea6749adabc1.zip |
tsan: deflake more tests
llvm-svn: 195916
-rw-r--r-- | compiler-rt/lib/tsan/lit_tests/stack_race.cc | 2 | ||||
-rw-r--r-- | compiler-rt/lib/tsan/lit_tests/stack_race2.cc | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/lit_tests/stack_race.cc b/compiler-rt/lib/tsan/lit_tests/stack_race.cc index 7fabce22a85..01ff2e83961 100644 --- a/compiler-rt/lib/tsan/lit_tests/stack_race.cc +++ b/compiler-rt/lib/tsan/lit_tests/stack_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/stack_race2.cc b/compiler-rt/lib/tsan/lit_tests/stack_race2.cc index c759ec92774..577f12c95f2 100644 --- a/compiler-rt/lib/tsan/lit_tests/stack_race2.cc +++ b/compiler-rt/lib/tsan/lit_tests/stack_race2.cc @@ -4,6 +4,7 @@ #include <unistd.h> void *Thread2(void *a) { + sleep(1); *(int*)a = 43; return 0; } |