[compiler-rt] r209898 - tsan: make positive tests more robust

Dmitry Vyukov dvyukov at google.com
Fri May 30 07:08:52 PDT 2014


Author: dvyukov
Date: Fri May 30 09:08:51 2014
New Revision: 209898

URL: http://llvm.org/viewvc/llvm-project?rev=209898&view=rev
Log:
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.


Added:
    compiler-rt/trunk/test/tsan/deflake.bash   (with props)
    compiler-rt/trunk/test/tsan/global_race2.cc
    compiler-rt/trunk/test/tsan/global_race3.cc
    compiler-rt/trunk/test/tsan/inlined_memcpy_race2.cc
Modified:
    compiler-rt/trunk/test/tsan/atomic_free.cc
    compiler-rt/trunk/test/tsan/atomic_free2.cc
    compiler-rt/trunk/test/tsan/atomic_race.cc
    compiler-rt/trunk/test/tsan/atomic_stack.cc
    compiler-rt/trunk/test/tsan/cond_race.cc
    compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc
    compiler-rt/trunk/test/tsan/deep_stack1.cc
    compiler-rt/trunk/test/tsan/fd_location.cc
    compiler-rt/trunk/test/tsan/fd_pipe_race.cc
    compiler-rt/trunk/test/tsan/fd_stdout_race.cc
    compiler-rt/trunk/test/tsan/free_race.c
    compiler-rt/trunk/test/tsan/free_race2.c
    compiler-rt/trunk/test/tsan/global_race.cc
    compiler-rt/trunk/test/tsan/halt_on_error.cc
    compiler-rt/trunk/test/tsan/heap_race.cc
    compiler-rt/trunk/test/tsan/ignore_lib0.cc
    compiler-rt/trunk/test/tsan/ignore_lib1.cc
    compiler-rt/trunk/test/tsan/ignore_lib2.cc
    compiler-rt/trunk/test/tsan/ignore_lib3.cc
    compiler-rt/trunk/test/tsan/ignore_sync.cc
    compiler-rt/trunk/test/tsan/inlined_memcpy_race.cc
    compiler-rt/trunk/test/tsan/java_lock_rec_race.cc
    compiler-rt/trunk/test/tsan/java_race.cc
    compiler-rt/trunk/test/tsan/java_race_move.cc
    compiler-rt/trunk/test/tsan/lit.cfg
    compiler-rt/trunk/test/tsan/load_shared_lib.cc
    compiler-rt/trunk/test/tsan/longjmp3.cc
    compiler-rt/trunk/test/tsan/longjmp4.cc
    compiler-rt/trunk/test/tsan/malloc_hook.cc
    compiler-rt/trunk/test/tsan/malloc_stack.cc
    compiler-rt/trunk/test/tsan/memcpy_race.cc
    compiler-rt/trunk/test/tsan/mop_with_offset.cc
    compiler-rt/trunk/test/tsan/mop_with_offset2.cc
    compiler-rt/trunk/test/tsan/mutex_bad_read_lock.cc
    compiler-rt/trunk/test/tsan/mutex_bad_read_unlock.cc
    compiler-rt/trunk/test/tsan/mutex_bad_unlock.cc
    compiler-rt/trunk/test/tsan/mutex_destroy_locked.cc
    compiler-rt/trunk/test/tsan/mutex_double_lock.cc
    compiler-rt/trunk/test/tsan/mutex_robust2.cc
    compiler-rt/trunk/test/tsan/mutexset1.cc
    compiler-rt/trunk/test/tsan/mutexset2.cc
    compiler-rt/trunk/test/tsan/mutexset3.cc
    compiler-rt/trunk/test/tsan/mutexset4.cc
    compiler-rt/trunk/test/tsan/mutexset5.cc
    compiler-rt/trunk/test/tsan/mutexset6.cc
    compiler-rt/trunk/test/tsan/mutexset7.cc
    compiler-rt/trunk/test/tsan/mutexset8.cc
    compiler-rt/trunk/test/tsan/pthread_atfork_deadlock.c
    compiler-rt/trunk/test/tsan/race_on_barrier.c
    compiler-rt/trunk/test/tsan/race_on_barrier2.c
    compiler-rt/trunk/test/tsan/race_on_heap.cc
    compiler-rt/trunk/test/tsan/race_on_mutex.c
    compiler-rt/trunk/test/tsan/race_on_mutex2.c
    compiler-rt/trunk/test/tsan/race_on_read.cc
    compiler-rt/trunk/test/tsan/race_on_write.cc
    compiler-rt/trunk/test/tsan/race_with_finished_thread.cc
    compiler-rt/trunk/test/tsan/signal_errno.cc
    compiler-rt/trunk/test/tsan/signal_malloc.cc
    compiler-rt/trunk/test/tsan/sigsuspend.cc
    compiler-rt/trunk/test/tsan/simple_race.c
    compiler-rt/trunk/test/tsan/simple_race.cc
    compiler-rt/trunk/test/tsan/simple_stack.c
    compiler-rt/trunk/test/tsan/simple_stack2.cc
    compiler-rt/trunk/test/tsan/sleep_sync.cc
    compiler-rt/trunk/test/tsan/sleep_sync2.cc
    compiler-rt/trunk/test/tsan/stack_race.cc
    compiler-rt/trunk/test/tsan/stack_race2.cc
    compiler-rt/trunk/test/tsan/static_init3.cc
    compiler-rt/trunk/test/tsan/suppress_same_address.cc
    compiler-rt/trunk/test/tsan/suppress_same_stacks.cc
    compiler-rt/trunk/test/tsan/thread_end_with_ignore.cc
    compiler-rt/trunk/test/tsan/thread_end_with_ignore2.cc
    compiler-rt/trunk/test/tsan/thread_end_with_ignore3.cc
    compiler-rt/trunk/test/tsan/thread_leak3.c
    compiler-rt/trunk/test/tsan/thread_leak5.c
    compiler-rt/trunk/test/tsan/thread_name.cc
    compiler-rt/trunk/test/tsan/thread_name2.cc
    compiler-rt/trunk/test/tsan/tiny_race.c
    compiler-rt/trunk/test/tsan/tls_race.cc
    compiler-rt/trunk/test/tsan/tls_race2.cc
    compiler-rt/trunk/test/tsan/unaligned_race.cc
    compiler-rt/trunk/test/tsan/vptr_harmful_race.cc
    compiler-rt/trunk/test/tsan/vptr_harmful_race2.cc
    compiler-rt/trunk/test/tsan/vptr_harmful_race3.cc
    compiler-rt/trunk/test/tsan/write_in_reader_lock.cc

