diff options
author | Stephan T. Lavavej <stl@nuwen.net> | 2024-06-05 07:25:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 10:25:26 -0400 |
commit | a0cdd32b79318fc45e07bc0cef7e57308b1166ed (patch) | |
tree | d3f3a6b1295ff5e3be59d8e468d41ee1113f4126 /libcxx/test | |
parent | 38bf6840e8589ebe22e8157aee79a57d9db9393d (diff) | |
download | llvm-a0cdd32b79318fc45e07bc0cef7e57308b1166ed.zip llvm-a0cdd32b79318fc45e07bc0cef7e57308b1166ed.tar.gz llvm-a0cdd32b79318fc45e07bc0cef7e57308b1166ed.tar.bz2 |
[libc++] [test] Consistently use `REQUIRES: has-unix-headers` (#94122)
There were 7 occurrences of `UNSUPPORTED: !has-unix-headers`, versus 212
occurrences of `REQUIRES: has-unix-headers`.
I don't completely understand how libc++ uses UNSUPPORTED versus
REQUIRES, but it seems better to be consistent, and to avoid the double
negation in "this is unsupported if we don't have unix headers".
(This came to my attention because of the single occurrence in
`libcxx/test/std`. Our MSVC-internal test harness isn't aware of lit
features, so we teach it to skip tests via the incredibly primitive
method of searching for specific comments, so I had to deal with this
comment inconsistency.)
Diffstat (limited to 'libcxx/test')
7 files changed, 14 insertions, 7 deletions
diff --git a/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp b/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp index 11e8ae2..d4dad8b 100644 --- a/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp +++ b/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp @@ -11,7 +11,8 @@ // hardening mode. // `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support. -// UNSUPPORTED: c++03, !has-unix-headers, no-localization +// REQUIRES: has-unix-headers +// UNSUPPORTED: c++03, no-localization // The ability to set a custom abort message is required to compare the assertion message (which only happens in the // debug mode). // XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing diff --git a/libcxx/test/libcxx/assertions/modes/override_with_debug_mode.pass.cpp b/libcxx/test/libcxx/assertions/modes/override_with_debug_mode.pass.cpp index f49ad49..02565d0b 100644 --- a/libcxx/test/libcxx/assertions/modes/override_with_debug_mode.pass.cpp +++ b/libcxx/test/libcxx/assertions/modes/override_with_debug_mode.pass.cpp @@ -9,7 +9,8 @@ // This test ensures that we can override any hardening mode with the debug mode on a per-TU basis. // `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support. -// UNSUPPORTED: c++03, !has-unix-headers, no-localization +// REQUIRES: has-unix-headers +// UNSUPPORTED: c++03, no-localization // The ability to set a custom abort message is required to compare the assertion message. // XFAIL: availability-verbose_abort-missing // ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG diff --git a/libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp b/libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp index cf662e9..74fe70f 100644 --- a/libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp +++ b/libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp @@ -9,7 +9,8 @@ // This test ensures that we can override any hardening mode with the extensive hardening mode on a per-TU basis. // `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support. -// UNSUPPORTED: c++03, !has-unix-headers, no-localization +// REQUIRES: has-unix-headers +// UNSUPPORTED: c++03, no-localization // The ability to set a custom abort message is required to compare the assertion message (which only happens in the // debug mode). // XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing diff --git a/libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp b/libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp index 0989ad3..f243897 100644 --- a/libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp +++ b/libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp @@ -9,7 +9,8 @@ // This test ensures that we can override any hardening mode with the fast mode on a per-TU basis. // `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support. -// UNSUPPORTED: c++03, !has-unix-headers, no-localization +// REQUIRES: has-unix-headers +// UNSUPPORTED: c++03, no-localization // The ability to set a custom abort message is required to compare the assertion message (which only happens in the // debug mode). // XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing diff --git a/libcxx/test/libcxx/assertions/modes/override_with_unchecked_mode.pass.cpp b/libcxx/test/libcxx/assertions/modes/override_with_unchecked_mode.pass.cpp index 8ea8b73..0922556 100644 --- a/libcxx/test/libcxx/assertions/modes/override_with_unchecked_mode.pass.cpp +++ b/libcxx/test/libcxx/assertions/modes/override_with_unchecked_mode.pass.cpp @@ -9,7 +9,8 @@ // This test ensures that we can override any hardening mode with the unchecked mode on a per-TU basis. // `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support. -// UNSUPPORTED: c++03, !has-unix-headers, no-localization +// REQUIRES: has-unix-headers +// UNSUPPORTED: c++03, no-localization // ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE #include <cassert> diff --git a/libcxx/test/libcxx/containers/sequences/deque/asan_caterpillar.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/asan_caterpillar.pass.cpp index 4c7b231..1701b89 100644 --- a/libcxx/test/libcxx/containers/sequences/deque/asan_caterpillar.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/deque/asan_caterpillar.pass.cpp @@ -12,7 +12,8 @@ // with origin in deque::__add_back_capacity. // `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support. -// UNSUPPORTED: c++03, !has-unix-headers, no-localization +// REQUIRES: has-unix-headers +// UNSUPPORTED: c++03, no-localization #include <deque> #include <cstdio> diff --git a/libcxx/test/std/algorithms/pstl.exception_handling.pass.cpp b/libcxx/test/std/algorithms/pstl.exception_handling.pass.cpp index bedb225..e24ce66 100644 --- a/libcxx/test/std/algorithms/pstl.exception_handling.pass.cpp +++ b/libcxx/test/std/algorithms/pstl.exception_handling.pass.cpp @@ -9,7 +9,8 @@ // UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: no-exceptions // `check_assertion.h` requires Unix headers and regex support. -// UNSUPPORTED: !has-unix-headers, no-localization +// REQUIRES: has-unix-headers +// UNSUPPORTED: no-localization // UNSUPPORTED: libcpp-has-no-incomplete-pstl |