From aafb41ae473576c1c06bf3d03dcb1fec15f7b711 Mon Sep 17 00:00:00 2001 From: Kuba Brecka Date: Thu, 7 Apr 2016 11:31:02 +0000 Subject: [PATCH] [tsan] Fix Darwin tests (missing FileCheck's) 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 | 2 +- compiler-rt/test/tsan/Darwin/gcd-async-race.mm | 6 +++--- compiler-rt/test/tsan/Darwin/gcd-groups-norace.mm | 2 +- compiler-rt/test/tsan/Darwin/gcd-groups-stress.mm | 2 +- compiler-rt/test/tsan/Darwin/gcd-once.mm | 2 +- compiler-rt/test/tsan/Darwin/gcd-semaphore-norace.mm | 2 +- compiler-rt/test/tsan/Darwin/gcd-serial-queue-norace.mm | 2 +- compiler-rt/test/tsan/Darwin/gcd-sync-norace.mm | 2 +- compiler-rt/test/tsan/Darwin/gcd-sync-race.mm | 6 +++--- compiler-rt/test/tsan/Darwin/objc-race.mm | 4 ++-- compiler-rt/test/tsan/Darwin/objc-simple.mm | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/compiler-rt/test/tsan/Darwin/gcd-async-norace.mm b/compiler-rt/test/tsan/Darwin/gcd-async-norace.mm index a8174f9..c7e28b4 100644 --- a/compiler-rt/test/tsan/Darwin/gcd-async-norace.mm +++ b/compiler-rt/test/tsan/Darwin/gcd-async-norace.mm @@ -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 diff --git a/compiler-rt/test/tsan/Darwin/gcd-async-race.mm b/compiler-rt/test/tsan/Darwin/gcd-async-race.mm index b83dc01..1002a56 100644 --- a/compiler-rt/test/tsan/Darwin/gcd-async-race.mm +++ b/compiler-rt/test/tsan/Darwin/gcd-async-race.mm @@ -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 @@ -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. diff --git a/compiler-rt/test/tsan/Darwin/gcd-groups-norace.mm b/compiler-rt/test/tsan/Darwin/gcd-groups-norace.mm index a73881d..64ec386 100644 --- a/compiler-rt/test/tsan/Darwin/gcd-groups-norace.mm +++ b/compiler-rt/test/tsan/Darwin/gcd-groups-norace.mm @@ -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 diff --git a/compiler-rt/test/tsan/Darwin/gcd-groups-stress.mm b/compiler-rt/test/tsan/Darwin/gcd-groups-stress.mm index 96a20f4..457d9af 100644 --- a/compiler-rt/test/tsan/Darwin/gcd-groups-stress.mm +++ b/compiler-rt/test/tsan/Darwin/gcd-groups-stress.mm @@ -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 diff --git a/compiler-rt/test/tsan/Darwin/gcd-once.mm b/compiler-rt/test/tsan/Darwin/gcd-once.mm index 4546761..3e4a533 100644 --- a/compiler-rt/test/tsan/Darwin/gcd-once.mm +++ b/compiler-rt/test/tsan/Darwin/gcd-once.mm @@ -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 diff --git a/compiler-rt/test/tsan/Darwin/gcd-semaphore-norace.mm b/compiler-rt/test/tsan/Darwin/gcd-semaphore-norace.mm index c7280b2..20bc572 100644 --- a/compiler-rt/test/tsan/Darwin/gcd-semaphore-norace.mm +++ b/compiler-rt/test/tsan/Darwin/gcd-semaphore-norace.mm @@ -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 diff --git a/compiler-rt/test/tsan/Darwin/gcd-serial-queue-norace.mm b/compiler-rt/test/tsan/Darwin/gcd-serial-queue-norace.mm index a6b47ab..95efbb7 100644 --- a/compiler-rt/test/tsan/Darwin/gcd-serial-queue-norace.mm +++ b/compiler-rt/test/tsan/Darwin/gcd-serial-queue-norace.mm @@ -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 diff --git a/compiler-rt/test/tsan/Darwin/gcd-sync-norace.mm b/compiler-rt/test/tsan/Darwin/gcd-sync-norace.mm index b820e0a..c683524 100644 --- a/compiler-rt/test/tsan/Darwin/gcd-sync-norace.mm +++ b/compiler-rt/test/tsan/Darwin/gcd-sync-norace.mm @@ -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 diff --git a/compiler-rt/test/tsan/Darwin/gcd-sync-race.mm b/compiler-rt/test/tsan/Darwin/gcd-sync-race.mm index 6fc568d..650faa4 100644 --- a/compiler-rt/test/tsan/Darwin/gcd-sync-race.mm +++ b/compiler-rt/test/tsan/Darwin/gcd-sync-race.mm @@ -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 @@ -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. diff --git a/compiler-rt/test/tsan/Darwin/objc-race.mm b/compiler-rt/test/tsan/Darwin/objc-race.mm index bd93d2f..82fcc4e 100644 --- a/compiler-rt/test/tsan/Darwin/objc-race.mm +++ b/compiler-rt/test/tsan/Darwin/objc-race.mm @@ -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 @@ -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. diff --git a/compiler-rt/test/tsan/Darwin/objc-simple.mm b/compiler-rt/test/tsan/Darwin/objc-simple.mm index a4bf1f1..b62d0eb 100644 --- a/compiler-rt/test/tsan/Darwin/objc-simple.mm +++ b/compiler-rt/test/tsan/Darwin/objc-simple.mm @@ -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 -- 2.7.4