Modified: compiler-rt/trunk/test/tsan/atomic_free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/atomic_free.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/atomic_free.cc (original)
+++ compiler-rt/trunk/test/tsan/atomic_free.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/atomic_free2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/atomic_free2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/atomic_free2.cc (original)
+++ compiler-rt/trunk/test/tsan/atomic_free2.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/atomic_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/atomic_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/atomic_race.cc (original)
+++ compiler-rt/trunk/test/tsan/atomic_race.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/tsan/atomic_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/atomic_stack.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/atomic_stack.cc (original)
+++ compiler-rt/trunk/test/tsan/atomic_stack.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/cond_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/cond_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/cond_race.cc (original)
+++ compiler-rt/trunk/test/tsan/cond_race.cc Fri May 30 09:08:51 2014
@@ -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
 // CHECK-NOT: unlock of unlocked mutex
 // CHECK: ThreadSanitizer: data race
 // CHECK: pthread_cond_signal

Modified: compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc (original)
+++ compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc Fri May 30 09:08:51 2014
@@ -1,12 +1,12 @@
 // RUN: %clangxx_tsan %s -o %t -DLockType=PthreadMutex
-// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOT-SECOND
-// TSAN_OPTIONS="detect_deadlocks=1 second_deadlock_stack=1" not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-SECOND
+// RUN: TSAN_OPTIONS=detect_deadlocks=1 %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOT-SECOND
+// TSAN_OPTIONS="detect_deadlocks=1 second_deadlock_stack=1" %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-SECOND
 // RUN: %clangxx_tsan %s -o %t -DLockType=PthreadSpinLock
-// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s
+// RUN: TSAN_OPTIONS=detect_deadlocks=1 %deflake %run %t | FileCheck %s
 // RUN: %clangxx_tsan %s -o %t -DLockType=PthreadRWLock
-// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-RD
+// RUN: TSAN_OPTIONS=detect_deadlocks=1 %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-RD
 // RUN: %clangxx_tsan %s -o %t -DLockType=PthreadRecursiveMutex
-// RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-REC
+// RUN: TSAN_OPTIONS=detect_deadlocks=1 %deflake %run %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-REC
 #include <pthread.h>
 #undef NDEBUG
 #include <assert.h>

Modified: compiler-rt/trunk/test/tsan/deep_stack1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/deep_stack1.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/deep_stack1.cc (original)
+++ compiler-rt/trunk/test/tsan/deep_stack1.cc Fri May 30 09:08:51 2014
@@ -1,5 +1,5 @@
-// RUN: %clangxx_tsan -O1 %s -o %t -DORDER1 && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_tsan -O1 %s -o %t -DORDER2 && not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_tsan -O1 %s -o %t -DORDER1 && %deflake %run %t | FileCheck %s
+// RUN: %clangxx_tsan -O1 %s -o %t -DORDER2 && %deflake %run %t | FileCheck %s
 #include <pthread.h>
 #include <stdio.h>
 #include <unistd.h>

