[asan] Convert tests to check 'target=...'
authorPaul Robinson <paul.robinson@sony.com>
Fri, 16 Dec 2022 17:08:01 +0000 (09:08 -0800)
committerPaul Robinson <paul.robinson@sony.com>
Fri, 16 Dec 2022 17:09:38 +0000 (09:09 -0800)
Part of the project to eliminate special handling for triples in lit
expressions.

15 files changed:
compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp
compiler-rt/test/asan/TestCases/Linux/segv_read_write.c
compiler-rt/test/asan/TestCases/Linux/static_tls.cpp
compiler-rt/test/asan/TestCases/Posix/no-fd.cpp
compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp
compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cpp
compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp
compiler-rt/test/asan/TestCases/global-location-nodebug.cpp
compiler-rt/test/asan/TestCases/intra-object-overflow.cpp
compiler-rt/test/asan/TestCases/malloc-no-intercept.c
compiler-rt/test/asan/TestCases/printf-4.c
compiler-rt/test/asan/TestCases/printf-m.c
compiler-rt/test/asan/TestCases/replaceable_new_delete.cpp
compiler-rt/test/asan/TestCases/strcat-overlap.cpp
compiler-rt/test/asan/TestCases/strstr_strict.c

index c294ca5..b096624 100644 (file)
@@ -32,7 +32,7 @@
 // AArch64 bots fail on this test.
 // TODO(alekseys): Android lit do not run ulimit on device.
 // REQUIRES: shadow-scale-3
-// UNSUPPORTED: s390,android,aarch64,powerpc64le
+// UNSUPPORTED: android, target={{(s390|aarch64|powerpc64le).*}}
 
 #include <stdlib.h>
 #include <string.h>
index b137970..7e29386 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clangxx_asan -std=c++11 -O0 %s -o %t
 // RUN: not %run %t       2>&1 | FileCheck %s --check-prefix=READ
 // RUN: not %run %t write 2>&1 | FileCheck %s --check-prefix=WRITE
-// UNSUPPORTED: powerpc64,mips,s390
+// UNSUPPORTED: target={{(powerpc64|mips|s390).*}}
 
 #include <sys/mman.h>
 
index 1ee46dc..8ef6ba4 100644 (file)
@@ -9,9 +9,9 @@
 // CHECK: __tls_get_addr: static tls
 // CHECK: after
 
-// XFAIL: aarch64
+// XFAIL: target=aarch64{{.*}}
 // binutils 2.26 has a change that causes this test to fail on powerpc64.
-// UNSUPPORTED: powerpc64
+// UNSUPPORTED: target=powerpc64{{.*}}
 
 /// We call __tls_get_addr early in GetTls to work around an issue for glibc<2.25,
 /// so we don't get a log for f().
index 3130eda..f162685 100644 (file)
@@ -13,7 +13,7 @@
 // on them remaining closed across an execve(). This is not the case on newer
 // versions of Android. On PPC with ASLR turned on, this fails when linked with
 // lld - see https://bugs.llvm.org/show_bug.cgi?id=45076.
-// UNSUPPORTED: android, powerpc
+// UNSUPPORTED: android, target=powerpc{{.*}}
 
 #include <assert.h>
 #include <stdio.h>
index d13b618..927c1b0 100644 (file)
@@ -31,9 +31,9 @@
 // RUN: %env_asan_opts=min_uar_stack_size_log=24:max_uar_stack_size_log=24:verbosity=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-24 %s
 
 // This test runs out of stack on AArch64.
-// UNSUPPORTED: aarch64
+// UNSUPPORTED: target=aarch64{{.*}}
 // stack size log lower than expected
-// XFAIL: freebsd,netbsd
+// XFAIL: target={{.*(freebsd|netbsd).*}}
 
 // FIXME: Fix this test for dynamic runtime on arm linux.
 // UNSUPPORTED: (arm-linux || armhf-linux) && asan-dynamic-runtime
index 46c9dce..43e5547 100644 (file)
@@ -7,7 +7,7 @@
 // RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
 
 // Unwind problem on arm: "main" is missing from the allocation stack trace.
-// UNSUPPORTED: windows-msvc,s390,arm && !fast-unwinder-works
+// UNSUPPORTED: target={{.*windows-msvc.*}},target=s390{{.*}},target=arm{{.*}} && !fast-unwinder-works
 
 #include <string.h>
 
