[asan] Convert more tests to check 'target=...'
authorPaul Robinson <paul.robinson@sony.com>
Fri, 16 Dec 2022 18:35:06 +0000 (10:35 -0800)
committerPaul Robinson <paul.robinson@sony.com>
Fri, 16 Dec 2022 18:36:48 +0000 (10:36 -0800)
Part of the project to eliminate special handling for triples in lit
expressions.

23 files changed:
compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp
compiler-rt/test/asan/TestCases/Linux/odr-vtable.cpp
compiler-rt/test/asan/TestCases/Linux/ptrace.cpp
compiler-rt/test/asan/TestCases/Posix/mmap_limit_mb.cpp
compiler-rt/test/asan/TestCases/Posix/new_array_cookie_with_new_from_class.cpp
compiler-rt/test/asan/TestCases/atoll_strict.c
compiler-rt/test/asan/TestCases/global-location.cpp
compiler-rt/test/asan/TestCases/heavy_uar_test.cpp
compiler-rt/test/asan/TestCases/initialization-bug.cpp
compiler-rt/test/asan/TestCases/intercept-rethrow-exception.cpp
compiler-rt/test/asan/TestCases/interception_failure_test.cpp
compiler-rt/test/asan/TestCases/log-path_test.cpp
compiler-rt/test/asan/TestCases/pass-object-byval.cpp
compiler-rt/test/asan/TestCases/printf-2.c
compiler-rt/test/asan/TestCases/printf-3.c
compiler-rt/test/asan/TestCases/printf-5.c
compiler-rt/test/asan/TestCases/strcasestr-1.c
compiler-rt/test/asan/TestCases/strcasestr-2.c
compiler-rt/test/asan/TestCases/strcasestr_strict.c
compiler-rt/test/asan/TestCases/strncasecmp_strict.c
compiler-rt/test/asan/TestCases/strtoll_strict.c
compiler-rt/test/asan/TestCases/time_interceptor.cpp
compiler-rt/test/asan/TestCases/verbose-log-path_test.cpp

index a86e032..017aa4e 100644 (file)
@@ -1,7 +1,7 @@
 // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
 // XFAIL: android
 // Fails with debug checks: https://bugs.llvm.org/show_bug.cgi?id=46862
-// XFAIL: !compiler-rt-optimized && !riscv64
+// XFAIL: !compiler-rt-optimized && !target=riscv64{{.*}}
 //
 // We use fast_unwind_on_malloc=0 to have full unwinding even w/o frame
 // pointers. This setting is not on by default because it's too expensive.
index aabecf2..aee5d2a 100644 (file)
@@ -1,5 +1,5 @@
 // Fails with debug checks: https://bugs.llvm.org/show_bug.cgi?id=46862
-// XFAIL: !compiler-rt-optimized && !riscv64
+// XFAIL: !compiler-rt-optimized && !target=riscv64{{.*}}
 
 // REQUIRES: shared_cxxabi
 
index cae1493..e01021f 100644 (file)
@@ -1,6 +1,6 @@
 // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
 // XFAIL: android
-// XFAIL: mips
+// XFAIL: target=mips{{.*}}
 //
 // RUN: %clangxx_asan -O0 %s -o %t && %run %t
 // RUN: %clangxx_asan -DPOSITIVE -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
index cb613f5..87ac5b2 100644 (file)
@@ -9,7 +9,7 @@
 // RUN: %env_asan_opts=mmap_limit_mb=300 not %run %t 500 1000000 2>&1 | FileCheck %s
 //
 // FIXME: Windows doesn't implement mmap_limit_mb.
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #include <assert.h>
 #include <stdlib.h>
index 0cb5689..f0cf0c6 100644 (file)
@@ -11,7 +11,7 @@
 // RUN: %env_asan_opts=strict_string_checks=true not %run %t test3 2>&1 | FileCheck %s --check-prefix=CHECK3
 
 // FIXME: Needs Windows interceptor.
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #include <assert.h>
 #include <stdlib.h>
index c5fe34b..b0e996a 100644 (file)
@@ -5,7 +5,7 @@
 // RUN: not %run %t l 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=LITERAL
 
 // COFF doesn't support debuginfo for globals. For the non-debuginfo tests, see global-location-nodebug.cpp.
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 // atos doesn't show source line numbers for global variables.
 // UNSUPPORTED: darwin
index 68eab14..f1bd0f0 100644 (file)
@@ -2,7 +2,7 @@
 // RUN: %clangxx_asan -O2 %s -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan -O0 %s -o %t -fsanitize-address-use-after-return=always && not %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan -O2 %s -o %t -fsanitize-address-use-after-return=always && not %run %t 2>&1 | FileCheck %s
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 // FIXME: Fix this test under GCC.
 // REQUIRES: Clang
index b27da0e..2775f6c 100644 (file)
@@ -6,7 +6,7 @@
 // Do not test with optimization -- the error may be optimized away.
 
 // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=186
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #include <cstdio>
 