Added: compiler-rt/trunk/test/tsan/deflake.bash
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/deflake.bash?rev=209898&view=auto
==============================================================================
--- compiler-rt/trunk/test/tsan/deflake.bash (added)
+++ compiler-rt/trunk/test/tsan/deflake.bash Fri May 30 09:08:51 2014
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+# This script is used to deflake inherently flaky tsan tests.
+# It is invoked from lit tests as:
+# %deflake mybinary
+# which is then substituted by lit to:
+# $(dirname %s)/deflake.bash mybinary
+# The script runs the target program up to 10 times,
+# until it fails (i.e. produces a race report).
+
+for i in $(seq 1 10); do
+	OUT=`$@ 2>&1`
+	if [[ $? != 0 ]]; then
+		echo "$OUT"
+		exit 0
+	fi
+done
+exit 1

Propchange: compiler-rt/trunk/test/tsan/deflake.bash
------------------------------------------------------------------------------
    svn:executable = *

Modified: compiler-rt/trunk/test/tsan/fd_location.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/fd_location.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/fd_location.cc (original)
+++ compiler-rt/trunk/test/tsan/fd_location.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/fd_pipe_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/fd_pipe_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/fd_pipe_race.cc (original)
+++ compiler-rt/trunk/test/tsan/fd_pipe_race.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/fd_stdout_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/fd_stdout_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/fd_stdout_race.cc (original)
+++ compiler-rt/trunk/test/tsan/fd_stdout_race.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/free_race.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/free_race.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/free_race.c (original)
+++ compiler-rt/trunk/test/tsan/free_race.c Fri May 30 09:08:51 2014
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan -O1 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOZUPP
+// RUN: %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOZUPP
 // RUN: TSAN_OPTIONS="suppressions=%s.supp print_suppressions=1" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUPP
 
 #include <pthread.h>

