[PATCH] D14873: [tsan] Modify the tls_race.cc and tls_race2.cc tests to pass on OS X

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 22 11:40:42 PST 2015


kubabrecka updated this revision to Diff 40884.
kubabrecka added a comment.

Updating patch.


http://reviews.llvm.org/D14873

Files:
  test/tsan/tls_race.cc
  test/tsan/tls_race2.cc

Index: test/tsan/tls_race2.cc
===================================================================
--- test/tsan/tls_race2.cc
+++ test/tsan/tls_race2.cc
@@ -1,4 +1,4 @@
-// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
+// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
 #include "test.h"
 
 void *Thread2(void *a) {
@@ -25,5 +25,6 @@
 }
 
 // CHECK: WARNING: ThreadSanitizer: data race
-// CHECK:   Location is TLS of thread T1.
-
+// CHECK-Linux:   Location is TLS of thread T1.
+// CHECK-FreeBSD:   Location is TLS of thread T1.
+// CHECK-Darwin:   Location is heap block of size 4
Index: test/tsan/tls_race.cc
===================================================================
--- test/tsan/tls_race.cc
+++ test/tsan/tls_race.cc
@@ -1,4 +1,4 @@
-// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
+// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
 #include "test.h"
 
 void *Thread(void *a) {
@@ -18,4 +18,6 @@
 }
 
 // CHECK: WARNING: ThreadSanitizer: data race
-// CHECK:   Location is TLS of main thread.
+// CHECK-Linux:   Location is TLS of main thread.
+// CHECK-FreeBSD:   Location is TLS of main thread.
+// CHECK-Darwin:   Location is heap block of size 4


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14873.40884.patch
Type: text/x-patch
Size: 1342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151122/70a3aed5/attachment.bin>


More information about the llvm-commits mailing list