Skip to content

Commit a0cdd32

Browse files
[libc++] [test] Consistently use REQUIRES: has-unix-headers (llvm#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.)
1 parent 38bf684 commit a0cdd32

7 files changed

+14
-7
lines changed

libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
// hardening mode.
1212

1313
// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
14-
// UNSUPPORTED: c++03, !has-unix-headers, no-localization
14+
// REQUIRES: has-unix-headers
15+
// UNSUPPORTED: c++03, no-localization
1516
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
1617
// debug mode).
1718
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing

libcxx/test/libcxx/assertions/modes/override_with_debug_mode.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// This test ensures that we can override any hardening mode with the debug mode on a per-TU basis.
1010

1111
// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
12-
// UNSUPPORTED: c++03, !has-unix-headers, no-localization
12+
// REQUIRES: has-unix-headers
13+
// UNSUPPORTED: c++03, no-localization
1314
// The ability to set a custom abort message is required to compare the assertion message.
1415
// XFAIL: availability-verbose_abort-missing
1516
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG

libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// This test ensures that we can override any hardening mode with the extensive hardening mode on a per-TU basis.
1010

1111
// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
12-
// UNSUPPORTED: c++03, !has-unix-headers, no-localization
12+
// REQUIRES: has-unix-headers
13+
// UNSUPPORTED: c++03, no-localization
1314
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
1415
// debug mode).
1516
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing

libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// This test ensures that we can override any hardening mode with the fast mode on a per-TU basis.
1010

1111
// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
12-
// UNSUPPORTED: c++03, !has-unix-headers, no-localization
12+
// REQUIRES: has-unix-headers
13+
// UNSUPPORTED: c++03, no-localization
1314
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
1415
// debug mode).
1516
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing

libcxx/test/libcxx/assertions/modes/override_with_unchecked_mode.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// This test ensures that we can override any hardening mode with the unchecked mode on a per-TU basis.
1010

1111
// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
12-
// UNSUPPORTED: c++03, !has-unix-headers, no-localization
12+
// REQUIRES: has-unix-headers
13+
// UNSUPPORTED: c++03, no-localization
1314
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE
1415

1516
#include <cassert>

libcxx/test/libcxx/containers/sequences/deque/asan_caterpillar.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
// with origin in deque::__add_back_capacity.
1313

1414
// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
15-
// UNSUPPORTED: c++03, !has-unix-headers, no-localization
15+
// REQUIRES: has-unix-headers
16+
// UNSUPPORTED: c++03, no-localization
1617

1718
#include <deque>
1819
#include <cstdio>

libcxx/test/std/algorithms/pstl.exception_handling.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// UNSUPPORTED: c++03, c++11, c++14
1010
// UNSUPPORTED: no-exceptions
1111
// `check_assertion.h` requires Unix headers and regex support.
12-
// UNSUPPORTED: !has-unix-headers, no-localization
12+
// REQUIRES: has-unix-headers
13+
// UNSUPPORTED: no-localization
1314

1415
// UNSUPPORTED: libcpp-has-no-incomplete-pstl
1516

0 commit comments

Comments
 (0)