Skip to content

Commit e6e4362

Browse files
committed
[ubsan] Convert tests to check 'target=...'
Part of the project to eliminate special handling for triples in lit expressions.
1 parent ee1d000 commit e6e4362

17 files changed

+23
-23
lines changed

compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// RUN: not %run %t 9 2>&1 | FileCheck %s --check-prefix=CHECK-9
1313

1414
// Issue #41838
15-
// XFAIL: sparc-target-arch && solaris
15+
// XFAIL: target={{sparc.*solaris.*}}
1616

1717
// This test assumes float and double are IEEE-754 single- and double-precision.
1818

compiler-rt/test/ubsan/TestCases/Integer/suppressions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// REQUIRES: can-symbolize
66
// UNSUPPORTED: android
77
// Output differs on OpenBSD longer by displaying the values.
8-
// XFAIL: openbsd
8+
// XFAIL: target={{.*openbsd.*}}
99

1010
// Fails without any suppression.
1111
// RUN: %env_ubsan_opts=halt_on_error=1 not %run %t 2>&1 | FileCheck %s

compiler-rt/test/ubsan/TestCases/Misc/Linux/diag-stacktrace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// Fast unwinder does not work with Thumb code
2-
// UNSUPPORTED: thumb
2+
// UNSUPPORTED: target={{.*thumb.*}}
33
// UNSUPPORTED: android
44

55
// RUN: %clangxx -fsanitize=return %gmlt -O2 -fno-omit-frame-pointer -fasynchronous-unwind-tables %s -o %t

compiler-rt/test/ubsan/TestCases/Misc/Linux/print_stack_trace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %clangxx -fsanitize=undefined -O0 %s -o %t && UBSAN_OPTIONS=stack_trace_format=DEFAULT:fast_unwind_on_fatal=0 %run %t 2>&1 | FileCheck %s
33

44
// This test is temporarily disabled due to broken unwinding on ARM.
5-
// UNSUPPORTED: -linux-
5+
// UNSUPPORTED: target={{.*-linux-.*}}
66

77
// The test doesn't pass on Darwin in UBSan-TSan configuration, because TSan is
88
// using the slow unwinder which is not supported on Darwin. The test should

compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// XFAIL: ubsan-tsan
2525
// UNSUPPORTED: ubsan-standalone-static
2626
// No coverage support
27-
// UNSUPPORTED: openbsd
27+
// UNSUPPORTED: target={{.*openbsd.*}}
2828