index a07d7a2..bf51eed 100644 (file)
@@ -8,9 +8,9 @@
 
 // The current implementation of this functionality requires special
 // combination of libraries that are not used by default on NetBSD
-// XFAIL: netbsd
+// XFAIL: target={{.*netbsd.*}}
 // FIXME: Bug 42703
-// XFAIL: solaris
+// XFAIL: target={{.*solaris.*}}
 
 // https://reviews.llvm.org/D111703 made compiler incompatible with released NDK.
 // UNSUPPORTED: android && arm-target-arch
index 4f6698e..7e2413e 100644 (file)
@@ -5,7 +5,7 @@
 // RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s
-// XFAIL: freebsd
+// XFAIL: target={{.*freebsd.*}}
 
 // On Windows, defining strtoll in a static build results in linker errors, but
 // it works with the dynamic runtime.
@@ -13,7 +13,7 @@
 
 // On NetBSD, defining strtol in a static build results in linker errors, but
 // it works with the dynamic runtime.
-// XFAIL: netbsd && !asan-dynamic-runtime
+// XFAIL: target={{.*netbsd.*}} && !asan-dynamic-runtime
 
 #include <stdlib.h>
 #include <stdio.h>
index 4cf0416..3c5ca11 100644 (file)
@@ -35,7 +35,7 @@
 // RUN: not cat %t.log.*
 
 // FIXME: log_path is not supported on Windows yet.
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #include <stdlib.h>
 #include <string.h>
index f9191c5..78f4f8d 100644 (file)
@@ -5,7 +5,7 @@
 // RUN:     Assertion{{.*}}failed
 
 // ASan instrumentation can't insert red-zones around inalloca parameters.
-// XFAIL: windows-msvc && asan-32-bits
+// XFAIL: target={{.*windows-msvc.*}} && asan-32-bits
 
 #include <cassert>
 
index 7127347..7fcf430 100644 (file)
@@ -6,7 +6,7 @@
 // RUN: %env_asan_opts=replace_str=0:intercept_strlen=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
 
 // FIXME: printf is not intercepted on Windows yet.
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #include <stdio.h>
 #include <stdlib.h>
index 4f54ff9..805210c 100644 (file)
@@ -4,7 +4,7 @@
 // RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
 
 // FIXME: printf is not intercepted on Windows yet.
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 // New Bionic rejects %n
 // https://android.googlesource.com/platform/bionic/+/41398d03b7e8e0dfb951660ae713e682e9fc0336
index 89d3a33..564de39 100644 (file)
@@ -5,7 +5,7 @@
 // RUN: %env_asan_opts=replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
 
 // FIXME: printf is not intercepted on Windows yet.
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #include <stdio.h>
 #include <string.h>
index bb0863d..8be4b75 100644 (file)
@@ -6,7 +6,7 @@
 // RUN: %env_asan_opts=intercept_strstr=false:replace_str=false %run %t 2>&1
 
 // There's no interceptor for strcasestr on Windows
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #define _GNU_SOURCE
 #include <assert.h>
index 35d05c2..eabe402 100644 (file)
@@ -6,7 +6,7 @@
 // RUN: %env_asan_opts=intercept_strstr=false:replace_str=false:intercept_strlen=false %run %t 2>&1
 
 // There's no interceptor for strcasestr on Windows
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #define _GNU_SOURCE
 #include <assert.h>
index 16adae1..a6d1087 100644 (file)
@@ -4,7 +4,7 @@
 // RUN: %env_asan_opts=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // There's no interceptor for strcasestr on Windows
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #define _GNU_SOURCE
 #include <assert.h>
index 8a99783..24261be 100644 (file)
@@ -14,7 +14,7 @@
 // RUN: %env_asan_opts=strict_string_checks=false %run %t i 2>&1
 // RUN: %env_asan_opts=strict_string_checks=true not %run %t i 2>&1 | FileCheck %s
 
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #include <assert.h>
 #include <stdlib.h>
index 3fa800c..88e6651 100644 (file)
@@ -24,7 +24,7 @@
 
 // FIXME: Enable strtoll interceptor.
 // REQUIRES: shadow-scale-3
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #include <assert.h>
 #include <stdlib.h>
index 91e056b..47acdd5 100644 (file)
@@ -3,7 +3,7 @@
 // Test the time() interceptor.
 
 // There's no interceptor for time() on Windows yet.
-// XFAIL: windows-msvc
+// XFAIL: target={{.*windows-msvc.*}}
 
 #include <stdio.h>
 #include <stdlib.h>
index 5407d15..37c1dab 100644 (file)
@@ -10,7 +10,7 @@
 // RUN: FileCheck %s --check-prefix=CHECK-ERROR < %t-dir/asan.log.verbose-log-path_test-binary.*
 
 // FIXME: only FreeBSD, NetBSD and Linux have verbose log paths now.
-// XFAIL: windows-msvc,android
+// XFAIL: target={{.*windows-msvc.*}},android
 // UNSUPPORTED: ios
 
 #include <stdlib.h>