[compiler-rt] r265658 - [tsan] Fix Darwin tests (missing FileCheck's)
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 04:31:03 PDT 2016
Author: kuba.brecka
Date: Thu Apr 7 06:31:02 2016
New Revision: 265658
URL: http://llvm.org/viewvc/llvm-project?rev=265658&view=rev
Log:
[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
Modified:
compiler-rt/trunk/test/tsan/Darwin/gcd-async-norace.mm
compiler-rt/trunk/test/tsan/Darwin/gcd-async-race.mm
compiler-rt/trunk/test/tsan/Darwin/gcd-groups-norace.mm
compiler-rt/trunk/test/tsan/Darwin/gcd-groups-stress.mm
compiler-rt/trunk/test/tsan/Darwin/gcd-once.mm
compiler-rt/trunk/test/tsan/Darwin/gcd-semaphore-norace.mm
compiler-rt/trunk/test/tsan/Darwin/gcd-serial-queue-norace.mm
compiler-rt/trunk/test/tsan/Darwin/gcd-sync-norace.mm
compiler-rt/trunk/test/tsan/Darwin/gcd-sync-race.mm
compiler-rt/trunk/test/tsan/Darwin/objc-race.mm
compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm
Modified: compiler-rt/trunk/test/tsan/Darwin/gcd-async-norace.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/gcd-async-norace.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/gcd-async-norace.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/gcd-async-norace.mm Thu Apr 7 06:31:02 2016
@@ -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>
Modified: compiler-rt/trunk/test/tsan/Darwin/gcd-async-race.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/gcd-async-race.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/gcd-async-race.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/gcd-async-race.mm Thu Apr 7 06:31:02 2016
@@ -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.
Modified: compiler-rt/trunk/test/tsan/Darwin/gcd-groups-norace.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/gcd-groups-norace.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/gcd-groups-norace.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/gcd-groups-norace.mm Thu Apr 7 06:31:02 2016
@@ -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>
Modified: compiler-rt/trunk/test/tsan/Darwin/gcd-groups-stress.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/gcd-groups-stress.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/gcd-groups-stress.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/gcd-groups-stress.mm Thu Apr 7 06:31:02 2016
@@ -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>
Modified: compiler-rt/trunk/test/tsan/Darwin/gcd-once.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/gcd-once.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/gcd-once.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/gcd-once.mm Thu Apr 7 06:31:02 2016
@@ -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>
Modified: compiler-rt/trunk/test/tsan/Darwin/gcd-semaphore-norace.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/gcd-semaphore-norace.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/gcd-semaphore-norace.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/gcd-semaphore-norace.mm Thu Apr 7 06:31:02 2016
@@ -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>
Modified: compiler-rt/trunk/test/tsan/Darwin/gcd-serial-queue-norace.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/gcd-serial-queue-norace.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/gcd-serial-queue-norace.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/gcd-serial-queue-norace.mm Thu Apr 7 06:31:02 2016
@@ -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>
Modified: compiler-rt/trunk/test/tsan/Darwin/gcd-sync-norace.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/gcd-sync-norace.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/gcd-sync-norace.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/gcd-sync-norace.mm Thu Apr 7 06:31:02 2016
@@ -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>
Modified: compiler-rt/trunk/test/tsan/Darwin/gcd-sync-race.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/gcd-sync-race.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/gcd-sync-race.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/gcd-sync-race.mm Thu Apr 7 06:31:02 2016
@@ -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.
Modified: compiler-rt/trunk/test/tsan/Darwin/objc-race.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/objc-race.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/objc-race.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/objc-race.mm Thu Apr 7 06:31:02 2016
@@ -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.
Modified: compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm?rev=265658&r1=265657&r2=265658&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm Thu Apr 7 06:31:02 2016
@@ -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>
More information about the llvm-commits
mailing list