index 774e707..6f342de 100644 (file)
@@ -7,7 +7,7 @@
 // RUN: %clang_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s\r
 \r
 // Unwind problem on arm: "main" is missing from the allocation stack trace.\r
-// UNSUPPORTED: windows-msvc,s390,arm && !fast-unwinder-works
+// UNSUPPORTED: target={{.*windows-msvc.*}},target=s390{{.*}},target=arm{{.*}} && !fast-unwinder-works
 \r
 #include <string.h>\r
 \r
index d1b20d7..b498394 100644 (file)
@@ -9,10 +9,10 @@
 // RUN: not %run %t l 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=LITERAL-NO-G
 
 /// Solaris ld -S has different semantics.
-// XFAIL: solaris
+// XFAIL: target={{.*solaris.*}}
 
 /// MSVC linker doesn't support `-S`.
-// UNSUPPORTED: windows
+// UNSUPPORTED: target={{.*windows.*}}
 
 // CHECK: AddressSanitizer: global-buffer-overflow
 // CLASS_STATIC-NO-G: 0x{{.*}} is located 4 bytes after global variable '{{.*}}C::array{{.*}}' defined in '{{.*}}global-location.cpp' {{.*}} of size 40
index 17bf35d..ff753ca 100644 (file)
@@ -5,7 +5,7 @@
 // FIXME: fix 32-bits.
 // REQUIRES: asan-64-bits, shadow-scale-3
 // FIXME: Implement ASan intra-object padding in Clang's MS record layout
-// UNSUPPORTED: windows-msvc
+// UNSUPPORTED: target={{.*windows-msvc.*}}
 #include <stdio.h>
 #include <stdlib.h>
 class Foo {
index 3aa25e7..eb02a30 100644 (file)
@@ -11,7 +11,7 @@
 // Conflicts with BIONIC declarations.
 // Lacks mallinfo, mallopt except in libmalloc.  cfree with different
 // signature in libc.
-// UNSUPPORTED: solaris
+// UNSUPPORTED: target={{.*solaris.*}}
 
 // Inhibit conflicting declaration of memalign on Solaris.
 #if defined(__sun__) && defined(__svr4__)
index 2af81b0..4c791c6 100644 (file)
@@ -4,7 +4,7 @@
 
 // FIXME: sprintf is not intercepted on Windows yet. But this test can
 // pass if sprintf calls memmove, which is intercepted, so we can't XFAIL it.
-// UNSUPPORTED: windows-msvc
+// UNSUPPORTED: target={{.*windows-msvc.*}}
 
 #include <stdio.h>
 int main() {
index 3998a69..f7a564b 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang_asan -O2 %s -o %t && %run %t
 
 // FIXME: printf is not intercepted on Windows yet.
-// UNSUPPORTED: windows-msvc
+// UNSUPPORTED: target={{.*windows-msvc.*}}
 
 #include <stdio.h>
 
index 5de6c1a..677a571 100644 (file)
@@ -3,7 +3,7 @@
 // FIXME: Weak symbols aren't supported on Windows, although some code in
 // compiler-rt already exists to solve this problem. We should probably define
 // the new/delete interceptors as "weak" using those workarounds as well.
-// UNSUPPORTED: windows
+// UNSUPPORTED: target={{.*windows.*}}
 
 // RUN: %clangxx %s -o %t -fsanitize=address -shared-libsan && not %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx %s -o %t -fsanitize=address -static-libsan && not %run %t 2>&1 | FileCheck %s
index 34aaf68..76fd3e1 100644 (file)
@@ -31,7 +31,7 @@
 // depending on how strcat() is implemented. For now only run
 // on platforms where we know the test passes.
 // REQUIRES: x86_64h-darwin || x86_64-darwin || i386-darwin || x86_64-linux || i386-linux
-// UNSUPPORTED: windows-msvc
+// UNSUPPORTED: target={{.*windows-msvc.*}}
 // UNSUPPORTED: android
 
 #include <string.h>
index 0d94827..8b7153f 100644 (file)
@@ -4,7 +4,7 @@
 // Newer versions of Android's strstr() uses memchr() internally, which actually
 // does trigger a heap-buffer-overflow (as it tries to find the
 // null-terminator). The same applies to FreeBSD.
-// UNSUPPORTED: android, freebsd
+// UNSUPPORTED: android, target={{.*freebsd.*}}
 // RUN: %env_asan_opts=strict_string_checks=false %run %t 2>&1
 
 // RUN: %env_asan_opts=strict_string_checks=true not %run %t 2>&1 | FileCheck %s