2929
volatile int sink;
3030
int main(int argc, char **argv) {

compiler-rt/test/ubsan/TestCases/Misc/enum.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// FIXME: UBSan fails to add the correct instrumentation code for some reason on
44
// Windows.
5-
// XFAIL: windows-msvc
5+
// XFAIL: target={{.*windows-msvc.*}}
66

77
enum E { a = 1 };
88
enum class EClass { a = 1 };

compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
// RUN: not cat %t.log.*
2424

2525
// FIXME: log_path is not supported on Windows yet.
26-
// XFAIL: windows-msvc
26+
// XFAIL: target={{.*windows-msvc.*}}
2727

2828
// Issue #41838
29-
// XFAIL: sparc-target-arch && solaris
29+
// XFAIL: target={{sparc.*solaris.*}}
3030

3131
#include <stdio.h>
3232
#include <stdlib.h>

compiler-rt/test/ubsan/TestCases/Misc/missing_return.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: not %run %t 2>&1 | FileCheck %s
33
// RUN: %env_ubsan_opts=print_stacktrace=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-STACKTRACE
44
// Error message does not exact what expected
5-
// XFAIL: openbsd
5+
// XFAIL: target={{.*openbsd.*}}
66

77
// CHECK: missing_return.cpp:[[@LINE+1]]:5: runtime error: execution reached the end of a value-returning function without returning a value
88
int f() __attribute__((noinline)) {

compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// __ubsan_on_report is not defined as weak. Redefining it here isn't supported
55
// on Windows.
66
//
7-
// UNSUPPORTED: windows-msvc
7+
// UNSUPPORTED: target={{.*windows-msvc.*}}
88
// Linkage issue
9-
// XFAIL: openbsd
9+
// XFAIL: target={{.*openbsd.*}}
1010

1111
#include <cstdio>
1212

compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK $(%run %t-unique UNIQUE)
55
// Verify that we can disable symbolization if needed:
66
// RUN: %env_ubsan_opts=symbolize=0 %run %t 2>&1 | FileCheck %s --check-prefix=NOSYM $(%run %t-unique NOSYM-UNIQUE)
7-
// XFAIL: windows-msvc
7+
// XFAIL: target={{.*windows-msvc.*}}
88
// Unsupported function flag
9-
// UNSUPPORTED: openbsd
9+
// UNSUPPORTED: target={{.*openbsd.*}}
1010

1111
#ifdef DETERMINE_UNIQUE
1212

compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %run %t 2>&1 | FileCheck %s
33

44
// REQUIRES: cxxabi
5-
// UNSUPPORTED: windows-msvc
5+
// UNSUPPORTED: target={{.*windows-msvc.*}}
66

77
#include <string.h>
88

compiler-rt/test/ubsan/TestCases/TypeCheck/misaligned.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// RUN: not %run %t s1 2>&1 | FileCheck %s --check-prefix=CHECK-STORE
1313
// RUN: not %run %t w1 2>&1 | FileCheck %s --check-prefix=CHECK-WILD
1414
// Compilation error make the test fails.
15-
// XFAIL: openbsd
15+
// XFAIL: target={{.*openbsd.*}}
1616

1717
#include <new>
1818

compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-corrupted-vtable-itanium.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clangxx -frtti -fsanitize=vptr -fno-sanitize-recover=vptr -g %s -O3 -o %t
22
// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-CORRUPTED-VTABLE --strict-whitespace
33

4-
// UNSUPPORTED: windows-msvc
4+
// UNSUPPORTED: target={{.*windows-msvc.*}}
55
// REQUIRES: stable-runtime, cxxabi
66

77
#include <typeinfo>

compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %run %t
44
//
55
// REQUIRES: cxxabi
6-
// UNSUPPORTED: windows-msvc
6+
// UNSUPPORTED: target={{.*windows-msvc.*}}
77

88
struct X {
99
virtual ~X() {}

compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %run %t
33

44
// REQUIRES: cxxabi
5-
// UNSUPPORTED: windows-msvc
5+
// UNSUPPORTED: target={{.*windows-msvc.*}}
66

77
int volatile n;
88

compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
// REQUIRES: shared_cxxabi
55
// REQUIRES: cxxabi
6-
// UNSUPPORTED: windows-msvc
6+
// UNSUPPORTED: target={{.*windows-msvc.*}}
77
// Nested crash reported
8-
// UNSUPPORTED: freebsd
8+
// UNSUPPORTED: target={{.*freebsd.*}}
99

1010
struct S { virtual int f() { return 0; } };
1111
struct T : virtual S {};

compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.loc-supp"' not %run %t x- 2>&1 | FileCheck %s --check-prefix=CHECK-LOC-SUPPRESS
3838

3939
// REQUIRES: stable-runtime, cxxabi
40-
// UNSUPPORTED: windows-msvc
40+
// UNSUPPORTED: target={{.*windows-msvc.*}}
4141
// Suppressions file not pushed to the device.
4242
// UNSUPPORTED: android
4343
// Compilation error
44-
// UNSUPPORTED: openbsd
44+
// UNSUPPORTED: target={{.*openbsd.*}}
4545
// Compilation error
46-
// UNSUPPORTED: freebsd
46+
// UNSUPPORTED: target={{.*freebsd.*}}
4747
#include <new>
4848
#include <typeinfo>
4949
#include <assert.h>

0 commit comments

Comments
 (0)