[compiler-rt] r360927 - [TSan][libdispatch] Use FileCheck's --implicit-check-not=...

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 11:57:36 PDT 2019


Author: yln
Date: Thu May 16 11:57:36 2019
New Revision: 360927

URL: http://llvm.org/viewvc/llvm-project?rev=360927&view=rev
Log:
[TSan][libdispatch] Use FileCheck's --implicit-check-not=...

Use FileCheck's --implicit-check-not='ThreadSanitizer' which increases
the strictness of our tests a bit. NFC.

```
CHECK: start
CHECK-NOT: ThreadSanitizer
CHECK: done
```

With --implicit-check-not, the above is turned into:

```
CHECK-NOT: ThreadSanitizer
CHECK: start
CHECK-NOT: ThreadSanitizer
CHECK: done
CHECK-NOT: ThreadSanitizer
```

Modified:
    compiler-rt/trunk/test/tsan/libdispatch/after.c
    compiler-rt/trunk/test/tsan/libdispatch/async-norace.c
    compiler-rt/trunk/test/tsan/libdispatch/barrier.c
    compiler-rt/trunk/test/tsan/libdispatch/blocks.c
    compiler-rt/trunk/test/tsan/libdispatch/fd.c
    compiler-rt/trunk/test/tsan/libdispatch/groups-norace.c
    compiler-rt/trunk/test/tsan/libdispatch/io-barrier.c
    compiler-rt/trunk/test/tsan/libdispatch/io-cleanup.c
    compiler-rt/trunk/test/tsan/libdispatch/io.c
    compiler-rt/trunk/test/tsan/libdispatch/serial-queue-norace.c
    compiler-rt/trunk/test/tsan/libdispatch/source-cancel.c
    compiler-rt/trunk/test/tsan/libdispatch/source-cancel2.c
    compiler-rt/trunk/test/tsan/libdispatch/source-event.c
    compiler-rt/trunk/test/tsan/libdispatch/source-event2.c
    compiler-rt/trunk/test/tsan/libdispatch/source-registration.c
    compiler-rt/trunk/test/tsan/libdispatch/source-registration2.c
    compiler-rt/trunk/test/tsan/libdispatch/sync-norace.c
    compiler-rt/trunk/test/tsan/libdispatch/target-queue-norace.c

Modified: compiler-rt/trunk/test/tsan/libdispatch/after.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/after.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/after.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/after.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -39,4 +39,3 @@ int main(int argc, const char *argv[]) {
 
 // CHECK: start
 // CHECK: done
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/async-norace.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/async-norace.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/async-norace.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/async-norace.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -24,4 +24,3 @@ int main() {
 
 // CHECK: Hello world.
 // CHECK: Done.
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/barrier.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/barrier.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/barrier.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/barrier.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -44,4 +44,3 @@ int main() {
 
 // CHECK: Hello world.
 // CHECK: Done.
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/blocks.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/blocks.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/blocks.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/blocks.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -33,5 +33,3 @@ int main() {
 // CHECK: start
 // CHECK: block_var = 42
 // CHECK: done
-// CHECK-NOT: WARNING: ThreadSanitizer
-// CHECK-NOT: CHECK failed

Modified: compiler-rt/trunk/test/tsan/libdispatch/fd.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/fd.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/fd.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/fd.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include <dispatch/dispatch.h>
 
@@ -58,5 +58,4 @@ int main(int argc, const char *argv[]) {
 }
 
 // CHECK: Hello world.
-// CHECK-NOT: WARNING: ThreadSanitizer
 // CHECK: Done.

Modified: compiler-rt/trunk/test/tsan/libdispatch/groups-norace.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/groups-norace.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/groups-norace.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/groups-norace.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -48,4 +48,3 @@ int main() {
 
 // CHECK: Hello world.
 // CHECK: Done.
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/io-barrier.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/io-barrier.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/io-barrier.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/io-barrier.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include <dispatch/dispatch.h>
 
@@ -46,5 +46,4 @@ int main(int argc, const char *argv[]) {
 }
 
 // CHECK: Hello world.
-// CHECK-NOT: WARNING: ThreadSanitizer
 // CHECK: Done.

Modified: compiler-rt/trunk/test/tsan/libdispatch/io-cleanup.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/io-cleanup.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/io-cleanup.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/io-cleanup.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include <dispatch/dispatch.h>
 
@@ -54,5 +54,4 @@ int main(int argc, const char *argv[]) {
 }
 
 // CHECK: Hello world.
-// CHECK-NOT: WARNING: ThreadSanitizer
 // CHECK: Done.

Modified: compiler-rt/trunk/test/tsan/libdispatch/io.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/io.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/io.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/io.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include <dispatch/dispatch.h>
 
@@ -115,5 +115,4 @@ int main(int argc, const char *argv[]) {
 }
 
 // CHECK: Hello world.
-// CHECK-NOT: WARNING: ThreadSanitizer
 // CHECK: Done.

Modified: compiler-rt/trunk/test/tsan/libdispatch/serial-queue-norace.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/serial-queue-norace.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/serial-queue-norace.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/serial-queue-norace.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -35,4 +35,3 @@ int main() {
 
 // CHECK: Hello world.
 // CHECK: Done.
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/source-cancel.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/source-cancel.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/source-cancel.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/source-cancel.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -35,4 +35,3 @@ int main(int argc, const char *argv[]) {
 }
 
 // CHECK: global = 42
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/source-cancel2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/source-cancel2.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/source-cancel2.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/source-cancel2.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -38,4 +38,3 @@ int main(int argc, const char *argv[]) {
 }
 
 // CHECK: global = 42
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/source-event.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/source-event.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/source-event.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/source-event.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -34,4 +34,3 @@ int main(int argc, const char *argv[]) {
 }
 
 // CHECK: global = 42
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/source-event2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/source-event2.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/source-event2.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/source-event2.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -37,4 +37,3 @@ int main(int argc, const char *argv[]) {
 }
 
 // CHECK: global = 42
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/source-registration.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/source-registration.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/source-registration.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/source-registration.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -32,4 +32,3 @@ int main(int argc, const char *argv[]) {
 }
 
 // CHECK: global = 42
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/source-registration2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/source-registration2.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/source-registration2.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/source-registration2.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -35,4 +35,3 @@ int main(int argc, const char *argv[]) {
 }
 
 // CHECK: global = 42
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/sync-norace.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/sync-norace.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/sync-norace.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/sync-norace.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -34,4 +34,3 @@ int main() {
 
 // CHECK: Hello world.
 // CHECK: Done.
-// CHECK-NOT: WARNING: ThreadSanitizer

Modified: compiler-rt/trunk/test/tsan/libdispatch/target-queue-norace.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/libdispatch/target-queue-norace.c?rev=360927&r1=360926&r2=360927&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/libdispatch/target-queue-norace.c (original)
+++ compiler-rt/trunk/test/tsan/libdispatch/target-queue-norace.c Thu May 16 11:57:36 2019
@@ -1,5 +1,5 @@
 // RUN: %clang_tsan %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'
 
 #include "dispatch/dispatch.h"
 
@@ -37,5 +37,4 @@ int main(int argc, const char *argv[]) {
   return 0;
 }
 
-// CHECK-NOT: WARNING: ThreadSanitizer
 // CHECK: Done.




More information about the llvm-commits mailing list