Modified: compiler-rt/trunk/test/tsan/free_race2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/free_race2.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/free_race2.c (original)
+++ compiler-rt/trunk/test/tsan/free_race2.c Fri May 30 09:08:51 2014
@@ -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 <stdlib.h>
 
 void __attribute__((noinline)) foo(int *mem) {

Modified: compiler-rt/trunk/test/tsan/global_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/global_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/global_race.cc (original)
+++ compiler-rt/trunk/test/tsan/global_race.cc Fri May 30 09:08:51 2014
@@ -1,44 +1,26 @@
-// 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 <stdio.h>
 #include <stddef.h>
 #include <unistd.h>
 
 int GlobalData[10];
-int x;
-namespace XXX {
-  struct YYY {
-    static int ZZZ[10];
-  };
-  int YYY::ZZZ[10];
-}
 
 void *Thread(void *a) {
   sleep(1);
   GlobalData[2] = 42;
-  x = 1;
-  XXX::YYY::ZZZ[0] = 1;
   return 0;
 }
 
 int main() {
   fprintf(stderr, "addr=%p\n", GlobalData);
-  fprintf(stderr, "addr2=%p\n", &x);
-  fprintf(stderr, "addr3=%p\n", XXX::YYY::ZZZ);
   pthread_t t;
   pthread_create(&t, 0, Thread, 0);
   GlobalData[2] = 43;
-  x = 0;
-  XXX::YYY::ZZZ[0] = 0;
   pthread_join(t, 0);
 }
 
 // CHECK: addr=[[ADDR:0x[0-9,a-f]+]]
-// CHECK: addr2=[[ADDR2:0x[0-9,a-f]+]]
-// CHECK: addr3=[[ADDR3:0x[0-9,a-f]+]]
 // CHECK: WARNING: ThreadSanitizer: data race
 // CHECK: Location is global 'GlobalData' of size 40 at [[ADDR]] ({{.*}}+0x{{[0-9,a-f]+}})
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK: Location is global 'x' of size 4 at [[ADDR2]] ({{.*}}+0x{{[0-9,a-f]+}})
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK: Location is global 'XXX::YYY::ZZZ' of size 40 at [[ADDR3]] ({{.*}}+0x{{[0-9,a-f]+}})
+

Added: compiler-rt/trunk/test/tsan/global_race2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/global_race2.cc?rev=209898&view=auto
==============================================================================
--- compiler-rt/trunk/test/tsan/global_race2.cc (added)
+++ compiler-rt/trunk/test/tsan/global_race2.cc Fri May 30 09:08:51 2014
@@ -0,0 +1,26 @@
+// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
+#include <pthread.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <unistd.h>
+
+int x;
+
+void *Thread(void *a) {
+  sleep(1);
+  x = 1;
+  return 0;
+}
+
+int main() {
+  fprintf(stderr, "addr2=%p\n", &x);
+  pthread_t t;
+  pthread_create(&t, 0, Thread, 0);
+  x = 0;
+  pthread_join(t, 0);
+}
+
+// CHECK: addr2=[[ADDR2:0x[0-9,a-f]+]]
+// CHECK: WARNING: ThreadSanitizer: data race
+// CHECK: Location is global 'x' of size 4 at [[ADDR2]] ({{.*}}+0x{{[0-9,a-f]+}})
+

Added: compiler-rt/trunk/test/tsan/global_race3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/global_race3.cc?rev=209898&view=auto
==============================================================================
--- compiler-rt/trunk/test/tsan/global_race3.cc (added)
+++ compiler-rt/trunk/test/tsan/global_race3.cc Fri May 30 09:08:51 2014
@@ -0,0 +1,30 @@
+// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
+#include <pthread.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <unistd.h>
+
+namespace XXX {
+  struct YYY {
+    static int ZZZ[10];
+  };
+  int YYY::ZZZ[10];
+}
+
+void *Thread(void *a) {
+  sleep(1);
+  XXX::YYY::ZZZ[0] = 1;
+  return 0;
+}
+
+int main() {
+  fprintf(stderr, "addr3=%p\n", XXX::YYY::ZZZ);
+  pthread_t t;
+  pthread_create(&t, 0, Thread, 0);
+  XXX::YYY::ZZZ[0] = 0;
+  pthread_join(t, 0);
+}
+
+// CHECK: addr3=[[ADDR3:0x[0-9,a-f]+]]
+// CHECK: WARNING: ThreadSanitizer: data race
+// CHECK: Location is global 'XXX::YYY::ZZZ' of size 40 at [[ADDR3]] ({{.*}}+0x{{[0-9,a-f]+}})

Modified: compiler-rt/trunk/test/tsan/halt_on_error.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/halt_on_error.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/halt_on_error.cc (original)
+++ compiler-rt/trunk/test/tsan/halt_on_error.cc Fri May 30 09:08:51 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS halt_on_error=1" not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS halt_on_error=1" %deflake %run %t | FileCheck %s
 #include <pthread.h>
 #include <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/heap_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/heap_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/heap_race.cc (original)
+++ compiler-rt/trunk/test/tsan/heap_race.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <stddef.h>

Modified: compiler-rt/trunk/test/tsan/ignore_lib0.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib0.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib0.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib0.cc Fri May 30 09:08:51 2014
@@ -1,7 +1,7 @@
 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib0.so
 // RUN: %clangxx_tsan -O1 %s -L%T -lignore_lib0 -o %t
 // RUN: echo running w/o suppressions:
-// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOSUPP
+// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP
 // RUN: echo running with suppressions:
 // RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
 

Modified: compiler-rt/trunk/test/tsan/ignore_lib1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib1.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib1.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib1.cc Fri May 30 09:08:51 2014
@@ -1,7 +1,7 @@
 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib1.so
 // RUN: %clangxx_tsan -O1 %s -o %t
 // RUN: echo running w/o suppressions:
-// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOSUPP
+// RUN: %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP
 // RUN: echo running with suppressions:
 // RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
 

Modified: compiler-rt/trunk/test/tsan/ignore_lib2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib2.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib2.cc Fri May 30 09:08:51 2014
@@ -1,7 +1,7 @@
 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib2_0.so
 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib2_1.so
 // RUN: %clangxx_tsan -O1 %s -o %t
-// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" not %run %t 2>&1 | FileCheck %s
+// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %deflake %run %t | FileCheck %s
 
 // Tests that called_from_lib suppression matched against 2 libraries
 // causes program crash (this is not supported).

Modified: compiler-rt/trunk/test/tsan/ignore_lib3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib3.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib3.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib3.cc Fri May 30 09:08:51 2014
@@ -1,6 +1,6 @@
 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib3.so
 // RUN: %clangxx_tsan -O1 %s -o %t
-// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" not %run %t 2>&1 | FileCheck %s
+// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %deflake %run %t | FileCheck %s
 
 // Tests that unloading of a library matched against called_from_lib suppression
 // causes program crash (this is not supported).

Modified: compiler-rt/trunk/test/tsan/ignore_sync.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_sync.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_sync.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_sync.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 

Modified: compiler-rt/trunk/test/tsan/inlined_memcpy_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/inlined_memcpy_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/inlined_memcpy_race.cc (original)
+++ compiler-rt/trunk/test/tsan/inlined_memcpy_race.cc Fri May 30 09:08:51 2014
@@ -1,22 +1,17 @@
-// 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 <stddef.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 
-int x[4], y[4], z[4];
+int x[4], z[4];
 
 void *MemCpyThread(void *a) {
   memcpy((int*)a, z, 16);
   return NULL;
 }
 
-void *MemMoveThread(void *a) {
-  memmove((int*)a, z, 16);
-  return NULL;
-}
-
 void *MemSetThread(void *a) {
   sleep(1);
   memset((int*)a, 0, 16);
@@ -30,12 +25,6 @@ int main() {
   pthread_create(&t[1], NULL, MemSetThread, x);
   pthread_join(t[0], NULL);
   pthread_join(t[1], NULL);
-  // Race on y between memmove and memset
-  pthread_create(&t[0], NULL, MemMoveThread, y);
-  pthread_create(&t[1], NULL, MemSetThread, y);
-  pthread_join(t[0], NULL);
-  pthread_join(t[1], NULL);
-
   printf("PASS\n");
   return 0;
 }
@@ -47,9 +36,3 @@ int main() {
 // CHECK:   #0 memcpy
 // CHECK:   #1 MemCpyThread
 
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK:   #0 memset
-// CHECK:   #1 MemSetThread
-// CHECK:  Previous write
-// CHECK:   #0 memmove
-// CHECK:   #1 MemMoveThread

Added: compiler-rt/trunk/test/tsan/inlined_memcpy_race2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/inlined_memcpy_race2.cc?rev=209898&view=auto
==============================================================================
--- compiler-rt/trunk/test/tsan/inlined_memcpy_race2.cc (added)
+++ compiler-rt/trunk/test/tsan/inlined_memcpy_race2.cc Fri May 30 09:08:51 2014
@@ -0,0 +1,38 @@
+// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
+#include <pthread.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+int y[4], z[4];
+
+void *MemMoveThread(void *a) {
+  memmove((int*)a, z, 16);
+  return NULL;
+}
+
+void *MemSetThread(void *a) {
+  sleep(1);
+  memset((int*)a, 0, 16);
+  return NULL;
+}
+
+int main() {
+  pthread_t t[2];
+  // Race on y between memmove and memset
+  pthread_create(&t[0], NULL, MemMoveThread, y);
+  pthread_create(&t[1], NULL, MemSetThread, y);
+  pthread_join(t[0], NULL);
+  pthread_join(t[1], NULL);
+
+  printf("PASS\n");
+  return 0;
+}
+
+// CHECK: WARNING: ThreadSanitizer: data race
+// CHECK:   #0 memset
+// CHECK:   #1 MemSetThread
+// CHECK:  Previous write
+// CHECK:   #0 memmove
+// CHECK:   #1 MemMoveThread

Modified: compiler-rt/trunk/test/tsan/java_lock_rec_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/java_lock_rec_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/java_lock_rec_race.cc (original)
+++ compiler-rt/trunk/test/tsan/java_lock_rec_race.cc Fri May 30 09:08:51 2014
@@ -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 "java.h"
 #include <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/java_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/java_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/java_race.cc (original)
+++ compiler-rt/trunk/test/tsan/java_race.cc Fri May 30 09:08:51 2014
@@ -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 "java.h"
 
 void *Thread(void *p) {

Modified: compiler-rt/trunk/test/tsan/java_race_move.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/java_race_move.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/java_race_move.cc (original)
+++ compiler-rt/trunk/test/tsan/java_race_move.cc Fri May 30 09:08:51 2014
@@ -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 "java.h"
 
 jptr varaddr;

Modified: compiler-rt/trunk/test/tsan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/lit.cfg?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/lit.cfg (original)
+++ compiler-rt/trunk/test/tsan/lit.cfg Fri May 30 09:08:51 2014
@@ -57,6 +57,8 @@ config.substitutions.append( ("%clangxx_
 # Define CHECK-%os to check for OS-dependent output.
 config.substitutions.append( ('CHECK-%os', ("CHECK-" + config.host_os)))
 
+config.substitutions.append( ("%deflake ", os.path.join(os.path.dirname(__file__), "deflake.bash")) )
+
 # Default test suffixes.
 config.suffixes = ['.c', '.cc', '.cpp']
 

Modified: compiler-rt/trunk/test/tsan/load_shared_lib.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/load_shared_lib.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/load_shared_lib.cc (original)
+++ compiler-rt/trunk/test/tsan/load_shared_lib.cc Fri May 30 09:08:51 2014
@@ -4,7 +4,7 @@
 
 // RUN: %clangxx_tsan -O1 %p/SharedLibs/load_shared_lib-so.cc \
 // RUN:     -fPIC -shared -o %t-so.so
-// 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 <dlfcn.h>
 #include <pthread.h>

Modified: compiler-rt/trunk/test/tsan/longjmp3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/longjmp3.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/longjmp3.cc (original)
+++ compiler-rt/trunk/test/tsan/longjmp3.cc Fri May 30 09:08:51 2014
@@ -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 <stdlib.h>

Modified: compiler-rt/trunk/test/tsan/longjmp4.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/longjmp4.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/longjmp4.cc (original)
+++ compiler-rt/trunk/test/tsan/longjmp4.cc Fri May 30 09:08:51 2014
@@ -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 <stdlib.h>

Modified: compiler-rt/trunk/test/tsan/malloc_hook.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/malloc_hook.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/malloc_hook.cc (original)
+++ compiler-rt/trunk/test/tsan/malloc_hook.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/tsan/malloc_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/malloc_stack.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/malloc_stack.cc (original)
+++ compiler-rt/trunk/test/tsan/malloc_stack.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/memcpy_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/memcpy_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/memcpy_race.cc (original)
+++ compiler-rt/trunk/test/tsan/memcpy_race.cc Fri May 30 09:08:51 2014
@@ -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 <stddef.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/tsan/mop_with_offset.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mop_with_offset.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mop_with_offset.cc (original)
+++ compiler-rt/trunk/test/tsan/mop_with_offset.cc Fri May 30 09:08:51 2014
@@ -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 <stddef.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/tsan/mop_with_offset2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mop_with_offset2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mop_with_offset2.cc (original)
+++ compiler-rt/trunk/test/tsan/mop_with_offset2.cc Fri May 30 09:08:51 2014
@@ -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 <stddef.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/tsan/mutex_bad_read_lock.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutex_bad_read_lock.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutex_bad_read_lock.cc (original)
+++ compiler-rt/trunk/test/tsan/mutex_bad_read_lock.cc Fri May 30 09:08:51 2014
@@ -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
 extern "C" void AnnotateRWLockAcquired(const char *f, int l, void *m, long rw);
 
 int main() {

Modified: compiler-rt/trunk/test/tsan/mutex_bad_read_unlock.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutex_bad_read_unlock.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutex_bad_read_unlock.cc (original)
+++ compiler-rt/trunk/test/tsan/mutex_bad_read_unlock.cc Fri May 30 09:08:51 2014
@@ -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
 extern "C" void AnnotateRWLockAcquired(const char *f, int l, void *m, long rw);
 extern "C" void AnnotateRWLockReleased(const char *f, int l, void *m, long rw);
 

Modified: compiler-rt/trunk/test/tsan/mutex_bad_unlock.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutex_bad_unlock.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutex_bad_unlock.cc (original)
+++ compiler-rt/trunk/test/tsan/mutex_bad_unlock.cc Fri May 30 09:08:51 2014
@@ -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
 extern "C" void AnnotateRWLockReleased(const char *f, int l, void *m, long rw);
 
 int main() {

Modified: compiler-rt/trunk/test/tsan/mutex_destroy_locked.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutex_destroy_locked.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutex_destroy_locked.cc (original)
+++ compiler-rt/trunk/test/tsan/mutex_destroy_locked.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/mutex_double_lock.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutex_double_lock.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutex_double_lock.cc (original)
+++ compiler-rt/trunk/test/tsan/mutex_double_lock.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/mutex_robust2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutex_robust2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutex_robust2.cc (original)
+++ compiler-rt/trunk/test/tsan/mutex_robust2.cc Fri May 30 09:08:51 2014
@@ -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>

Modified: compiler-rt/trunk/test/tsan/mutexset1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutexset1.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutexset1.cc (original)
+++ compiler-rt/trunk/test/tsan/mutexset1.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/mutexset2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutexset2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutexset2.cc (original)
+++ compiler-rt/trunk/test/tsan/mutexset2.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/mutexset3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutexset3.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutexset3.cc (original)
+++ compiler-rt/trunk/test/tsan/mutexset3.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/mutexset4.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutexset4.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutexset4.cc (original)
+++ compiler-rt/trunk/test/tsan/mutexset4.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/mutexset5.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutexset5.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutexset5.cc (original)
+++ compiler-rt/trunk/test/tsan/mutexset5.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/mutexset6.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutexset6.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutexset6.cc (original)
+++ compiler-rt/trunk/test/tsan/mutexset6.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/mutexset7.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutexset7.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutexset7.cc (original)
+++ compiler-rt/trunk/test/tsan/mutexset7.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/mutexset8.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutexset8.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutexset8.cc (original)
+++ compiler-rt/trunk/test/tsan/mutexset8.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/pthread_atfork_deadlock.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/pthread_atfork_deadlock.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/pthread_atfork_deadlock.c (original)
+++ compiler-rt/trunk/test/tsan/pthread_atfork_deadlock.c Fri May 30 09:08:51 2014
@@ -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
 // Regression test for
 // https://code.google.com/p/thread-sanitizer/issues/detail?id=61
 // When the data race was reported, pthread_atfork() handler used to be

Modified: compiler-rt/trunk/test/tsan/race_on_barrier.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_on_barrier.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_on_barrier.c (original)
+++ compiler-rt/trunk/test/tsan/race_on_barrier.c Fri May 30 09:08:51 2014
@@ -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>

Modified: compiler-rt/trunk/test/tsan/race_on_barrier2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_on_barrier2.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_on_barrier2.c (original)
+++ compiler-rt/trunk/test/tsan/race_on_barrier2.c Fri May 30 09:08:51 2014
@@ -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>

Modified: compiler-rt/trunk/test/tsan/race_on_heap.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_on_heap.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_on_heap.cc (original)
+++ compiler-rt/trunk/test/tsan/race_on_heap.cc Fri May 30 09:08:51 2014
@@ -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
 // ...

Modified: compiler-rt/trunk/test/tsan/race_on_mutex.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_on_mutex.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_on_mutex.c (original)
+++ compiler-rt/trunk/test/tsan/race_on_mutex.c Fri May 30 09:08:51 2014
@@ -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>

Modified: compiler-rt/trunk/test/tsan/race_on_mutex2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_on_mutex2.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_on_mutex2.c (original)
+++ compiler-rt/trunk/test/tsan/race_on_mutex2.c Fri May 30 09:08:51 2014
@@ -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>

Modified: compiler-rt/trunk/test/tsan/race_on_read.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_on_read.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_on_read.cc (original)
+++ compiler-rt/trunk/test/tsan/race_on_read.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/race_on_write.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_on_write.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_on_write.cc (original)
+++ compiler-rt/trunk/test/tsan/race_on_write.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/race_with_finished_thread.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/race_with_finished_thread.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/race_with_finished_thread.cc (original)
+++ compiler-rt/trunk/test/tsan/race_with_finished_thread.cc Fri May 30 09:08:51 2014
@@ -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 <stddef.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/tsan/signal_errno.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/signal_errno.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/signal_errno.cc (original)
+++ compiler-rt/trunk/test/tsan/signal_errno.cc Fri May 30 09:08:51 2014
@@ -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 <stdlib.h>

Modified: compiler-rt/trunk/test/tsan/signal_malloc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/signal_malloc.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/signal_malloc.cc (original)
+++ compiler-rt/trunk/test/tsan/signal_malloc.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <stdlib.h>
 #include <signal.h>

Modified: compiler-rt/trunk/test/tsan/sigsuspend.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/sigsuspend.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/sigsuspend.cc (original)
+++ compiler-rt/trunk/test/tsan/sigsuspend.cc Fri May 30 09:08:51 2014
@@ -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
 
 // Always enable asserts.
 #ifdef NDEBUG

Modified: compiler-rt/trunk/test/tsan/simple_race.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/simple_race.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/simple_race.c (original)
+++ compiler-rt/trunk/test/tsan/simple_race.c Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
@@ -26,3 +26,4 @@ int main() {
 }
 
 // CHECK: WARNING: ThreadSanitizer: data race
+

Modified: compiler-rt/trunk/test/tsan/simple_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/simple_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/simple_race.cc (original)
+++ compiler-rt/trunk/test/tsan/simple_race.cc Fri May 30 09:08:51 2014
@@ -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 2>&1 | FileCheck %s
 #include <pthread.h>
 #include <stdio.h>
 

Modified: compiler-rt/trunk/test/tsan/simple_stack.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/simple_stack.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/simple_stack.c (original)
+++ compiler-rt/trunk/test/tsan/simple_stack.c Fri May 30 09:08:51 2014
@@ -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 <unistd.h>

Modified: compiler-rt/trunk/test/tsan/simple_stack2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/simple_stack2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/simple_stack2.cc (original)
+++ compiler-rt/trunk/test/tsan/simple_stack2.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/sleep_sync.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/sleep_sync.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/sleep_sync.cc (original)
+++ compiler-rt/trunk/test/tsan/sleep_sync.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/sleep_sync2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/sleep_sync2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/sleep_sync2.cc (original)
+++ compiler-rt/trunk/test/tsan/sleep_sync2.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/stack_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/stack_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/stack_race.cc (original)
+++ compiler-rt/trunk/test/tsan/stack_race.cc Fri May 30 09:08:51 2014
@@ -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 <stddef.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/stack_race2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/stack_race2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/stack_race2.cc (original)
+++ compiler-rt/trunk/test/tsan/stack_race2.cc Fri May 30 09:08:51 2014
@@ -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 <stddef.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/static_init3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/static_init3.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/static_init3.cc (original)
+++ compiler-rt/trunk/test/tsan/static_init3.cc Fri May 30 09:08:51 2014
@@ -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>

Modified: compiler-rt/trunk/test/tsan/suppress_same_address.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/suppress_same_address.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/suppress_same_address.cc (original)
+++ compiler-rt/trunk/test/tsan/suppress_same_address.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/suppress_same_stacks.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/suppress_same_stacks.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/suppress_same_stacks.cc (original)
+++ compiler-rt/trunk/test/tsan/suppress_same_stacks.cc Fri May 30 09:08:51 2014
@@ -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>
 
 volatile int N;  // Prevent loop unrolling.

Modified: compiler-rt/trunk/test/tsan/thread_end_with_ignore.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/thread_end_with_ignore.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/thread_end_with_ignore.cc (original)
+++ compiler-rt/trunk/test/tsan/thread_end_with_ignore.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 

Modified: compiler-rt/trunk/test/tsan/thread_end_with_ignore2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/thread_end_with_ignore2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/thread_end_with_ignore2.cc (original)
+++ compiler-rt/trunk/test/tsan/thread_end_with_ignore2.cc Fri May 30 09:08:51 2014
@@ -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
 extern "C" void AnnotateIgnoreWritesBegin(const char *f, int l);
 
 int main() {

Modified: compiler-rt/trunk/test/tsan/thread_end_with_ignore3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/thread_end_with_ignore3.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/thread_end_with_ignore3.cc (original)
+++ compiler-rt/trunk/test/tsan/thread_end_with_ignore3.cc Fri May 30 09:08:51 2014
@@ -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
 extern "C" void AnnotateIgnoreReadsBegin(const char *f, int l);
 extern "C" void AnnotateIgnoreReadsEnd(const char *f, int l);
 

Modified: compiler-rt/trunk/test/tsan/thread_leak3.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/thread_leak3.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/thread_leak3.c (original)
+++ compiler-rt/trunk/test/tsan/thread_leak3.c Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/thread_leak5.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/thread_leak5.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/thread_leak5.c (original)
+++ compiler-rt/trunk/test/tsan/thread_leak5.c Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/thread_name.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/thread_name.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/thread_name.cc (original)
+++ compiler-rt/trunk/test/tsan/thread_name.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/thread_name2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/thread_name2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/thread_name2.cc (original)
+++ compiler-rt/trunk/test/tsan/thread_name2.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/tiny_race.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/tiny_race.c?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/tiny_race.c (original)
+++ compiler-rt/trunk/test/tsan/tiny_race.c Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 

Modified: compiler-rt/trunk/test/tsan/tls_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/tls_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/tls_race.cc (original)
+++ compiler-rt/trunk/test/tsan/tls_race.cc Fri May 30 09:08:51 2014
@@ -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 <stddef.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/tls_race2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/tls_race2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/tls_race2.cc (original)
+++ compiler-rt/trunk/test/tsan/tls_race2.cc Fri May 30 09:08:51 2014
@@ -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 <stddef.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/unaligned_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/unaligned_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/unaligned_race.cc (original)
+++ compiler-rt/trunk/test/tsan/unaligned_race.cc Fri May 30 09:08:51 2014
@@ -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 <stdio.h>
 #include <stdlib.h>

Modified: compiler-rt/trunk/test/tsan/vptr_harmful_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/vptr_harmful_race.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/vptr_harmful_race.cc (original)
+++ compiler-rt/trunk/test/tsan/vptr_harmful_race.cc Fri May 30 09:08:51 2014
@@ -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 <semaphore.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/tsan/vptr_harmful_race2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/vptr_harmful_race2.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/vptr_harmful_race2.cc (original)
+++ compiler-rt/trunk/test/tsan/vptr_harmful_race2.cc Fri May 30 09:08:51 2014
@@ -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 <semaphore.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/tsan/vptr_harmful_race3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/vptr_harmful_race3.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/vptr_harmful_race3.cc (original)
+++ compiler-rt/trunk/test/tsan/vptr_harmful_race3.cc Fri May 30 09:08:51 2014
@@ -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 <semaphore.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/tsan/write_in_reader_lock.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/write_in_reader_lock.cc?rev=209898&r1=209897&r2=209898&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/write_in_reader_lock.cc (original)
+++ compiler-rt/trunk/test/tsan/write_in_reader_lock.cc Fri May 30 09:08:51 2014
@@ -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 <unistd.h>
 





More information about the llvm-commits mailing list