[compiler-rt] a59283a - [test] Fix unused FileCheck prefixes in compiler-rt

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 22:32:21 PST 2021


Author: Fangrui Song
Date: 2021-02-01T22:32:13-08:00
New Revision: a59283a74529c74a8ee8682f9acf9d993f7cda08

URL: https://github.com/llvm/llvm-project/commit/a59283a74529c74a8ee8682f9acf9d993f7cda08
DIFF: https://github.com/llvm/llvm-project/commit/a59283a74529c74a8ee8682f9acf9d993f7cda08.diff

LOG: [test] Fix unused FileCheck prefixes in compiler-rt

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/asan_update_allocation.cpp
    compiler-rt/test/msan/death-callback.cpp
    compiler-rt/test/ubsan_minimal/TestCases/nullptr-and-nonzero-offset.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/asan_update_allocation.cpp b/compiler-rt/test/asan/TestCases/asan_update_allocation.cpp
index 065f793092f0..19f8073e0509 100644
--- a/compiler-rt/test/asan/TestCases/asan_update_allocation.cpp
+++ b/compiler-rt/test/asan/TestCases/asan_update_allocation.cpp
@@ -1,9 +1,9 @@
 // RUN: %clangxx_asan -O0 %s -o %t
 
-// RUN: not %run %t 10 0 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefixes=CHECK,T0
+// RUN: not %run %t 10 0 2>&1 | FileCheck %s --check-prefixes=CHECK,T0
 // RUN: not %run %t 10000000 0 2>&1 | FileCheck %s --check-prefixes=CHECK,T0
 
-// RUN: not %run %t 10 1 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefixes=CHECK,T1
+// RUN: not %run %t 10 1 2>&1 | FileCheck %s --check-prefixes=CHECK,T1
 // RUN: not %run %t 10000000 1 2>&1 | FileCheck %s --check-prefixes=CHECK,T1
 
 // REQUIRES: stable-runtime

diff  --git a/compiler-rt/test/msan/death-callback.cpp b/compiler-rt/test/msan/death-callback.cpp
index 08cf2911b0f9..a22514d0c38b 100644
--- a/compiler-rt/test/msan/death-callback.cpp
+++ b/compiler-rt/test/msan/death-callback.cpp
@@ -5,7 +5,7 @@
 // RUN: %clangxx_msan -DERROR -DMSANCB_SET -DMSANCB_CLEAR %s -o %t && not %run %t 2>&1 | \
 // RUN:     FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCB
 // RUN: %clangxx_msan -DMSANCB_SET %s -o %t && %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCB
+// RUN:     FileCheck %s --check-prefixes=SUCCEED,CHECK-NOCB
 
 #include <sanitizer/msan_interface.h>
 #include <stdio.h>
@@ -34,6 +34,9 @@ int main(int argc, char **argv) {
 #endif
   // CHECK-CB: msan-death-callback
   // CHECK-NOCB-NOT: msan-death-callback
+
+  // CHECK-NOT: done
+  // SUCCEED: done
   fprintf(stderr, "done\n");
   return 0;
 }

diff  --git a/compiler-rt/test/ubsan_minimal/TestCases/nullptr-and-nonzero-offset.c b/compiler-rt/test/ubsan_minimal/TestCases/nullptr-and-nonzero-offset.c
index ba930341b4a9..699aeee5d821 100644
--- a/compiler-rt/test/ubsan_minimal/TestCases/nullptr-and-nonzero-offset.c
+++ b/compiler-rt/test/ubsan_minimal/TestCases/nullptr-and-nonzero-offset.c
@@ -1,5 +1,5 @@
 // RUN: %clang   -fsanitize=pointer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-C --implicit-check-not="pointer-overflow"
-// RUN: %clangxx -fsanitize=pointer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-CPP --implicit-check-not="pointer-overflow"
+// RUN: %clangxx -x c++ -fsanitize=pointer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-CPP --implicit-check-not="pointer-overflow"
 
 #include <stdlib.h>
 
@@ -9,6 +9,7 @@ int main(int argc, char *argv[]) {
   base = (char *)0;
   result = base + 0;
   // CHECK-C: pointer-overflow
+  // CHECK-CPP-NOT: pointer-overflow
 
   base = (char *)0;
   result = base + 1;


        


More information about the llvm-commits mailing list