summaryrefslogtreecommitdiff
path: root/test/tsan/race_on_heap.cc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2014-05-30 14:08:51 +0000
committerDmitry Vyukov <dvyukov@google.com>2014-05-30 14:08:51 +0000
commit64bff329e459bd3b1886447b25c5787f6eff93db (patch)
tree202a5c8e5d8f7ede0fedf4f2e4f1457731ecedee /test/tsan/race_on_heap.cc
parent2ff56e76c25aea0ee68c607fb8d7479caddb52ab (diff)
downloadcompiler-rt-64bff329e459bd3b1886447b25c5787f6eff93db.tar.gz
tsan: make positive tests more robust
Add a script that is used to deflake inherently flaky tsan tests. It is invoked from lit tests as: %deflake %run %t The script runs the target program up to 10 times, until it produces a tsan warning. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan/race_on_heap.cc')
-rw-r--r--test/tsan/race_on_heap.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/tsan/race_on_heap.cc b/test/tsan/race_on_heap.cc
index 54c4a9b02..a66e0c4f9 100644
--- a/test/tsan/race_on_heap.cc
+++ b/test/tsan/race_on_heap.cc
@@ -1,4 +1,4 @@
-// RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
@@ -38,7 +38,7 @@ int main() {
// CHECK: WARNING: ThreadSanitizer: data race
// ...
// CHECK: Location is heap block of size 99 at [[ADDR]] allocated by thread T1:
-// CHCEKL #0 malloc
+// CHCEK: #0 malloc
// CHECK: #{{1|2}} alloc
// CHECK: #{{2|3}} AllocThread
// ...