diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2014-03-26 15:51:11 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2014-03-26 15:51:11 +0000 |
commit | 77f8bbf25353441278bd6a6f5a2fdb03c7475493 (patch) | |
tree | 631400b97ee06fcdb3af6223e5ce90c55a2a1a1d /test/tsan/halt_on_error.cc | |
parent | c8038d83bd9c5e498d638db99d2cd9be173c9ca5 (diff) |
tsan: deflake test
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan/halt_on_error.cc')
-rw-r--r-- | test/tsan/halt_on_error.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/tsan/halt_on_error.cc b/test/tsan/halt_on_error.cc index fddaffff2..c99543ad6 100644 --- a/test/tsan/halt_on_error.cc +++ b/test/tsan/halt_on_error.cc @@ -1,10 +1,12 @@ // RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS halt_on_error=1" not %t 2>&1 | FileCheck %s #include <pthread.h> #include <stdio.h> +#include <unistd.h> int X; void *Thread(void *x) { + sleep(1); X = 42; return 0; } |