[tsan] Fix Darwin tests (missing FileCheck's)
authorKuba Brecka <kuba.brecka@gmail.com>
Thu, 7 Apr 2016 11:31:02 +0000 (11:31 +0000)
committerKuba Brecka <kuba.brecka@gmail.com>
Thu, 7 Apr 2016 11:31:02 +0000 (11:31 +0000)
A little embarrassing, but we're missing the call to FileCheck in several Darwin tests. Let's fix this.

Differential Revision: http://reviews.llvm.org/D18503

llvm-svn: 265658

compiler-rt/test/tsan/Darwin/gcd-async-norace.mm
compiler-rt/test/tsan/Darwin/gcd-async-race.mm
compiler-rt/test/tsan/Darwin/gcd-groups-norace.mm
compiler-rt/test/tsan/Darwin/gcd-groups-stress.mm
compiler-rt/test/tsan/Darwin/gcd-once.mm
compiler-rt/test/tsan/Darwin/gcd-semaphore-norace.mm
compiler-rt/test/tsan/Darwin/gcd-serial-queue-norace.mm
compiler-rt/test/tsan/Darwin/gcd-sync-norace.mm
compiler-rt/test/tsan/Darwin/gcd-sync-race.mm
compiler-rt/test/tsan/Darwin/objc-race.mm
compiler-rt/test/tsan/Darwin/objc-simple.mm

index a8174f9..c7e28b4 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1
+// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 
index b83dc01..1002a56 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1
+// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 
@@ -9,7 +9,7 @@ long global;
 
 int main() {
   NSLog(@"Hello world.");
-  NSLog(@"addr=%p\n", &global);
+  print_address("addr=", 1, &global);
   barrier_init(&barrier, 2);
 
   global = 42;
@@ -34,5 +34,5 @@ int main() {
 // CHECK: Hello world.
 // CHECK: addr=[[ADDR:0x[0-9,a-f]+]]
 // CHECK: WARNING: ThreadSanitizer: data race
-// CHECK: Location is global 'global' at [[ADDR]] (global_race.cc.exe+0x{{[0-9,a-f]+}})
+// CHECK: Location is global 'global' {{(of size 8 )?}}at [[ADDR]] (gcd-async-race.mm.tmp+0x{{[0-9,a-f]+}})
 // CHECK: Done.
index a73881d..64ec386 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1
+// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 
index 96a20f4..457d9af 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1
+// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 
index 4546761..3e4a533 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1
+// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 
index c7280b2..20bc572 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1
+// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 
index a6b47ab..95efbb7 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1
+// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 
index b820e0a..c683524 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1
+// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 
index 6fc568d..650faa4 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1
+// RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 
@@ -9,7 +9,7 @@ long global;
 
 int main() {
   NSLog(@"Hello world.");
-  NSLog(@"addr=%p\n", &global);
+  print_address("addr=", 1, &global);
   barrier_init(&barrier, 2);
 
   dispatch_queue_t q1 = dispatch_queue_create("my.queue1", DISPATCH_QUEUE_CONCURRENT);
@@ -40,5 +40,5 @@ int main() {
 // CHECK: Hello world.
 // CHECK: addr=[[ADDR:0x[0-9,a-f]+]]
 // CHECK: WARNING: ThreadSanitizer: data race
-// CHECK: Location is global 'global' at [[ADDR]] (global_race.cc.exe+0x{{[0-9,a-f]+}})
+// CHECK: Location is global 'global' {{(of size 8 )?}}at [[ADDR]] (gcd-sync-race.mm.tmp+0x{{[0-9,a-f]+}})
 // CHECK: Done.
index bd93d2f..82fcc4e 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %deflake %run %t 2>&1
+// RUN: %deflake %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 
@@ -49,7 +49,7 @@ int main() {
 // CHECK: WARNING: ThreadSanitizer: data race
 // CHECK:   Write of size 8
 // CHECK:     #0 -[MyClass method:]
-// CHECK:   Write of size 8
+// CHECK:   Previous write of size 8
 // CHECK:     #0 -[MyClass method:]
 // CHECK:   Location is heap block
 // CHECK: Done.
index a4bf1f1..b62d0eb 100644 (file)
@@ -1,7 +1,7 @@
 // Test that a simple Obj-C program runs and exits without any warnings.
 
 // RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %run %t 2>&1
+// RUN: %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>