summaryrefslogtreecommitdiff
path: root/test/tsan/race_on_mutex2.c
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_mutex2.c
parent2ff56e76c25aea0ee68c607fb8d7479caddb52ab (diff)
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_mutex2.c')
-rw-r--r--test/tsan/race_on_mutex2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/tsan/race_on_mutex2.c b/test/tsan/race_on_mutex2.c
index c860fc6d8..1796d0c64 100644
--- a/test/tsan/race_on_mutex2.c
+++ b/test/tsan/race_on_mutex2.c
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
#include <pthread.h>
#include <stdio.h>
#include <stddef.h>