summaryrefslogtreecommitdiff
path: root/test/tsan/real_deadlock_detector_stress_test.cc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2014-12-18 14:02:28 +0000
committerDmitry Vyukov <dvyukov@google.com>2014-12-18 14:02:28 +0000
commit9a8efe3ef5d2b6ef628acb242611efe50165d518 (patch)
treeeb5ac68f3964a0df98ddbfe224bcb7304f256a79 /test/tsan/real_deadlock_detector_stress_test.cc
parentfa0cad405c5ba09d2d40388461587d648bdb5ddb (diff)
tsan: fix failing CHECK In deadlock detector
and re-enable the test git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan/real_deadlock_detector_stress_test.cc')
-rw-r--r--test/tsan/real_deadlock_detector_stress_test.cc33
1 files changed, 2 insertions, 31 deletions
diff --git a/test/tsan/real_deadlock_detector_stress_test.cc b/test/tsan/real_deadlock_detector_stress_test.cc
index da72042ee..67c878f45 100644
--- a/test/tsan/real_deadlock_detector_stress_test.cc
+++ b/test/tsan/real_deadlock_detector_stress_test.cc
@@ -1,31 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#if 1
-
-#include <stdio.h>
-
-int main() {
- // Currently fails with:
- // CHECK failed: bv_.clearBit(lock_id)
-
- /*
- And in cmake build it also fails with:
- In function `__clang_call_terminate':
- real_deadlock_detector_stress_test.cc:(.text.__clang_call_terminate
- [__clang_call_terminate]+0x12): undefined reference to `__cxa_begin_catch'
- real_deadlock_detector_stress_test.cc:(.text.__clang_call_terminate
- [__clang_call_terminate]+0x17): undefined reference to `std::terminate()'
- In function `std::vector<int, std::allocator<int> >::_M_check_len
- (unsigned long, char const*) const':
- stl_vector.h:1339: undefined reference to `std::__throw_length_error
- (char const*)'
- */
-
- fprintf(stderr, "DONE\n");
- return 0;
-}
-
-#else
+// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
#include <pthread.h>
#include <stdlib.h>
@@ -38,7 +11,7 @@ int main() {
const int kThreads = 4;
const int kMutexes = 16 << 10;
-const int kIters = 1 << 20;
+const int kIters = 400 << 10;
const int kMaxPerThread = 10;
const int kStateInited = 0;
@@ -211,5 +184,3 @@ int main() {
// CHECK-NOT: WARNING: ThreadSanitizer
// CHECK: DONE
-#endif
-