From: Paul Robinson Date: Fri, 16 Dec 2022 17:08:01 +0000 (-0800) Subject: [asan] Convert tests to check 'target=...' X-Git-Tag: upstream/17.0.6~23531 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abd09754edf156bf8c36ac6f52bf003706977b03;p=platform%2Fupstream%2Fllvm.git [asan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. --- diff --git a/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp b/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp index c294ca5..b096624 100644 --- a/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp +++ b/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp @@ -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 #include diff --git a/compiler-rt/test/asan/TestCases/Linux/segv_read_write.c b/compiler-rt/test/asan/TestCases/Linux/segv_read_write.c index b137970..7e29386 100644 --- a/compiler-rt/test/asan/TestCases/Linux/segv_read_write.c +++ b/compiler-rt/test/asan/TestCases/Linux/segv_read_write.c @@ -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 diff --git a/compiler-rt/test/asan/TestCases/Linux/static_tls.cpp b/compiler-rt/test/asan/TestCases/Linux/static_tls.cpp index 1ee46dc..8ef6ba4 100644 --- a/compiler-rt/test/asan/TestCases/Linux/static_tls.cpp +++ b/compiler-rt/test/asan/TestCases/Linux/static_tls.cpp @@ -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(). diff --git a/compiler-rt/test/asan/TestCases/Posix/no-fd.cpp b/compiler-rt/test/asan/TestCases/Posix/no-fd.cpp index 3130eda..f162685 100644 --- a/compiler-rt/test/asan/TestCases/Posix/no-fd.cpp +++ b/compiler-rt/test/asan/TestCases/Posix/no-fd.cpp @@ -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 #include diff --git a/compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp b/compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp index d13b618..927c1b0 100644 --- a/compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp +++ b/compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp @@ -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 diff --git a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cpp b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cpp index 46c9dce..43e5547 100644 --- a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cpp +++ b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cpp @@ -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 diff --git a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp index 774e707..6f342de 100644 --- a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp +++ b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp @@ -7,7 +7,7 @@ // RUN: %clang_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 diff --git a/compiler-rt/test/asan/TestCases/global-location-nodebug.cpp b/compiler-rt/test/asan/TestCases/global-location-nodebug.cpp index d1b20d7..b498394 100644 --- a/compiler-rt/test/asan/TestCases/global-location-nodebug.cpp +++ b/compiler-rt/test/asan/TestCases/global-location-nodebug.cpp @@ -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 diff --git a/compiler-rt/test/asan/TestCases/intra-object-overflow.cpp b/compiler-rt/test/asan/TestCases/intra-object-overflow.cpp index 17bf35d..ff753ca 100644 --- a/compiler-rt/test/asan/TestCases/intra-object-overflow.cpp +++ b/compiler-rt/test/asan/TestCases/intra-object-overflow.cpp @@ -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 #include class Foo { diff --git a/compiler-rt/test/asan/TestCases/malloc-no-intercept.c b/compiler-rt/test/asan/TestCases/malloc-no-intercept.c index 3aa25e7..eb02a305 100644 --- a/compiler-rt/test/asan/TestCases/malloc-no-intercept.c +++ b/compiler-rt/test/asan/TestCases/malloc-no-intercept.c @@ -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__) diff --git a/compiler-rt/test/asan/TestCases/printf-4.c b/compiler-rt/test/asan/TestCases/printf-4.c index 2af81b0..4c791c6 100644 --- a/compiler-rt/test/asan/TestCases/printf-4.c +++ b/compiler-rt/test/asan/TestCases/printf-4.c @@ -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 int main() { diff --git a/compiler-rt/test/asan/TestCases/printf-m.c b/compiler-rt/test/asan/TestCases/printf-m.c index 3998a69..f7a564b 100644 --- a/compiler-rt/test/asan/TestCases/printf-m.c +++ b/compiler-rt/test/asan/TestCases/printf-m.c @@ -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 diff --git a/compiler-rt/test/asan/TestCases/replaceable_new_delete.cpp b/compiler-rt/test/asan/TestCases/replaceable_new_delete.cpp index 5de6c1ad8a..677a571 100644 --- a/compiler-rt/test/asan/TestCases/replaceable_new_delete.cpp +++ b/compiler-rt/test/asan/TestCases/replaceable_new_delete.cpp @@ -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 diff --git a/compiler-rt/test/asan/TestCases/strcat-overlap.cpp b/compiler-rt/test/asan/TestCases/strcat-overlap.cpp index 34aaf68..76fd3e1 100644 --- a/compiler-rt/test/asan/TestCases/strcat-overlap.cpp +++ b/compiler-rt/test/asan/TestCases/strcat-overlap.cpp @@ -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 diff --git a/compiler-rt/test/asan/TestCases/strstr_strict.c b/compiler-rt/test/asan/TestCases/strstr_strict.c index 0d94827..8b7153f 100644 --- a/compiler-rt/test/asan/TestCases/strstr_strict.c +++ b/compiler-rt/test/asan/TestCases/strstr_strict.c @@ -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