[compiler-rt] 02012a7 - [msan] Convert tests to check 'target=...'
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 06:44:51 PST 2022
Author: Paul Robinson
Date: 2022-12-19T06:44:42-08:00
New Revision: 02012a78b8e7d44341247059184350cbb4898e79
URL: https://github.com/llvm/llvm-project/commit/02012a78b8e7d44341247059184350cbb4898e79
DIFF: https://github.com/llvm/llvm-project/commit/02012a78b8e7d44341247059184350cbb4898e79.diff
LOG: [msan] Convert tests to check 'target=...'
Part of the project to eliminate special handling for triples in lit
expressions.
Added:
Modified:
compiler-rt/test/msan/chained_origin_with_signals.cpp
compiler-rt/test/msan/dtls_test.c
compiler-rt/test/msan/fork.cpp
compiler-rt/test/msan/ftime.cpp
compiler-rt/test/msan/ioctl_custom.cpp
compiler-rt/test/msan/param_tls_limit.cpp
compiler-rt/test/msan/pthread_getname_np.cpp
compiler-rt/test/msan/signal_stress_test.cpp
compiler-rt/test/msan/strlen_of_shadow.cpp
compiler-rt/test/msan/strndup.cpp
compiler-rt/test/msan/textdomain.cpp
compiler-rt/test/msan/tsearch.cpp
compiler-rt/test/msan/vararg.cpp
compiler-rt/test/msan/wcsncpy.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/msan/chained_origin_with_signals.cpp b/compiler-rt/test/msan/chained_origin_with_signals.cpp
index 9c071569a2baf..73197803221db 100644
--- a/compiler-rt/test/msan/chained_origin_with_signals.cpp
+++ b/compiler-rt/test/msan/chained_origin_with_signals.cpp
@@ -11,7 +11,7 @@
// RUN: FileCheck %s < %t.out
// Reported deadly signal due to stack-overflow
-// XFAIL: netbsd
+// XFAIL: target={{.*netbsd.*}}
#include <signal.h>
#include <stdio.h>
diff --git a/compiler-rt/test/msan/dtls_test.c b/compiler-rt/test/msan/dtls_test.c
index bc1fe609a8501..45c8fd38bf5f6 100644
--- a/compiler-rt/test/msan/dtls_test.c
+++ b/compiler-rt/test/msan/dtls_test.c
@@ -6,11 +6,11 @@
see https://sourceware.org/bugzilla/show_bug.cgi?id=16291
and https://github.com/google/sanitizers/issues/547
- XFAIL: FreeBSD
- UNSUPPORTED: powerpc
+ XFAIL: target={{.*freebsd.*}}
+ UNSUPPORTED: target=powerpc{{.*}}
// Reports use-of-uninitialized-value, not analyzed
- XFAIL: netbsd
+ XFAIL: target={{.*netbsd.*}}
// This is known to be broken with glibc-2.27+
// https://bugs.llvm.org/show_bug.cgi?id=37804
diff --git a/compiler-rt/test/msan/fork.cpp b/compiler-rt/test/msan/fork.cpp
index 87d71f87efe6b..c0d6cb7f02426 100644
--- a/compiler-rt/test/msan/fork.cpp
+++ b/compiler-rt/test/msan/fork.cpp
@@ -15,7 +15,7 @@
// UNSUPPORTED: powerpc64le-target-arch
// Sometimes hangs
-// UNSUPPORTED: netbsd
+// UNSUPPORTED: target={{.*netbsd.*}}
#include <pthread.h>
#include <unistd.h>
diff --git a/compiler-rt/test/msan/ftime.cpp b/compiler-rt/test/msan/ftime.cpp
index 2bc8a6f2fe103..d8ba8ca80b529 100644
--- a/compiler-rt/test/msan/ftime.cpp
+++ b/compiler-rt/test/msan/ftime.cpp
@@ -1,7 +1,7 @@
// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
// ftime() is deprecated on FreeBSD and NetBSD.
-// UNSUPPORTED: freebsd, netbsd
+// UNSUPPORTED: target={{.*(freebsd|netbsd).*}}
#include <assert.h>
#include <sys/timeb.h>
diff --git a/compiler-rt/test/msan/ioctl_custom.cpp b/compiler-rt/test/msan/ioctl_custom.cpp
index c01a6c89a5504..e0abf669971e8 100644
--- a/compiler-rt/test/msan/ioctl_custom.cpp
+++ b/compiler-rt/test/msan/ioctl_custom.cpp
@@ -5,7 +5,7 @@
// RUN: %clangxx_msan -DPOSITIVE -O3 -g %s -o %t && not %run %t 2>&1 | FileCheck %s
// Reports
diff erent report (not analyzed)
-// XFAIL: netbsd
+// XFAIL: target={{.*netbsd.*}}
#include <assert.h>
#include <stdlib.h>
diff --git a/compiler-rt/test/msan/param_tls_limit.cpp b/compiler-rt/test/msan/param_tls_limit.cpp
index 0f5212737f171..d28ce74045189 100644
--- a/compiler-rt/test/msan/param_tls_limit.cpp
+++ b/compiler-rt/test/msan/param_tls_limit.cpp
@@ -7,13 +7,13 @@
//
// AArch64 fails with:
// void f801(S<801>): Assertion `__msan_test_shadow(&s, sizeof(s)) == -1' failed
-// XFAIL: aarch64
+// XFAIL: target=aarch64{{.*}}
// When passing huge structs by value, SystemZ uses pointers, therefore this
// test in its present form is unfortunately not applicable.
// ABI says: "A struct or union of any other size <snip>. Replace such an
// argument by a pointer to the object, or to a copy where necessary to enforce
// call-by-value semantics."
-// XFAIL: s390x
+// XFAIL: target=s390x{{.*}}
#include <sanitizer/msan_interface.h>
#include <assert.h>
diff --git a/compiler-rt/test/msan/pthread_getname_np.cpp b/compiler-rt/test/msan/pthread_getname_np.cpp
index 4827b3a006432..753a90529e451 100644
--- a/compiler-rt/test/msan/pthread_getname_np.cpp
+++ b/compiler-rt/test/msan/pthread_getname_np.cpp
@@ -1,7 +1,7 @@
// RUN: %clangxx_msan -std=c++11 -O0 %s -o %t && %run %t
// The main goal is getting the pthread name back and
// FreeBSD based do not support this feature
-// UNSUPPORTED: android, freebsd
+// UNSUPPORTED: android, target={{.*freebsd.*}}
// Regression test for a deadlock in pthread_getattr_np
diff --git a/compiler-rt/test/msan/signal_stress_test.cpp b/compiler-rt/test/msan/signal_stress_test.cpp
index fd434add261c9..043393fce6def 100644
--- a/compiler-rt/test/msan/signal_stress_test.cpp
+++ b/compiler-rt/test/msan/signal_stress_test.cpp
@@ -3,7 +3,7 @@
// Test that va_arg shadow from a signal handler does not leak outside.
// Reported deadly signal due to stack-overflow
-// XFAIL: netbsd
+// XFAIL: target={{.*netbsd.*}}
#include <signal.h>
#include <stdarg.h>
diff --git a/compiler-rt/test/msan/strlen_of_shadow.cpp b/compiler-rt/test/msan/strlen_of_shadow.cpp
index 5257dc7ee69d4..bafff3aa8c904 100644
--- a/compiler-rt/test/msan/strlen_of_shadow.cpp
+++ b/compiler-rt/test/msan/strlen_of_shadow.cpp
@@ -3,7 +3,7 @@
// Check that strlen() and similar intercepted functions can be called on shadow
// memory.
// The mem_to_shadow's part might need rework
-// XFAIL: freebsd
+// XFAIL: target={{.*freebsd.*}}
#include <assert.h>
#include <stdint.h>
diff --git a/compiler-rt/test/msan/strndup.cpp b/compiler-rt/test/msan/strndup.cpp
index c9d425c0259af..5e1aa33668c2f 100644
--- a/compiler-rt/test/msan/strndup.cpp
+++ b/compiler-rt/test/msan/strndup.cpp
@@ -4,7 +4,7 @@
// When built as C on Linux, strndup is transformed to __strndup.
// RUN: %clangxx_msan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck --check-prefix=ON %s
-// UNSUPPORTED: windows-msvc
+// UNSUPPORTED: target={{.*windows-msvc.*}}
#include <assert.h>
#include <stdlib.h>
diff --git a/compiler-rt/test/msan/textdomain.cpp b/compiler-rt/test/msan/textdomain.cpp
index 478b0993f8371..d7266ac321572 100644
--- a/compiler-rt/test/msan/textdomain.cpp
+++ b/compiler-rt/test/msan/textdomain.cpp
@@ -1,6 +1,6 @@
// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
// textdomain() is not a part of libc on FreeBSD and NetBSD.
-// UNSUPPORTED: netbsd, freebsd
+// UNSUPPORTED: target={{.*(netbsd|freebsd).*}}
#include <libintl.h>
#include <stdio.h>
diff --git a/compiler-rt/test/msan/tsearch.cpp b/compiler-rt/test/msan/tsearch.cpp
index 50a2efb31fadc..1a2c466caccdc 100644
--- a/compiler-rt/test/msan/tsearch.cpp
+++ b/compiler-rt/test/msan/tsearch.cpp
@@ -1,7 +1,7 @@
// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
// tdestroy is a GNU extension
-// UNSUPPORTED: netbsd, freebsd
+// UNSUPPORTED: target={{.*(netbsd|freebsd).*}}
#include <assert.h>
#include <search.h>
diff --git a/compiler-rt/test/msan/vararg.cpp b/compiler-rt/test/msan/vararg.cpp
index 33308e31b4120..e72d99023205a 100644
--- a/compiler-rt/test/msan/vararg.cpp
+++ b/compiler-rt/test/msan/vararg.cpp
@@ -17,9 +17,7 @@
// Check that shadow and origin are passed through va_args.
// Copying origins on AArch64, MIPS and PowerPC isn't supported yet.
-// XFAIL: aarch64
-// XFAIL: mips
-// XFAIL: powerpc64
+// XFAIL: target={{(aarch64|mips|powerpc64).*}}
#include <stdarg.h>
#include <string.h>
diff --git a/compiler-rt/test/msan/wcsncpy.cpp b/compiler-rt/test/msan/wcsncpy.cpp
index f448ab20266a2..f3fad385bf9e2 100644
--- a/compiler-rt/test/msan/wcsncpy.cpp
+++ b/compiler-rt/test/msan/wcsncpy.cpp
@@ -1,7 +1,7 @@
// RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
// RUN: FileCheck %s < %t.out && FileCheck %s < %t.out
-// XFAIL: mips
+// XFAIL: target=mips{{.*}}
#include <assert.h>
#include <wchar.h>
More information about the llvm-commits
mailing list