[libcxx-commits] [libcxx] [libc++] Refactor the conditions for enabling assertion tests (PR #213294)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 31 10:24:19 PDT 2026
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/213294
>From 734f50088c37aab95ee9ab52f5c967c2b0c857dc Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 31 Jul 2026 02:32:20 -0400
Subject: [PATCH 1/4] [libc++] Refactor the conditions for enabling assertion
tests
Every hardening assertion test used to repeat a hand-rolled set of Lit
conditions like `has-unix-headers` and a bunch of others. Instead, define
a single Lit feature to handle all of them.
Fixes #213148
---
libcxx/docs/TestingLibcxx.rst | 41 +++----
.../assert.iterator-indexing.pass.cpp | 4 +-
.../alg.shift/assert.shift_left.pass.cpp | 4 +-
.../alg.shift/assert.shift_right.pass.cpp | 4 +-
.../alg.foreach/assert.for_each_n.pass.cpp | 4 +-
.../assert.ranges.for_each_n.pass.cpp | 4 +-
.../alg.sorting/assert.min.max.pass.cpp | 4 +-
...ssert.sort.invalid_comparator.oob.pass.cpp | 5 +-
.../assert.sort.invalid_comparator.pass.cpp | 4 +-
.../debug_less.inconsistent.pass.cpp | 3 +-
.../libcxx/algorithms/debug_less.pass.cpp | 3 +-
...debug_three_way_comp.inconsistent.pass.cpp | 2 +-
.../libcxx/assertions/modes/debug.pass.cpp | 5 +-
.../assertions/modes/extensive.pass.cpp | 5 +-
.../libcxx/assertions/modes/fast.pass.cpp | 5 +-
.../modes/override_with_debug_mode.pass.cpp | 4 +-
.../override_with_extensive_mode.pass.cpp | 7 +-
.../modes/override_with_fast_mode.pass.cpp | 7 +-
.../override_with_unchecked_mode.pass.cpp | 4 +-
.../override_with_enforce_semantic.pass.cpp | 6 +-
.../override_with_ignore_semantic.pass.cpp | 4 +-
.../override_with_observe_semantic.pass.cpp | 6 +-
...rride_with_quick_enforce_semantic.pass.cpp | 6 +-
.../assert.compare_exchange_strong.pass.cpp | 4 +-
.../assert.compare_exchange_weak.pass.cpp | 4 +-
.../atomics/atomics.ref/assert.ctor.pass.cpp | 4 +-
.../atomics/atomics.ref/assert.load.pass.cpp | 4 +-
.../atomics/atomics.ref/assert.store.pass.cpp | 4 +-
.../atomics/atomics.ref/assert.wait.pass.cpp | 4 +-
.../debug.non-strict-weak-ordering.pass.cpp | 2 +-
.../flat.map/assert.input_range.pass.cpp | 4 +-
.../flat.map/assert.sorted_unique.pass.cpp | 5 +-
.../flat.multimap/assert.input_range.pass.cpp | 4 +-
.../assert.sorted_equivalent.pass.cpp | 5 +-
.../assert.sorted_unique.pass.cpp | 5 +-
.../flat.set/assert.sorted_unique.pass.cpp | 5 +-
.../sequences/deque/assert.pass.cpp | 5 +-
.../deque/assert.pop_back.empty.pass.cpp | 5 +-
.../sequences/forwardlist/assert.pass.cpp | 5 +-
.../assert.erase_iter.end.pass.cpp | 5 +-
.../assert.pop_back.empty.pass.cpp | 5 +-
.../sequences/vector.bool/assert.pass.cpp | 5 +-
.../vector/assert.back.empty.pass.cpp | 5 +-
.../vector/assert.cback.empty.pass.cpp | 5 +-
.../vector/assert.cfront.empty.pass.cpp | 5 +-
.../vector/assert.cindex.oob.pass.cpp | 5 +-
.../vector/assert.front.empty.pass.cpp | 5 +-
.../vector/assert.index.oob.pass.cpp | 5 +-
.../vector/assert.iterator.add.pass.cpp | 4 +-
.../vector/assert.iterator.decrement.pass.cpp | 4 +-
.../assert.iterator.dereference.pass.cpp | 4 +-
.../vector/assert.iterator.increment.pass.cpp | 4 +-
.../vector/assert.iterator.index.pass.cpp | 4 +-
.../vector/assert.pop_back.empty.pass.cpp | 5 +-
.../unord/unord.map/assert.bucket.pass.cpp | 5 +-
.../unord.map/assert.bucket_size.pass.cpp | 5 +-
.../assert.iterator.dereference.pass.cpp | 4 +-
.../assert.iterator.increment.pass.cpp | 4 +-
...assert.local_iterator.dereference.pass.cpp | 4 +-
.../assert.local_iterator.increment.pass.cpp | 4 +-
.../unord.map/assert.max_load_factor.pass.cpp | 5 +-
.../unord.multimap/assert.bucket.pass.cpp | 5 +-
.../assert.bucket_size.pass.cpp | 5 +-
.../assert.iterator.dereference.pass.cpp | 4 +-
.../assert.iterator.increment.pass.cpp | 4 +-
...assert.local_iterator.dereference.pass.cpp | 4 +-
.../assert.local_iterator.increment.pass.cpp | 4 +-
.../assert.max_load_factor.pass.cpp | 5 +-
.../unord.multiset/assert.bucket.pass.cpp | 5 +-
.../assert.bucket_size.pass.cpp | 5 +-
.../assert.iterator.dereference.pass.cpp | 4 +-
.../assert.iterator.increment.pass.cpp | 4 +-
...assert.local_iterator.dereference.pass.cpp | 4 +-
.../assert.local_iterator.increment.pass.cpp | 4 +-
.../assert.max_load_factor.pass.cpp | 5 +-
.../unord/unord.set/assert.bucket.pass.cpp | 5 +-
.../unord.set/assert.bucket_size.pass.cpp | 5 +-
.../assert.iterator.dereference.pass.cpp | 4 +-
.../assert.iterator.increment.pass.cpp | 4 +-
...assert.local_iterator.dereference.pass.cpp | 4 +-
.../assert.local_iterator.increment.pass.cpp | 4 +-
.../unord.set/assert.max_load_factor.pass.cpp | 5 +-
.../mdspan/extents/assert.conversion.pass.cpp | 4 +-
.../extents/assert.ctor_from_array.pass.cpp | 4 +-
.../assert.ctor_from_integral.pass.cpp | 4 +-
.../extents/assert.ctor_from_span.pass.cpp | 4 +-
.../views/mdspan/extents/assert.obs.pass.cpp | 4 +-
.../layout_left/assert.conversion.pass.cpp | 4 +-
.../layout_left/assert.ctor.extents.pass.cpp | 4 +-
.../assert.ctor.layout_right.pass.cpp | 4 +-
.../assert.ctor.layout_stride.pass.cpp | 4 +-
.../assert.index_operator.pass.cpp | 4 +-
.../mdspan/layout_left/assert.stride.pass.cpp | 4 +-
.../layout_right/assert.conversion.pass.cpp | 4 +-
.../layout_right/assert.ctor.extents.pass.cpp | 4 +-
.../assert.ctor.layout_left.pass.cpp | 4 +-
.../assert.ctor.layout_stride.pass.cpp | 4 +-
.../assert.index_operator.pass.cpp | 4 +-
.../layout_right/assert.stride.pass.cpp | 4 +-
.../layout_stride/assert.conversion.pass.cpp | 4 +-
...ert.ctor.extents_array.non_unique.pass.cpp | 4 +-
.../assert.ctor.extents_array.pass.cpp | 4 +-
...sert.ctor.extents_span.non_unique.pass.cpp | 4 +-
.../assert.ctor.extents_span.pass.cpp | 4 +-
.../assert.index_operator.pass.cpp | 4 +-
.../layout_stride/assert.stride.pass.cpp | 4 +-
.../mdspan/mdspan/assert.conversion.pass.cpp | 4 +-
.../mdspan/assert.index_operator.pass.cpp | 4 +-
.../views/mdspan/mdspan/assert.size.pass.cpp | 4 +-
.../assert.iterator-indexing.pass.cpp | 4 +-
.../span.cons/assert.iter_sent.pass.cpp | 5 +-
.../span.cons/assert.iter_size.pass.cpp | 5 +-
.../span.cons/assert.other_span.pass.cpp | 5 +-
.../span.cons/assert.range.pass.cpp | 5 +-
.../views.span/span.elem/assert.back.pass.cpp | 5 +-
.../span.elem/assert.front.pass.cpp | 5 +-
.../span.elem/assert.op_idx.pass.cpp | 5 +-
.../views.span/span.sub/assert.first.pass.cpp | 5 +-
.../views.span/span.sub/assert.last.pass.cpp | 5 +-
.../span.sub/assert.subspan.pass.cpp | 5 +-
.../path.itr/assert.iterator.pass.cpp | 4 +-
.../libcxx/iterators/assert.advance.pass.cpp | 5 +-
.../libcxx/iterators/assert.next.pass.cpp | 5 +-
.../libcxx/iterators/assert.prev.pass.cpp | 5 +-
.../bounded_iter/dereference.pass.cpp | 5 +-
.../capacity_aware_iter/assert.pass.cpp | 2 +-
.../counted.iterator/assert.pass.cpp | 4 +-
.../iterators.common/assert.pass.cpp | 4 +-
.../mem/mem.res/ctor.nullptr.assert.pass.cpp | 4 +-
.../libcxx/numerics/numarray/assert.pass.cpp | 5 +-
.../class.gslice.array/assert.get.pass.cpp | 5 +-
.../class.indirect.array/assert.get.pass.cpp | 5 +-
.../class.mask.array/assert.get.pass.cpp | 5 +-
.../class.slice.array/assert.get.pass.cpp | 5 +-
.../range.chunk.by/assert.begin.pass.cpp | 4 +-
.../range.chunk.by/assert.find-next.pass.cpp | 4 +-
.../range.chunk.by/assert.find-prev.pass.cpp | 4 +-
.../range.chunk.by.iter/assert.deref.pass.cpp | 4 +-
.../assert.increment.pass.cpp | 4 +-
.../iterator.valueless_by_exception.pass.cpp | 3 +-
.../range.drop.while/assert.begin.pass.cpp | 4 +-
.../assert.equal.pass.cpp | 4 +-
.../assert.equal.pass.cpp | 4 +-
.../range.stride.view/ctor.assert.pass.cpp | 3 +-
.../iterator/dereference.assert.pass.cpp | 3 +-
.../iterator/increment.assert.pass.cpp | 3 +-
.../operator_plus_equal.assert.pass.cpp | 3 +-
.../range.repeat.view/ctor.piecewise.pass.cpp | 4 +-
.../ctor.value.bound.pass.cpp | 4 +-
.../string.access/assert.back.pass.cpp | 5 +-
.../string.access/assert.cback.pass.cpp | 5 +-
.../string.access/assert.cfront.pass.cpp | 5 +-
.../string.access/assert.cindex.pass.cpp | 5 +-
.../string.access/assert.front.pass.cpp | 5 +-
.../string.access/assert.index.pass.cpp | 5 +-
.../assert.iterator.add.pass.cpp | 4 +-
.../assert.iterator.decrement.pass.cpp | 4 +-
.../assert.iterator.dereference.pass.cpp | 4 +-
.../assert.iterator.increment.pass.cpp | 4 +-
.../assert.iterator.index.pass.cpp | 4 +-
.../string.modifiers/assert.append.pass.cpp | 5 +-
.../string.modifiers/assert.assign.pass.cpp | 5 +-
.../assert.erase_iter.null.pass.cpp | 5 +-
.../string.modifiers/assert.pop_back.pass.cpp | 5 +-
.../string.view/assert.ctor.length.pass.cpp | 5 +-
.../string.view/assert.ctor.pointer.pass.cpp | 4 +-
.../assert.iterator-indexing.pass.cpp | 4 +-
.../text_encoding.ctor/assert.id.pass.cpp | 3 +-
.../assert.string_view.pass.cpp | 3 +-
.../assert.set_exception.pass.cpp | 6 +-
...sert.set_exception_at_thread_exit.pass.cpp | 6 +-
.../thread.barrier/assert.arrive.pass.cpp | 6 +-
.../thread.barrier/assert.ctor.pass.cpp | 6 +-
.../assert.arrive_and_wait.pass.cpp | 4 +-
.../thread.latch/assert.count_down.pass.cpp | 5 +-
.../thread/thread.latch/assert.ctor.pass.cpp | 5 +-
.../thread.semaphore/assert.ctor.pass.cpp | 6 +-
.../thread.semaphore/assert.release.pass.cpp | 6 +-
.../assert.from_utc.pass.cpp | 7 +-
.../assert.to_utc.pass.cpp | 7 +-
.../assert.from_utc.pass.cpp | 7 +-
.../assert.to_utc.pass.cpp | 7 +-
.../assert.ctor.pass.cpp | 7 +-
.../assert.ctor.pass.cpp | 7 +-
.../assert.to_local.pass.cpp | 7 +-
.../time.zone.members/assert.to_sys.pass.cpp | 7 +-
.../assert.to_sys_choose.pass.cpp | 7 +-
...ert.exception_guard.no_exceptions.pass.cpp | 5 +-
.../expected.expected/assert.arrow.pass.cpp | 4 +-
.../expected.expected/assert.deref.pass.cpp | 4 +-
.../expected.expected/assert.error.pass.cpp | 4 +-
.../expected.void/assert.deref.pass.cpp | 4 +-
.../expected.void/assert.error.pass.cpp | 4 +-
.../format.arg/assert.array.pass.cpp | 4 +-
.../assert.constant_arg_ptr.pass.cpp | 4 +-
.../assert.function_ptr.pass.cpp | 4 +-
.../assert.arithmetic.pass.cpp | 3 +-
.../assert.bounded_iterator.pass.cpp | 2 +-
.../assert.dereference.pass.cpp | 4 +-
.../assert.op_arrow.pass.cpp | 4 +-
.../utilities/template.bitset/assert.pass.cpp | 5 +-
.../assert.deallocate.pass.cpp | 2 +-
.../alg.clamp/assert.ranges_clamp.pass.cpp | 4 +-
.../pop.heap/assert.pop_heap.pass.cpp | 5 +-
.../pop.heap/assert.ranges_pop_heap.pass.cpp | 4 +-
.../sequences/array/assert.back.pass.cpp | 5 +-
.../sequences/array/assert.front.pass.cpp | 5 +-
.../sequences/array/assert.indexing.pass.cpp | 5 +-
.../sequences/array/assert.iterators.pass.cpp | 5 +-
.../assert.push_back.invalidation.pass.cpp | 5 +-
.../native_handle.assert.pass.cpp | 5 +-
.../native_handle.assert.pass.cpp | 5 +-
.../native_handle.assert.pass.cpp | 5 +-
.../native_handle.assert.pass.cpp | 5 +-
.../streambuf.get.area/setg.assert.pass.cpp | 4 +-
.../streambuf.put.area/setp.assert.pass.cpp | 4 +-
.../saturating_div.assert.pass.cpp | 4 +-
.../assert.ctor.value.bound.pass.cpp | 5 +-
.../assert.subscript.pass.cpp | 4 +-
.../assert.unreachable.pass.cpp | 4 +-
.../test_check_assertion.pass.cpp | 4 +-
libcxx/utils/libcxx/test/features/__init__.py | 3 +-
.../utils/libcxx/test/features/hardening.py | 113 ++++++++++++++++++
.../libcxx/test/features/libcxx_macros.py | 21 +---
libcxx/utils/libcxx/test/params.py | 1 -
225 files changed, 385 insertions(+), 783 deletions(-)
create mode 100644 libcxx/utils/libcxx/test/features/hardening.py
diff --git a/libcxx/docs/TestingLibcxx.rst b/libcxx/docs/TestingLibcxx.rst
index aaeceda29fe15..8b902518a204b 100644
--- a/libcxx/docs/TestingLibcxx.rst
+++ b/libcxx/docs/TestingLibcxx.rst
@@ -556,39 +556,36 @@ Testing hardening assertions
============================
Each hardening assertion should be tested using death tests (via the
-``TEST_LIBCPP_ASSERT_FAILURE`` macro). Use the ``libcpp-hardening-mode`` Lit
-feature to make sure the assertion is enabled in (and only in) the intended
-modes. The convention is to use `assert.` in the name of the test file to make
-it easier to identify as a hardening test, e.g. ``assert.my_func.pass.cpp``.
+``TEST_LIBCPP_ASSERT_FAILURE`` macro). The convention is to use ``assert.`` in
+the name of the test file to make it easier to identify as a hardening test, e.g.
+``assert.my_func.pass.cpp``.
+
+These tests only make sense in configurations where the death test machinery in
+``check_assertion.h`` is usable, where a failing assertion is observable, and
+where the assertion being tested is enabled in the first place. Use the various
+``can-test-hardening-assertions-<mode>`` Lit features to guard the tests accordingly.
+The bare ``can-test-hardening-assertions`` Lit feature only encodes whether the death
+test machinery is usable; it is meant for tests that select a hardening mode or an
+assertion semantic themselves (see the tests under ``libcxx/test/libcxx/assertions/``).
+
A toy example:
.. code-block:: cpp
- // Note: the following three annotations are currently needed to use the
- // `TEST_LIBCPP_ASSERT_FAILURE`.
- // REQUIRES: has-unix-headers
- // UNSUPPORTED: c++03
- // XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
- // Example: only run this test in `fast`/`extensive`/`debug` modes.
- // UNSUPPORTED: libcpp-hardening-mode=none
- // Example: only run this test in the `debug` mode.
- // REQUIRES: libcpp-hardening-mode=debug
- // Example: only run this test in `extensive`/`debug` modes.
- // REQUIRES: libcpp-hardening-mode={{extensive|debug}}
+ // Example: `std::foo(...)` uses `_LIBCPP_ASSERT_NON_NULL`, which is
+ // enabled in the `extensive` and `debug` modes.
+ // REQUIRES: can-test-hardening-assertions-extensive
- #include <header_being_tested>
+ #include <stdfoo>
#include "check_assertion.h" // Contains the `TEST_LIBCPP_ASSERT_FAILURE` macro
int main(int, char**) {
- std::type_being_tested foo;
int bad_input = -1;
- TEST_LIBCPP_ASSERT_FAILURE(foo.some_function_that_asserts(bad_input),
- "The expected assertion message");
+ TEST_LIBCPP_ASSERT_FAILURE(std::foo(bad_input), "The expected assertion message");
return 0;
}
-Note that error messages are only tested (matched) if the ``debug``
-hardening mode is used.
+Note that error messages are only tested (matched) when the assertion semantic in
+effect logs one, i.e. ``enforce`` or ``observe``.
diff --git a/libcxx/test/libcxx-03/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp b/libcxx/test/libcxx-03/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp
index 5043a88cbc3da..c0b1c5073e63f 100644
--- a/libcxx/test/libcxx-03/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp
+++ b/libcxx/test/libcxx-03/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp
@@ -8,8 +8,8 @@
// Make sure that std::string_view's iterators check for OOB accesses when the debug mode is enabled.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators
-// UNSUPPORTED: libcpp-hardening-mode=none
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators
#include <iterator>
#include <string_view>
diff --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.shift/assert.shift_left.pass.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.shift/assert.shift_left.pass.cpp
index 0d29ebc1b3390..da075e6249f11 100644
--- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.shift/assert.shift_left.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.shift/assert.shift_left.pass.cpp
@@ -8,10 +8,8 @@
// <algorithm>
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <algorithm>
#include <array>
diff --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.shift/assert.shift_right.pass.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.shift/assert.shift_right.pass.cpp
index 2c6f54304eacf..d964ad3a645c4 100644
--- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.shift/assert.shift_right.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.shift/assert.shift_right.pass.cpp
@@ -8,10 +8,8 @@
// <algorithm>
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <algorithm>
#include <array>
diff --git a/libcxx/test/libcxx/algorithms/alg.nonmodifying/alg.foreach/assert.for_each_n.pass.cpp b/libcxx/test/libcxx/algorithms/alg.nonmodifying/alg.foreach/assert.for_each_n.pass.cpp
index 5ae0dbc865b46..926b310dd21a7 100644
--- a/libcxx/test/libcxx/algorithms/alg.nonmodifying/alg.foreach/assert.for_each_n.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.nonmodifying/alg.foreach/assert.for_each_n.pass.cpp
@@ -14,10 +14,8 @@
//
// [alg.foreach] requires `n >= 0`; passing a negative count is a precondition violation.
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <algorithm>
diff --git a/libcxx/test/libcxx/algorithms/alg.nonmodifying/alg.foreach/assert.ranges.for_each_n.pass.cpp b/libcxx/test/libcxx/algorithms/alg.nonmodifying/alg.foreach/assert.ranges.for_each_n.pass.cpp
index e57f342e760a6..3b4c3fc399cae 100644
--- a/libcxx/test/libcxx/algorithms/alg.nonmodifying/alg.foreach/assert.ranges.for_each_n.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.nonmodifying/alg.foreach/assert.ranges.for_each_n.pass.cpp
@@ -15,10 +15,8 @@
//
// [alg.foreach] requires `n >= 0`; passing a negative count is a precondition violation.
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <algorithm>
#include <array>
diff --git a/libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp b/libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp
index 7e765d7e84683..f8aa1b3135743 100644
--- a/libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp
@@ -8,10 +8,8 @@
// <algorithm>
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <algorithm>
#include <array>
diff --git a/libcxx/test/libcxx/algorithms/alg.sorting/assert.sort.invalid_comparator/assert.sort.invalid_comparator.oob.pass.cpp b/libcxx/test/libcxx/algorithms/alg.sorting/assert.sort.invalid_comparator/assert.sort.invalid_comparator.oob.pass.cpp
index 6ddee1b2aabe0..0250f84294d7b 100644
--- a/libcxx/test/libcxx/algorithms/alg.sorting/assert.sort.invalid_comparator/assert.sort.invalid_comparator.oob.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.sorting/assert.sort.invalid_comparator/assert.sort.invalid_comparator.oob.pass.cpp
@@ -6,13 +6,12 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// In the debug mode, the comparator validations will notice that it doesn't satisfy strict weak ordering before the
// algorithm actually runs and goes out of bounds, so the test will terminate before the tested assertions are
// triggered.
-// UNSUPPORTED: libcpp-hardening-mode=none, libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// UNSUPPORTED: libcpp-hardening-mode=debug
#include <algorithm>
#include <cassert>
diff --git a/libcxx/test/libcxx/algorithms/alg.sorting/assert.sort.invalid_comparator/assert.sort.invalid_comparator.pass.cpp b/libcxx/test/libcxx/algorithms/alg.sorting/assert.sort.invalid_comparator/assert.sort.invalid_comparator.pass.cpp
index 92671617eb032..5f0710140aa61 100644
--- a/libcxx/test/libcxx/algorithms/alg.sorting/assert.sort.invalid_comparator/assert.sort.invalid_comparator.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.sorting/assert.sort.invalid_comparator/assert.sort.invalid_comparator.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// REQUIRES: libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// This test uses a specific combination of an invalid comparator and sequence of values to
// ensure that our sorting functions do not go out-of-bounds and satisfy strict weak ordering in that case.
diff --git a/libcxx/test/libcxx/algorithms/debug_less.inconsistent.pass.cpp b/libcxx/test/libcxx/algorithms/debug_less.inconsistent.pass.cpp
index 701edd1335afa..3661484c73c97 100644
--- a/libcxx/test/libcxx/algorithms/debug_less.inconsistent.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/debug_less.inconsistent.pass.cpp
@@ -12,8 +12,7 @@
// Make sure __debug_less asserts when the comparator is not consistent.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode=debug
-// UNSUPPORTED: c++03
+// REQUIRES: can-test-hardening-assertions-debug
#include <algorithm>
#include <iterator>
diff --git a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp
index 4889f94d170a1..84cde29bffe84 100644
--- a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp
@@ -12,8 +12,7 @@
// __debug_less checks that a comparator actually provides a strict-weak ordering.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode=debug
-// UNSUPPORTED: c++03
+// REQUIRES: can-test-hardening-assertions-debug
#include <algorithm>
#include <cassert>
diff --git a/libcxx/test/libcxx/algorithms/debug_three_way_comp.inconsistent.pass.cpp b/libcxx/test/libcxx/algorithms/debug_three_way_comp.inconsistent.pass.cpp
index b9bb1c9136f65..cd184573d2ef4 100644
--- a/libcxx/test/libcxx/algorithms/debug_three_way_comp.inconsistent.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/debug_three_way_comp.inconsistent.pass.cpp
@@ -12,7 +12,7 @@
// Make sure __debug_three_way_comp asserts when the comparator is not consistent.
-// REQUIRES: libcpp-hardening-mode=debug
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17
#include <algorithm>
diff --git a/libcxx/test/libcxx/assertions/modes/debug.pass.cpp b/libcxx/test/libcxx/assertions/modes/debug.pass.cpp
index ea9770b0b2fbc..6b4b7aba66f47 100644
--- a/libcxx/test/libcxx/assertions/modes/debug.pass.cpp
+++ b/libcxx/test/libcxx/assertions/modes/debug.pass.cpp
@@ -10,10 +10,7 @@
// by default.
// REQUIRES: libcpp-hardening-mode=debug
-// `check_assertion.h` is only available starting from C++11.
-// UNSUPPORTED: c++03
-// `check_assertion.h` requires Unix headers.
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions
#include <cassert>
#include "check_assertion.h"
diff --git a/libcxx/test/libcxx/assertions/modes/extensive.pass.cpp b/libcxx/test/libcxx/assertions/modes/extensive.pass.cpp
index 5743f95e472d7..24fd734528d45 100644
--- a/libcxx/test/libcxx/assertions/modes/extensive.pass.cpp
+++ b/libcxx/test/libcxx/assertions/modes/extensive.pass.cpp
@@ -10,10 +10,7 @@
// has been enabled by default.
// REQUIRES: libcpp-hardening-mode=extensive
-// `check_assertion.h` is only available starting from C++11.
-// UNSUPPORTED: c++03
-// `check_assertion.h` requires Unix headers.
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions
#include <cassert>
#include "check_assertion.h"
diff --git a/libcxx/test/libcxx/assertions/modes/fast.pass.cpp b/libcxx/test/libcxx/assertions/modes/fast.pass.cpp
index 85181859fdad0..8af86c36e34f9 100644
--- a/libcxx/test/libcxx/assertions/modes/fast.pass.cpp
+++ b/libcxx/test/libcxx/assertions/modes/fast.pass.cpp
@@ -10,10 +10,7 @@
// been enabled by default.
// REQUIRES: libcpp-hardening-mode=fast
-// `check_assertion.h` is only available starting from C++11.
-// UNSUPPORTED: c++03
-// `check_assertion.h` requires Unix headers.
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions
#include <cassert>
#include "check_assertion.h"
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 02565d0b6a176..ec52a03689bd5 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
@@ -8,9 +8,7 @@
// 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.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, no-localization
+// REQUIRES: can-test-hardening-assertions
// 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 74fe70feb077c..c6c2891576eda 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
@@ -8,12 +8,7 @@
// 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.
-// 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
+// REQUIRES: can-test-hardening-assertions
// HWASAN replaces TRAP with abort or error exit code.
// XFAIL: hwasan
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
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 f243897a986b0..eff7680cab063 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
@@ -8,12 +8,7 @@
// 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.
-// 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
+// REQUIRES: can-test-hardening-assertions
// HWASAN replaces TRAP with abort or error exit code.
// XFAIL: hwasan
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST
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 0922556c8dc01..34fc04687c4f7 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
@@ -8,9 +8,7 @@
// 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.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, no-localization
+// REQUIRES: can-test-hardening-assertions
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE
#include <cassert>
diff --git a/libcxx/test/libcxx/assertions/semantics/override_with_enforce_semantic.pass.cpp b/libcxx/test/libcxx/assertions/semantics/override_with_enforce_semantic.pass.cpp
index 056864e1aea71..6ff03892f9cbc 100644
--- a/libcxx/test/libcxx/assertions/semantics/override_with_enforce_semantic.pass.cpp
+++ b/libcxx/test/libcxx/assertions/semantics/override_with_enforce_semantic.pass.cpp
@@ -9,10 +9,8 @@
// This test ensures that we can override the assertion semantic used by any checked hardening mode with `enforce` on
// a per-TU basis (this is valid for the `debug` mode as well, though a no-op).
-// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, no-localization
-// UNSUPPORTED: libcpp-hardening-mode=none, libcpp-has-no-experimental-hardening-observe-semantic
+// REQUIRES: can-test-hardening-assertions-fast
+// UNSUPPORTED: libcpp-has-no-experimental-hardening-observe-semantic
// 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_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_ENFORCE
diff --git a/libcxx/test/libcxx/assertions/semantics/override_with_ignore_semantic.pass.cpp b/libcxx/test/libcxx/assertions/semantics/override_with_ignore_semantic.pass.cpp
index b8c9028fe2e5c..e66220ba99aca 100644
--- a/libcxx/test/libcxx/assertions/semantics/override_with_ignore_semantic.pass.cpp
+++ b/libcxx/test/libcxx/assertions/semantics/override_with_ignore_semantic.pass.cpp
@@ -9,9 +9,7 @@
// This test ensures that we can override the assertion semantic used by any hardening mode with `ignore` on a per-TU
// basis (this is valid for the `none` mode as well, though a no-op).
-// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, no-localization
+// REQUIRES: can-test-hardening-assertions
// UNSUPPORTED: libcpp-has-no-experimental-hardening-observe-semantic
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_IGNORE
diff --git a/libcxx/test/libcxx/assertions/semantics/override_with_observe_semantic.pass.cpp b/libcxx/test/libcxx/assertions/semantics/override_with_observe_semantic.pass.cpp
index a14c44f5a8e73..b354893b7b811 100644
--- a/libcxx/test/libcxx/assertions/semantics/override_with_observe_semantic.pass.cpp
+++ b/libcxx/test/libcxx/assertions/semantics/override_with_observe_semantic.pass.cpp
@@ -9,10 +9,8 @@
// This test ensures that we can override the assertion semantic used by any checked hardening mode with `observe` on
// a per-TU basis.
-// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, no-localization
-// UNSUPPORTED: libcpp-hardening-mode=none, libcpp-has-no-experimental-hardening-observe-semantic
+// REQUIRES: can-test-hardening-assertions-fast
+// UNSUPPORTED: libcpp-has-no-experimental-hardening-observe-semantic
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_OBSERVE
#include <cassert>
diff --git a/libcxx/test/libcxx/assertions/semantics/override_with_quick_enforce_semantic.pass.cpp b/libcxx/test/libcxx/assertions/semantics/override_with_quick_enforce_semantic.pass.cpp
index be5038c4bb4ff..baa0cb5209201 100644
--- a/libcxx/test/libcxx/assertions/semantics/override_with_quick_enforce_semantic.pass.cpp
+++ b/libcxx/test/libcxx/assertions/semantics/override_with_quick_enforce_semantic.pass.cpp
@@ -9,10 +9,8 @@
// This test ensures that we can override the assertion semantic used by any checked hardening mode with `quick-enforce`
// on a per-TU basis (this is valid for the `fast` and `extensive` modes as well, though a no-op).
-// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, no-localization
-// UNSUPPORTED: libcpp-hardening-mode=none, libcpp-has-no-experimental-hardening-observe-semantic
+// REQUIRES: can-test-hardening-assertions-fast
+// UNSUPPORTED: libcpp-has-no-experimental-hardening-observe-semantic
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_QUICK_ENFORCE
#include <cassert>
diff --git a/libcxx/test/libcxx/atomics/atomics.ref/assert.compare_exchange_strong.pass.cpp b/libcxx/test/libcxx/atomics/atomics.ref/assert.compare_exchange_strong.pass.cpp
index 92f6a622c329c..4eff6021fd900 100644
--- a/libcxx/test/libcxx/atomics/atomics.ref/assert.compare_exchange_strong.pass.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.ref/assert.compare_exchange_strong.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none || libcpp-hardening-mode=fast
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// ADDITIONAL_COMPILE_FLAGS: -Wno-user-defined-warnings
// <atomic>
diff --git a/libcxx/test/libcxx/atomics/atomics.ref/assert.compare_exchange_weak.pass.cpp b/libcxx/test/libcxx/atomics/atomics.ref/assert.compare_exchange_weak.pass.cpp
index 3bee003b2143f..6597d8cd1d26f 100644
--- a/libcxx/test/libcxx/atomics/atomics.ref/assert.compare_exchange_weak.pass.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.ref/assert.compare_exchange_weak.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none || libcpp-hardening-mode=fast
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// ADDITIONAL_COMPILE_FLAGS: -Wno-user-defined-warnings
// <atomic>
diff --git a/libcxx/test/libcxx/atomics/atomics.ref/assert.ctor.pass.cpp b/libcxx/test/libcxx/atomics/atomics.ref/assert.ctor.pass.cpp
index 3d4700406984c..31d0b296b546a 100644
--- a/libcxx/test/libcxx/atomics/atomics.ref/assert.ctor.pass.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.ref/assert.ctor.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none || libcpp-hardening-mode=fast
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <atomic>
diff --git a/libcxx/test/libcxx/atomics/atomics.ref/assert.load.pass.cpp b/libcxx/test/libcxx/atomics/atomics.ref/assert.load.pass.cpp
index 504d135c4f3d7..b9ae0966939a6 100644
--- a/libcxx/test/libcxx/atomics/atomics.ref/assert.load.pass.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.ref/assert.load.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none || libcpp-hardening-mode=fast
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// ADDITIONAL_COMPILE_FLAGS: -Wno-user-defined-warnings
// <atomic>
diff --git a/libcxx/test/libcxx/atomics/atomics.ref/assert.store.pass.cpp b/libcxx/test/libcxx/atomics/atomics.ref/assert.store.pass.cpp
index 1afa42528e14f..a3aa393652d39 100644
--- a/libcxx/test/libcxx/atomics/atomics.ref/assert.store.pass.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.ref/assert.store.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none || libcpp-hardening-mode=fast
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// ADDITIONAL_COMPILE_FLAGS: -Wno-user-defined-warnings
// <atomic>
diff --git a/libcxx/test/libcxx/atomics/atomics.ref/assert.wait.pass.cpp b/libcxx/test/libcxx/atomics/atomics.ref/assert.wait.pass.cpp
index 39178d2393be2..c7e0fa94090b9 100644
--- a/libcxx/test/libcxx/atomics/atomics.ref/assert.wait.pass.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.ref/assert.wait.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none || libcpp-hardening-mode=fast
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// ADDITIONAL_COMPILE_FLAGS: -Wno-user-defined-warnings
// <atomic>
diff --git a/libcxx/test/libcxx/containers/associative/debug.non-strict-weak-ordering.pass.cpp b/libcxx/test/libcxx/containers/associative/debug.non-strict-weak-ordering.pass.cpp
index 00a3a0730545d..921a076d862b4 100644
--- a/libcxx/test/libcxx/containers/associative/debug.non-strict-weak-ordering.pass.cpp
+++ b/libcxx/test/libcxx/containers/associative/debug.non-strict-weak-ordering.pass.cpp
@@ -12,7 +12,7 @@
// This test ensures that libc++ detects when std::set or std::map are used with a
// predicate that is not a strict weak ordering when the debug mode is enabled.
-// REQUIRES: libcpp-hardening-mode=debug
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14
#include <map>
diff --git a/libcxx/test/libcxx/containers/container.adaptors/flat.map/assert.input_range.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/flat.map/assert.input_range.pass.cpp
index 2db803b53441f..88feba3f94cb2 100644
--- a/libcxx/test/libcxx/containers/container.adaptors/flat.map/assert.input_range.pass.cpp
+++ b/libcxx/test/libcxx/containers/container.adaptors/flat.map/assert.input_range.pass.cpp
@@ -5,10 +5,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <flat_map>
diff --git a/libcxx/test/libcxx/containers/container.adaptors/flat.map/assert.sorted_unique.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/flat.map/assert.sorted_unique.pass.cpp
index e6bd3f385af9c..34a234e5d5f44 100644
--- a/libcxx/test/libcxx/containers/container.adaptors/flat.map/assert.sorted_unique.pass.cpp
+++ b/libcxx/test/libcxx/containers/container.adaptors/flat.map/assert.sorted_unique.pass.cpp
@@ -5,11 +5,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// REQUIRES: libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <flat_map>
diff --git a/libcxx/test/libcxx/containers/container.adaptors/flat.multimap/assert.input_range.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/flat.multimap/assert.input_range.pass.cpp
index 504f36fcd00b8..2dc7c7521a1c1 100644
--- a/libcxx/test/libcxx/containers/container.adaptors/flat.multimap/assert.input_range.pass.cpp
+++ b/libcxx/test/libcxx/containers/container.adaptors/flat.multimap/assert.input_range.pass.cpp
@@ -5,10 +5,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <flat_map>
diff --git a/libcxx/test/libcxx/containers/container.adaptors/flat.multimap/assert.sorted_equivalent.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/flat.multimap/assert.sorted_equivalent.pass.cpp
index 6b8ad3c7ac9aa..892da60aedda5 100644
--- a/libcxx/test/libcxx/containers/container.adaptors/flat.multimap/assert.sorted_equivalent.pass.cpp
+++ b/libcxx/test/libcxx/containers/container.adaptors/flat.multimap/assert.sorted_equivalent.pass.cpp
@@ -5,11 +5,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// REQUIRES: libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <flat_map>
diff --git a/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/assert.sorted_unique.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/assert.sorted_unique.pass.cpp
index 54b07baaff27a..b57f572872fe6 100644
--- a/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/assert.sorted_unique.pass.cpp
+++ b/libcxx/test/libcxx/containers/container.adaptors/flat.multiset/assert.sorted_unique.pass.cpp
@@ -5,11 +5,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// REQUIRES: libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <flat_set>
diff --git a/libcxx/test/libcxx/containers/container.adaptors/flat.set/assert.sorted_unique.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/flat.set/assert.sorted_unique.pass.cpp
index 62903af7f4e47..75d68d05a4c93 100644
--- a/libcxx/test/libcxx/containers/container.adaptors/flat.set/assert.sorted_unique.pass.cpp
+++ b/libcxx/test/libcxx/containers/container.adaptors/flat.set/assert.sorted_unique.pass.cpp
@@ -5,11 +5,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// REQUIRES: libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <flat_set>
diff --git a/libcxx/test/libcxx/containers/sequences/deque/assert.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/assert.pass.cpp
index 375a4cdcd58fe..d2caf7e5b7674 100644
--- a/libcxx/test/libcxx/containers/sequences/deque/assert.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/deque/assert.pass.cpp
@@ -10,10 +10,7 @@
// Test hardening assertions for std::deque.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <deque>
diff --git a/libcxx/test/libcxx/containers/sequences/deque/assert.pop_back.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/assert.pop_back.empty.pass.cpp
index 6bdb117485609..b823410f21e81 100644
--- a/libcxx/test/libcxx/containers/sequences/deque/assert.pop_back.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/deque/assert.pop_back.empty.pass.cpp
@@ -10,10 +10,7 @@
// pop_back() more than the number of elements in a deque
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <deque>
diff --git a/libcxx/test/libcxx/containers/sequences/forwardlist/assert.pass.cpp b/libcxx/test/libcxx/containers/sequences/forwardlist/assert.pass.cpp
index 6d1748e645025..a83350655b49f 100644
--- a/libcxx/test/libcxx/containers/sequences/forwardlist/assert.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/forwardlist/assert.pass.cpp
@@ -10,10 +10,7 @@
// Test hardening assertions for std::forward_list.
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <forward_list>
diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.erase_iter.end.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.erase_iter.end.pass.cpp
index 6441d533cfa29..89684d518853e 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.erase_iter.end.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.erase_iter.end.pass.cpp
@@ -10,10 +10,7 @@
// Call erase(const_iterator position) with end()
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <list>
diff --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.pop_back.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.pop_back.empty.pass.cpp
index c344264852995..4ce50b6690c5c 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.pop_back.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.pop_back.empty.pass.cpp
@@ -10,10 +10,7 @@
// void pop_back();
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <list>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/sequences/vector.bool/assert.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector.bool/assert.pass.cpp
index 41badad8f569d..1e987e22aba2c 100644
--- a/libcxx/test/libcxx/containers/sequences/vector.bool/assert.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector.bool/assert.pass.cpp
@@ -10,10 +10,7 @@
// Test hardening assertions for std::vector<bool>.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <vector>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.back.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.back.empty.pass.cpp
index 169ad1def9e6f..376e80fdb288a 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.back.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.back.empty.pass.cpp
@@ -10,10 +10,7 @@
// Call back() on empty container.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <vector>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.cback.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.cback.empty.pass.cpp
index 5ceb4a16b9340..4423b6a9abe16 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.cback.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.cback.empty.pass.cpp
@@ -10,10 +10,7 @@
// Call back() on empty const container.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <vector>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.cfront.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.cfront.empty.pass.cpp
index 20f94f1d3f0fa..c036bb47948ba 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.cfront.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.cfront.empty.pass.cpp
@@ -10,10 +10,7 @@
// Call front() on empty const container.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <vector>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.cindex.oob.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.cindex.oob.pass.cpp
index 3a9a7add3e30d..dae0d3127cdd5 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.cindex.oob.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.cindex.oob.pass.cpp
@@ -10,10 +10,7 @@
// Index const vector out of bounds.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <vector>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.front.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.front.empty.pass.cpp
index 85364c778ad64..ab6b343ea01cb 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.front.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.front.empty.pass.cpp
@@ -10,10 +10,7 @@
// Call front() on empty container.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <vector>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.index.oob.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.index.oob.pass.cpp
index 14cb89625f064..8cc6d0cf9ea02 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.index.oob.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.index.oob.pass.cpp
@@ -10,10 +10,7 @@
// Index vector out of bounds.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <vector>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.add.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.add.pass.cpp
index a066ad30ebd71..e9e211e401af9 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.add.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.add.pass.cpp
@@ -10,8 +10,8 @@
// Add to iterator out of bounds.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators-in-vector
-// UNSUPPORTED: libcpp-hardening-mode=none, c++03
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators-in-vector
#include <vector>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.decrement.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.decrement.pass.cpp
index 59b9c16a6aa0e..f2887ba9a5fab 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.decrement.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.decrement.pass.cpp
@@ -10,8 +10,8 @@
// Decrement iterator prior to begin.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators-in-vector
-// UNSUPPORTED: libcpp-hardening-mode=none, c++03
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators-in-vector
#include <vector>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.dereference.pass.cpp
index 877d3655fbe2e..308f01b795dc3 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.dereference.pass.cpp
@@ -10,8 +10,8 @@
// Dereference non-dereferenceable iterator.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators-in-vector
-// UNSUPPORTED: libcpp-hardening-mode=none, c++03
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators-in-vector
#include <vector>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.increment.pass.cpp
index e540f40f8c476..073c1704e6a25 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.increment.pass.cpp
@@ -10,8 +10,8 @@
// Increment iterator past end.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators-in-vector
-// UNSUPPORTED: libcpp-hardening-mode=none, c++03
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators-in-vector
#include <vector>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.index.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.index.pass.cpp
index 63354af5af022..3fc7022a7c684 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.index.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.iterator.index.pass.cpp
@@ -10,8 +10,8 @@
// Index iterator out of bounds.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators-in-vector
-// UNSUPPORTED: libcpp-hardening-mode=none, c++03
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators-in-vector
#include <vector>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/sequences/vector/assert.pop_back.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.pop_back.empty.pass.cpp
index 6734f25b9db10..bf94385f22140 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.pop_back.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.pop_back.empty.pass.cpp
@@ -10,10 +10,7 @@
// pop_back() more than the number of elements in a vector
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <vector>
diff --git a/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket.pass.cpp
index 26621bce52187..035f075f3a99a 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket.pass.cpp
@@ -10,10 +10,7 @@
// size_type bucket(const key_type& __k) const;
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <string>
diff --git a/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket_size.pass.cpp
index ce6534f95f8dc..50d97380ff4b0 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket_size.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket_size.pass.cpp
@@ -14,10 +14,7 @@
// size_type bucket_size(size_type n) const
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <string>
diff --git a/libcxx/test/libcxx/containers/unord/unord.map/assert.iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/assert.iterator.dereference.pass.cpp
index f57341d64ff39..b349df9299a7c 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/assert.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/assert.iterator.dereference.pass.cpp
@@ -10,9 +10,7 @@
// Dereference non-dereferenceable iterator.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <string>
diff --git a/libcxx/test/libcxx/containers/unord/unord.map/assert.iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/assert.iterator.increment.pass.cpp
index 3f4d1c2d3bdbb..912a011a8f2c3 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/assert.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/assert.iterator.increment.pass.cpp
@@ -10,9 +10,7 @@
// Increment iterator past end.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/unord/unord.map/assert.local_iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/assert.local_iterator.dereference.pass.cpp
index 8b47f54895560..2b77ff8c52d71 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/assert.local_iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/assert.local_iterator.dereference.pass.cpp
@@ -10,9 +10,7 @@
// Dereference non-dereferenceable iterator.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <string>
diff --git a/libcxx/test/libcxx/containers/unord/unord.map/assert.local_iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/assert.local_iterator.increment.pass.cpp
index 8f8305833e077..64c121b4f007c 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/assert.local_iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/assert.local_iterator.increment.pass.cpp
@@ -10,9 +10,7 @@
// Increment local_iterator past end.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <string>
diff --git a/libcxx/test/libcxx/containers/unord/unord.map/assert.max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/assert.max_load_factor.pass.cpp
index 117758c5385e0..be3063edebcd2 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/assert.max_load_factor.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/assert.max_load_factor.pass.cpp
@@ -15,10 +15,7 @@
// float max_load_factor() const;
// void max_load_factor(float mlf);
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <string>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket.pass.cpp
index 61c1651fdd956..3cbf9d6bb5741 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket.pass.cpp
@@ -14,10 +14,7 @@
// size_type bucket(const key_type& __k) const;
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <string>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket_size.pass.cpp
index 8f2efdb6e56e6..5efa862f1e458 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket_size.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket_size.pass.cpp
@@ -14,10 +14,7 @@
// size_type bucket_size(size_type n) const
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <string>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.iterator.dereference.pass.cpp
index d295a82a8a1f5..d731d82e8fecf 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.iterator.dereference.pass.cpp
@@ -10,9 +10,7 @@
// Dereference non-dereferenceable iterator.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <string>
#include <unordered_map>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.iterator.increment.pass.cpp
index 4247edc8def97..bdb2bafa4a075 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.iterator.increment.pass.cpp
@@ -10,9 +10,7 @@
// Increment iterator past end.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.local_iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.local_iterator.dereference.pass.cpp
index 7ea87964e05f0..81c07bd5b60a0 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.local_iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.local_iterator.dereference.pass.cpp
@@ -10,9 +10,7 @@
// Dereference non-dereferenceable iterator.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <string>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.local_iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.local_iterator.increment.pass.cpp
index ffa3fec0ca1f1..097a6e4dbfeec 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.local_iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.local_iterator.increment.pass.cpp
@@ -10,9 +10,7 @@
// Increment local_iterator past end.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.max_load_factor.pass.cpp
index dda5fe8b632bd..4c378e98eaa42 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.max_load_factor.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.max_load_factor.pass.cpp
@@ -15,10 +15,7 @@
// float max_load_factor() const;
// void max_load_factor(float mlf);
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_map>
#include <string>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket.pass.cpp
index eebf11c27bb17..f36f7dd00d877 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket.pass.cpp
@@ -14,10 +14,7 @@
// size_type bucket(const key_type& __k) const;
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket_size.pass.cpp
index 1c107ca11193c..bb5bba3a196c2 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket_size.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket_size.pass.cpp
@@ -14,10 +14,7 @@
// size_type bucket_size(size_type n) const
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.iterator.dereference.pass.cpp
index 31edd6099c965..e1b6f4d9757c4 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.iterator.dereference.pass.cpp
@@ -10,9 +10,7 @@
// Dereference non-dereferenceable iterator.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.iterator.increment.pass.cpp
index 0e0e4aab303cd..aae10ea967386 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.iterator.increment.pass.cpp
@@ -10,9 +10,7 @@
// Increment iterator past end.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.local_iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.local_iterator.dereference.pass.cpp
index fe833c40bc351..4b64cd2352212 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.local_iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.local_iterator.dereference.pass.cpp
@@ -10,9 +10,7 @@
// Dereference non-dereferenceable iterator.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.local_iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.local_iterator.increment.pass.cpp
index 142c07f83c066..40dec5818af85 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.local_iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.local_iterator.increment.pass.cpp
@@ -10,9 +10,7 @@
// Increment local_iterator past end.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.max_load_factor.pass.cpp
index a38849482cee9..6f0cabebe6ba9 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.max_load_factor.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.max_load_factor.pass.cpp
@@ -15,10 +15,7 @@
// float max_load_factor() const;
// void max_load_factor(float mlf);
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
diff --git a/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket.pass.cpp
index 6504a88a2e1f6..234fdd64b2635 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket.pass.cpp
@@ -14,10 +14,7 @@
// size_type bucket(const key_type& __k) const;
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
diff --git a/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket_size.pass.cpp
index 18440548d76c2..d07243054303f 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket_size.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket_size.pass.cpp
@@ -14,10 +14,7 @@
// size_type bucket_size(size_type n) const
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
diff --git a/libcxx/test/libcxx/containers/unord/unord.set/assert.iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/assert.iterator.dereference.pass.cpp
index 8464601f61046..33fc2f19bf2eb 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/assert.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/assert.iterator.dereference.pass.cpp
@@ -10,9 +10,7 @@
// Dereference non-dereferenceable iterator.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
diff --git a/libcxx/test/libcxx/containers/unord/unord.set/assert.iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/assert.iterator.increment.pass.cpp
index 29446880900bc..2e3957e62dc7a 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/assert.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/assert.iterator.increment.pass.cpp
@@ -10,9 +10,7 @@
// Increment iterator past end.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/unord/unord.set/assert.local_iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/assert.local_iterator.dereference.pass.cpp
index 7163e3735cee0..50a19edeb98a1 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/assert.local_iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/assert.local_iterator.dereference.pass.cpp
@@ -10,9 +10,7 @@
// Dereference non-dereferenceable iterator.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
diff --git a/libcxx/test/libcxx/containers/unord/unord.set/assert.local_iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/assert.local_iterator.increment.pass.cpp
index c9fe5afd09702..eab305a28c42a 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/assert.local_iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/assert.local_iterator.increment.pass.cpp
@@ -10,9 +10,7 @@
// Increment local_iterator past end.
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
#include <cassert>
diff --git a/libcxx/test/libcxx/containers/unord/unord.set/assert.max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/assert.max_load_factor.pass.cpp
index 80e89411d99c3..639cbd00e35e6 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/assert.max_load_factor.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/assert.max_load_factor.pass.cpp
@@ -15,10 +15,7 @@
// float max_load_factor() const;
// void max_load_factor(float mlf);
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <unordered_set>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.conversion.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.conversion.pass.cpp
index 31766e4c51c3b..8f7f24b78ce84 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.conversion.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.conversion.pass.cpp
@@ -4,10 +4,8 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_array.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_array.pass.cpp
index 90cb0c84a063b..14bd855293695 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_array.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_array.pass.cpp
@@ -4,10 +4,8 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_integral.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_integral.pass.cpp
index 37e79aabf8532..6fc846dddd5a3 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_integral.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_integral.pass.cpp
@@ -4,10 +4,8 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp
index 650fecf62128c..810827d556efd 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp
@@ -4,10 +4,8 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// Test construction from span:
//
diff --git a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.obs.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.obs.pass.cpp
index e32c0a96c1261..28dd554fc5031 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.obs.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.obs.pass.cpp
@@ -4,10 +4,8 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.conversion.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.conversion.pass.cpp
index 7b6616f19d724..be7951015512e 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.conversion.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.conversion.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.extents.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.extents.pass.cpp
index 7c96f8ec9353f..5a82f28b62583 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.extents.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.extents.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_right.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_right.pass.cpp
index e578bac2103b0..bfd3241ebce14 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_right.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_right.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_stride.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_stride.pass.cpp
index 0dcd6bd1c0312..cc3e018b76f9c 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_stride.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.ctor.layout_stride.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// ADDITIONAL_COMPILE_FLAGS: -Wno-ctad-maybe-unsupported
// FIXME: https://llvm.org/PR64719
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.index_operator.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.index_operator.pass.cpp
index 79e424fbb52cb..b8b37ea891bb7 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.index_operator.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.index_operator.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.stride.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.stride.pass.cpp
index 61a5149c6881a..c3ae57fbdd365 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.stride.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_left/assert.stride.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.conversion.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.conversion.pass.cpp
index df16edb925407..88e07e396a2a1 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.conversion.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.conversion.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.extents.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.extents.pass.cpp
index 52095691f6d24..89f6f6463a7ef 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.extents.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.extents.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_left.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_left.pass.cpp
index 1757ddb286b9c..a9e1bd2aa904c 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_left.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_left.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_stride.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_stride.pass.cpp
index 05b3349b7249a..40e866fc2f658 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_stride.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.ctor.layout_stride.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// ADDITIONAL_COMPILE_FLAGS: -Wno-ctad-maybe-unsupported
// FIXME: https://llvm.org/PR64719
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.index_operator.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.index_operator.pass.cpp
index 7fae6f87caf7c..8bf36186f3b2d 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.index_operator.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.index_operator.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.stride.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.stride.pass.cpp
index 8e3049c4736f0..7d7b99c879eee 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.stride.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_right/assert.stride.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp
index 7deb1215de0de..8ce017dee45d6 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// XFAIL: libcpp-hardening-mode=debug && target=powerpc{{.*}}le-unknown-linux-gnu
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.non_unique.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.non_unique.pass.cpp
index 97a6d56e4f839..9b7485a5a1310 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.non_unique.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.non_unique.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: !libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.pass.cpp
index 860849ded2de2..c5c6a7b066acb 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.non_unique.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.non_unique.pass.cpp
index ed2e475ccf022..30b3c893ad026 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.non_unique.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.non_unique.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: !libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.pass.cpp
index 70ab0616ec01b..4aa3ff868d144 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.index_operator.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.index_operator.pass.cpp
index b5244a60af0f7..b116dd2922a4e 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.index_operator.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.index_operator.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: !libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.stride.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.stride.pass.cpp
index ee2b731da203b..f9307044a2d13 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.stride.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.stride.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.conversion.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.conversion.pass.cpp
index 53aec7bb714ea..97c716cf58bd9 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.conversion.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.conversion.pass.cpp
@@ -4,10 +4,8 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.index_operator.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.index_operator.pass.cpp
index fa3429dc4c4ff..85c8fde5dd5db 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.index_operator.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.index_operator.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.size.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.size.pass.cpp
index 739da8ece81d7..4654e00cc80ed 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.size.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.size.pass.cpp
@@ -4,10 +4,8 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <mdspan>
diff --git a/libcxx/test/libcxx/containers/views/views.span/assert.iterator-indexing.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/assert.iterator-indexing.pass.cpp
index d4dacb1f2f1c7..f86a4250bbe5f 100644
--- a/libcxx/test/libcxx/containers/views/views.span/assert.iterator-indexing.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/assert.iterator-indexing.pass.cpp
@@ -5,12 +5,12 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// Make sure that std::span's iterators check for OOB accesses when the debug mode is enabled.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators
-// UNSUPPORTED: libcpp-hardening-mode=none
+// REQUIRES: libcpp-has-abi-bounded-iterators
#include <span>
diff --git a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_sent.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_sent.pass.cpp
index 64e3cc8750cd1..ce4480cdfa92e 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_sent.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_sent.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <span>
@@ -18,10 +19,6 @@
//
// Check that we ensure that `[it, sent)` is a valid range.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <array>
#include <span>
diff --git a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_size.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_size.pass.cpp
index c8c6e3743bd21..a65a7ea65881c 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_size.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_size.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <span>
@@ -15,10 +16,6 @@
// Note that it doesn't make sense to validate the incoming size in the
// dynamic_extent version.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <array>
#include <span>
diff --git a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.other_span.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.other_span.pass.cpp
index 9a4e65b0af903..ea3cb39e2b0d8 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.other_span.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.other_span.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <span>
@@ -13,10 +14,6 @@
//
// Check that we ensure `other.size() == Extent`.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <array>
#include <span>
diff --git a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.range.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.range.pass.cpp
index 5e36e9a0418ae..527a660cb1980 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.range.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.range.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <span>
@@ -13,10 +14,6 @@
//
// Check that we ensure `size(r) == Extent`.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <span>
#include <vector>
diff --git a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.back.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.back.pass.cpp
index 7e656b7f0b6e9..9282069b42119 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.back.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.back.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <span>
@@ -13,10 +14,6 @@
// Make sure that accessing a span out-of-bounds triggers an assertion.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <array>
#include <span>
diff --git a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.front.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.front.pass.cpp
index 0068aad8cc346..0ccdbb7696dd1 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.front.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.front.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <span>
@@ -13,10 +14,6 @@
// Make sure that accessing a span out-of-bounds triggers an assertion.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <array>
#include <span>
diff --git a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.op_idx.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.op_idx.pass.cpp
index 501067f740788..b582a92061954 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.op_idx.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.op_idx.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <span>
@@ -13,10 +14,6 @@
// Make sure that accessing a span out-of-bounds triggers an assertion.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <array>
#include <span>
diff --git a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.first.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.first.pass.cpp
index f241f2a5aadf2..3e13104c632cc 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.first.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.first.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <span>
@@ -13,10 +14,6 @@
// Make sure that creating a sub-span with an incorrect number of elements triggers an assertion.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <array>
#include <span>
diff --git a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.last.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.last.pass.cpp
index 032df689b1b88..d7550942f3382 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.last.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.last.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <span>
@@ -13,10 +14,6 @@
// Make sure that creating a sub-span with an incorrect number of elements triggers an assertion.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <array>
#include <span>
diff --git a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.subspan.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.subspan.pass.cpp
index 5dd0fa0530189..55758033442ec 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.subspan.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.subspan.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <span>
@@ -21,10 +22,6 @@
// Make sure that creating a sub-span with an incorrect number of elements triggers an assertion.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <array>
#include <span>
#include <cstddef>
diff --git a/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp
index 3ca97ae8e9a4f..d15f71166731e 100644
--- a/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp
+++ b/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: !libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <filesystem>
diff --git a/libcxx/test/libcxx/iterators/assert.advance.pass.cpp b/libcxx/test/libcxx/iterators/assert.advance.pass.cpp
index a7e8878b933b2..692aca1d511eb 100644
--- a/libcxx/test/libcxx/iterators/assert.advance.pass.cpp
+++ b/libcxx/test/libcxx/iterators/assert.advance.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
// <list>
diff --git a/libcxx/test/libcxx/iterators/assert.next.pass.cpp b/libcxx/test/libcxx/iterators/assert.next.pass.cpp
index 2e0296b72d124..b8fae3c326d86 100644
--- a/libcxx/test/libcxx/iterators/assert.next.pass.cpp
+++ b/libcxx/test/libcxx/iterators/assert.next.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
// <list>
diff --git a/libcxx/test/libcxx/iterators/assert.prev.pass.cpp b/libcxx/test/libcxx/iterators/assert.prev.pass.cpp
index deac1edf59e06..e6f6290cc2888 100644
--- a/libcxx/test/libcxx/iterators/assert.prev.pass.cpp
+++ b/libcxx/test/libcxx/iterators/assert.prev.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
// <list>
diff --git a/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp
index 7e3a59a49ffd4..7db62dbeb2fa8 100644
--- a/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp
+++ b/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp
@@ -11,10 +11,7 @@
//
// Dereference and indexing operators
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <__iterator/bounded_iter.h>
diff --git a/libcxx/test/libcxx/iterators/capacity_aware_iter/assert.pass.cpp b/libcxx/test/libcxx/iterators/capacity_aware_iter/assert.pass.cpp
index ceac20d549c34..d7e077360e26a 100644
--- a/libcxx/test/libcxx/iterators/capacity_aware_iter/assert.pass.cpp
+++ b/libcxx/test/libcxx/iterators/capacity_aware_iter/assert.pass.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// REQUIRES: std-at-least-c++26
-// UNSUPPORTED: libcpp-hardening-mode=none
+// REQUIRES: can-test-hardening-assertions-fast
// template <class _Iterator, class _Container, class _ContainerMaxElements>
// struct __capacity_aware_iterator;
diff --git a/libcxx/test/libcxx/iterators/predef.iterators/counted.iterator/assert.pass.cpp b/libcxx/test/libcxx/iterators/predef.iterators/counted.iterator/assert.pass.cpp
index 2fafe4727185d..7436ea7bd87fc 100644
--- a/libcxx/test/libcxx/iterators/predef.iterators/counted.iterator/assert.pass.cpp
+++ b/libcxx/test/libcxx/iterators/predef.iterators/counted.iterator/assert.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <iterator>
diff --git a/libcxx/test/libcxx/iterators/predef.iterators/iterators.common/assert.pass.cpp b/libcxx/test/libcxx/iterators/predef.iterators/iterators.common/assert.pass.cpp
index 01c0fb4048320..6d840c7a14651 100644
--- a/libcxx/test/libcxx/iterators/predef.iterators/iterators.common/assert.pass.cpp
+++ b/libcxx/test/libcxx/iterators/predef.iterators/iterators.common/assert.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <iterator>
diff --git a/libcxx/test/libcxx/mem/mem.res/ctor.nullptr.assert.pass.cpp b/libcxx/test/libcxx/mem/mem.res/ctor.nullptr.assert.pass.cpp
index 831985f2ce37f..c14eb85323183 100644
--- a/libcxx/test/libcxx/mem/mem.res/ctor.nullptr.assert.pass.cpp
+++ b/libcxx/test/libcxx/mem/mem.res/ctor.nullptr.assert.pass.cpp
@@ -10,10 +10,8 @@
// Test hardening assertions for std::pmr::polymorphic_allocator.
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// We're testing nullptr assertions
// ADDITIONAL_COMPILE_FLAGS: -Wno-nonnull
diff --git a/libcxx/test/libcxx/numerics/numarray/assert.pass.cpp b/libcxx/test/libcxx/numerics/numarray/assert.pass.cpp
index 2bdf52340abfc..a89e85f2612a5 100644
--- a/libcxx/test/libcxx/numerics/numarray/assert.pass.cpp
+++ b/libcxx/test/libcxx/numerics/numarray/assert.pass.cpp
@@ -10,10 +10,7 @@
// Test hardening assertions for std::valarray.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <valarray>
diff --git a/libcxx/test/libcxx/numerics/numarray/class.gslice.array/assert.get.pass.cpp b/libcxx/test/libcxx/numerics/numarray/class.gslice.array/assert.get.pass.cpp
index f883f87b05df0..e3610af9e2dcf 100644
--- a/libcxx/test/libcxx/numerics/numarray/class.gslice.array/assert.get.pass.cpp
+++ b/libcxx/test/libcxx/numerics/numarray/class.gslice.array/assert.get.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
// <valarray>
diff --git a/libcxx/test/libcxx/numerics/numarray/class.indirect.array/assert.get.pass.cpp b/libcxx/test/libcxx/numerics/numarray/class.indirect.array/assert.get.pass.cpp
index 8bf747e6aa7f6..cc709d8805e95 100644
--- a/libcxx/test/libcxx/numerics/numarray/class.indirect.array/assert.get.pass.cpp
+++ b/libcxx/test/libcxx/numerics/numarray/class.indirect.array/assert.get.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
// <valarray>
diff --git a/libcxx/test/libcxx/numerics/numarray/class.mask.array/assert.get.pass.cpp b/libcxx/test/libcxx/numerics/numarray/class.mask.array/assert.get.pass.cpp
index a2d284830c1a5..625cdda298538 100644
--- a/libcxx/test/libcxx/numerics/numarray/class.mask.array/assert.get.pass.cpp
+++ b/libcxx/test/libcxx/numerics/numarray/class.mask.array/assert.get.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
// <valarray>
diff --git a/libcxx/test/libcxx/numerics/numarray/class.slice.array/assert.get.pass.cpp b/libcxx/test/libcxx/numerics/numarray/class.slice.array/assert.get.pass.cpp
index 0dbad84486976..bf384c426126f 100644
--- a/libcxx/test/libcxx/numerics/numarray/class.slice.array/assert.get.pass.cpp
+++ b/libcxx/test/libcxx/numerics/numarray/class.slice.array/assert.get.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
// <valarray>
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.begin.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.begin.pass.cpp
index 57af366317091..1912bfff70cdb 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.begin.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.begin.pass.cpp
@@ -6,11 +6,9 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
// UNSUPPORTED: no-exceptions
-// UNSUPPORTED: !libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <ranges>
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.find-next.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.find-next.pass.cpp
index 1c91ee7198952..ed82c72c4b9fb 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.find-next.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.find-next.pass.cpp
@@ -6,11 +6,9 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
// UNSUPPORTED: no-exceptions
-// UNSUPPORTED: !libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <ranges>
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.find-prev.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.find-prev.pass.cpp
index 2605bf6dde074..4f43efab350f0 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.find-prev.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/assert.find-prev.pass.cpp
@@ -6,11 +6,9 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
// UNSUPPORTED: no-exceptions
-// UNSUPPORTED: !libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <ranges>
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/range.chunk.by.iter/assert.deref.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/range.chunk.by.iter/assert.deref.pass.cpp
index 8ed84ca8b56a1..550e79d0f869e 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/range.chunk.by.iter/assert.deref.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/range.chunk.by.iter/assert.deref.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: !libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <ranges>
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/range.chunk.by.iter/assert.increment.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/range.chunk.by.iter/assert.increment.pass.cpp
index 1a804b71b5e5e..d1e1584fa5d62 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/range.chunk.by.iter/assert.increment.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.chunk.by/range.chunk.by.iter/assert.increment.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: !libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <ranges>
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.concat/iterator.valueless_by_exception.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.concat/iterator.valueless_by_exception.pass.cpp
index 8e0ff79e16a27..6edcc4889a48c 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.concat/iterator.valueless_by_exception.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.concat/iterator.valueless_by_exception.pass.cpp
@@ -6,9 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
+// REQUIRES: can-test-hardening-assertions-extensive
// REQUIRES: std-at-least-c++26
-// UNSUPPORTED: libcpp-hardening-mode=none
#include <iostream>
#include <ranges>
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.drop.while/assert.begin.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.drop.while/assert.begin.pass.cpp
index 205cf40746207..1ed7c0cb3041d 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.drop.while/assert.begin.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.drop.while/assert.begin.pass.cpp
@@ -10,11 +10,9 @@
// Call begin() on drop_while_view with empty predicate
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-exceptions
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <ranges>
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/assert.equal.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/assert.equal.pass.cpp
index 22ede4143ffa4..5d047914299f0 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/assert.equal.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/assert.equal.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <ranges>
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/assert.equal.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/assert.equal.pass.cpp
index b6cbf5241f744..7b68fef4c3ccd 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/assert.equal.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/assert.equal.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <ranges>
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/ctor.assert.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/ctor.assert.pass.cpp
index e564891b15a15..8ed155dac34f8 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/ctor.assert.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/ctor.assert.pass.cpp
@@ -6,9 +6,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL:libcpp-hardening-mode=debug && availability-verbose_abort-missing
// constexpr explicit stride_view(_View, range_difference_t<_View>)
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/dereference.assert.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/dereference.assert.pass.cpp
index 6884c27f5197c..8e0dfe905d7f0 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/dereference.assert.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/dereference.assert.pass.cpp
@@ -6,9 +6,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// REQUIRES: libcpp-hardening-mode={{fast|extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// constexpr decltype(auto) operator*() const
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/increment.assert.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/increment.assert.pass.cpp
index 1c580fea4a310..e600c0bf93a5a 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/increment.assert.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/increment.assert.pass.cpp
@@ -6,9 +6,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// REQUIRES: libcpp-hardening-mode={{fast|extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// constexpr __iterator& operator++()
// constexpr void operator++(int)
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/operator_plus_equal.assert.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/operator_plus_equal.assert.pass.cpp
index 0a84436444cd5..4dfd268874a18 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/operator_plus_equal.assert.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.stride.view/iterator/operator_plus_equal.assert.pass.cpp
@@ -6,9 +6,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// REQUIRES: libcpp-hardening-mode={{fast|extensive|debug}}
-// XFAIL:libcpp-hardening-mode=debug && availability-verbose_abort-missing
// constexpr __iterator& operator+=(difference_type __n)
diff --git a/libcxx/test/libcxx/ranges/range.factories/range.repeat.view/ctor.piecewise.pass.cpp b/libcxx/test/libcxx/ranges/range.factories/range.repeat.view/ctor.piecewise.pass.cpp
index 6d4e541d98906..0bed88c342a77 100644
--- a/libcxx/test/libcxx/ranges/range.factories/range.repeat.view/ctor.piecewise.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.factories/range.repeat.view/ctor.piecewise.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// REQUIRES: has-unix-headers
-// XFAIL: availability-verbose_abort-missing
// template<class... TArgs, class... BoundArgs>
// requires constructible_from<T, TArgs...> &&
diff --git a/libcxx/test/libcxx/ranges/range.factories/range.repeat.view/ctor.value.bound.pass.cpp b/libcxx/test/libcxx/ranges/range.factories/range.repeat.view/ctor.value.bound.pass.cpp
index 2e9c74bc35978..9371892e16a42 100644
--- a/libcxx/test/libcxx/ranges/range.factories/range.repeat.view/ctor.value.bound.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.factories/range.repeat.view/ctor.value.bound.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// REQUIRES: has-unix-headers
-// XFAIL: availability-verbose_abort-missing
// constexpr explicit repeat_view(W&& value, Bound bound = Bound());
// constexpr explicit repeat_view(const W& value, Bound bound = Bound());
diff --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp
index 36a485a1e4d00..5e3f8545b565b 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp
@@ -10,10 +10,7 @@
// Call back() on empty container.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <string>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cback.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cback.pass.cpp
index d810acd67e7e7..36969a99b79fb 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cback.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cback.pass.cpp
@@ -10,10 +10,7 @@
// Call back() on empty const container.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <string>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cfront.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cfront.pass.cpp
index 12e7ef3328b04..d1673fa765e7b 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cfront.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cfront.pass.cpp
@@ -10,10 +10,7 @@
// Call front() on empty const container.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <string>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cindex.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cindex.pass.cpp
index 3983352712963..22705d483bd98 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cindex.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cindex.pass.cpp
@@ -10,10 +10,7 @@
// Index const string out of bounds.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <string>
#include <cassert>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.front.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.front.pass.cpp
index 24df3fcad0c5c..950cba5820cd7 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.front.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.front.pass.cpp
@@ -10,10 +10,7 @@
// Call front() on empty container.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <string>
#include <cassert>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.index.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.index.pass.cpp
index d26997d8d24c2..b8b1be075b186 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.index.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.index.pass.cpp
@@ -10,10 +10,7 @@
// Index string out of bounds.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <string>
#include <cassert>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.add.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.add.pass.cpp
index 56c9d63d0dbaf..5bfb376bcacf0 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.add.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.add.pass.cpp
@@ -10,8 +10,8 @@
// Add to iterator out of bounds.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators-in-string
-// UNSUPPORTED: libcpp-hardening-mode=none, c++03
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators-in-string
#include <string>
#include <cassert>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.decrement.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.decrement.pass.cpp
index 43a9739bf936f..447105f04a255 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.decrement.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.decrement.pass.cpp
@@ -10,8 +10,8 @@
// Decrement iterator prior to begin.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators-in-string
-// UNSUPPORTED: libcpp-hardening-mode=none, c++03
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators-in-string
#include <string>
#include <cassert>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.dereference.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.dereference.pass.cpp
index e2326be021033..f0fce12580664 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.dereference.pass.cpp
@@ -10,8 +10,8 @@
// Dereference non-dereferenceable iterator.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators-in-string
-// UNSUPPORTED: libcpp-hardening-mode=none, c++03
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators-in-string
#include <string>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.increment.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.increment.pass.cpp
index a7453f3115197..5ba020b87d2c1 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.increment.pass.cpp
@@ -10,8 +10,8 @@
// Increment iterator past end.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators-in-string
-// UNSUPPORTED: libcpp-hardening-mode=none, c++03
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators-in-string
#include <string>
#include <cassert>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.index.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.index.pass.cpp
index e7d384413b589..9688edc9bdcbf 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.index.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/assert.iterator.index.pass.cpp
@@ -10,8 +10,8 @@
// Index iterator out of bounds.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators-in-string
-// UNSUPPORTED: libcpp-hardening-mode=none, c++03
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators-in-string
#include <string>
#include <cassert>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.append.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.append.pass.cpp
index c3745ca0a762d..13add1ee6483a 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.append.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.append.pass.cpp
@@ -12,11 +12,8 @@
// basic_string& append(const value_type* s);
// basic_string& append(const value_type* s, size_type pos, size_type n);
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode={{none|fast}}
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: libcpp-assertion-semantic={{ignore|observe}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <string>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.assign.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.assign.pass.cpp
index 80abd15929735..75717d200e49b 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.assign.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.assign.pass.cpp
@@ -12,11 +12,8 @@
// basic_string& assign(const value_type* s);
// basic_string& assign(const value_type* s, size_type pos, size_type n);
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode={{none|fast}}
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: libcpp-assertion-semantic={{ignore|observe}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <string>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.erase_iter.null.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.erase_iter.null.pass.cpp
index 036e75965c488..161f9cf7be52d 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.erase_iter.null.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.erase_iter.null.pass.cpp
@@ -10,10 +10,7 @@
// Call erase(const_iterator position) with end()
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <string>
diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.pop_back.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.pop_back.pass.cpp
index 54c011c4d54a0..b7863b990227a 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.pop_back.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.pop_back.pass.cpp
@@ -10,10 +10,7 @@
// void pop_back();
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <string>
diff --git a/libcxx/test/libcxx/strings/string.view/assert.ctor.length.pass.cpp b/libcxx/test/libcxx/strings/string.view/assert.ctor.length.pass.cpp
index e47b5f5963109..df898cefa6b38 100644
--- a/libcxx/test/libcxx/strings/string.view/assert.ctor.length.pass.cpp
+++ b/libcxx/test/libcxx/strings/string.view/assert.ctor.length.pass.cpp
@@ -6,11 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++11 && gcc
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// Construct a string_view from an invalid length
// constexpr basic_string_view( const _CharT* s, size_type len )
diff --git a/libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp b/libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp
index f358b5efd0df2..23e73006265ab 100644
--- a/libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp
+++ b/libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// Construct a string_view from a null pointer
// constexpr basic_string_view( const CharT* s );
diff --git a/libcxx/test/libcxx/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp b/libcxx/test/libcxx/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp
index 5043a88cbc3da..c0b1c5073e63f 100644
--- a/libcxx/test/libcxx/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp
+++ b/libcxx/test/libcxx/strings/string.view/string.view.iterators/assert.iterator-indexing.pass.cpp
@@ -8,8 +8,8 @@
// Make sure that std::string_view's iterators check for OOB accesses when the debug mode is enabled.
-// REQUIRES: has-unix-headers, libcpp-has-abi-bounded-iterators
-// UNSUPPORTED: libcpp-hardening-mode=none
+// REQUIRES: can-test-hardening-assertions-fast
+// REQUIRES: libcpp-has-abi-bounded-iterators
#include <iterator>
#include <string_view>
diff --git a/libcxx/test/libcxx/text/text_encoding/text_encoding.ctor/assert.id.pass.cpp b/libcxx/test/libcxx/text/text_encoding/text_encoding.ctor/assert.id.pass.cpp
index f23629d5020ab..c182d17b18d34 100644
--- a/libcxx/test/libcxx/text/text_encoding/text_encoding.ctor/assert.id.pass.cpp
+++ b/libcxx/test/libcxx/text/text_encoding/text_encoding.ctor/assert.id.pass.cpp
@@ -6,9 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// REQUIRES: std-at-least-c++26
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
// <text_encoding>
diff --git a/libcxx/test/libcxx/text/text_encoding/text_encoding.ctor/assert.string_view.pass.cpp b/libcxx/test/libcxx/text/text_encoding/text_encoding.ctor/assert.string_view.pass.cpp
index ddeef710c62f4..5cd04b81148a8 100644
--- a/libcxx/test/libcxx/text/text_encoding/text_encoding.ctor/assert.string_view.pass.cpp
+++ b/libcxx/test/libcxx/text/text_encoding/text_encoding.ctor/assert.string_view.pass.cpp
@@ -6,9 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// REQUIRES: std-at-least-c++26
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
// <text_encoding>
diff --git a/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception.pass.cpp b/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception.pass.cpp
index 6d5eb5ef9931f..e9f66e79febd5 100644
--- a/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception.pass.cpp
+++ b/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, no-threads
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
+// UNSUPPORTED: no-threads
// <future>
diff --git a/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception_at_thread_exit.pass.cpp b/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception_at_thread_exit.pass.cpp
index 1bffde5e3ebd1..6a698b2a3b848 100644
--- a/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception_at_thread_exit.pass.cpp
+++ b/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception_at_thread_exit.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, no-threads
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
+// UNSUPPORTED: no-threads
// <future>
diff --git a/libcxx/test/libcxx/thread/thread.barrier/assert.arrive.pass.cpp b/libcxx/test/libcxx/thread/thread.barrier/assert.arrive.pass.cpp
index 2bc4648878f8e..4c4f439a10080 100644
--- a/libcxx/test/libcxx/thread/thread.barrier/assert.arrive.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.barrier/assert.arrive.pass.cpp
@@ -6,15 +6,11 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: no-threads
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
// Without the assertion, the test will most likely time out.
// UNSUPPORTED: libcpp-assertion-semantic={{ignore|observe}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
-// REQUIRES: has-unix-headers
-
// <barrier>
// class barrier;
diff --git a/libcxx/test/libcxx/thread/thread.barrier/assert.ctor.pass.cpp b/libcxx/test/libcxx/thread/thread.barrier/assert.ctor.pass.cpp
index 0b4fb1d675eaa..cb8c60a0e3637 100644
--- a/libcxx/test/libcxx/thread/thread.barrier/assert.ctor.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.barrier/assert.ctor.pass.cpp
@@ -6,12 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: no-threads
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
-// REQUIRES: has-unix-headers
// <barrier>
diff --git a/libcxx/test/libcxx/thread/thread.latch/assert.arrive_and_wait.pass.cpp b/libcxx/test/libcxx/thread/thread.latch/assert.arrive_and_wait.pass.cpp
index 30d36b5f6d7b5..a3ab5b2f6d89d 100644
--- a/libcxx/test/libcxx/thread/thread.latch/assert.arrive_and_wait.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.latch/assert.arrive_and_wait.pass.cpp
@@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: no-threads
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <latch>
@@ -16,11 +17,8 @@
// Make sure that calling arrive_and_wait with a negative value triggers an assertion.
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
// Without the assertion, the test will most likely time out.
// UNSUPPORTED: libcpp-assertion-semantic={{ignore|observe}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <latch>
diff --git a/libcxx/test/libcxx/thread/thread.latch/assert.count_down.pass.cpp b/libcxx/test/libcxx/thread/thread.latch/assert.count_down.pass.cpp
index 6220cba02af19..3660287cd0ae1 100644
--- a/libcxx/test/libcxx/thread/thread.latch/assert.count_down.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.latch/assert.count_down.pass.cpp
@@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: no-threads
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <latch>
@@ -17,10 +18,6 @@
// Make sure that calling count_down with a negative value or a value
// higher than the internal counter triggers an assertion.
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <latch>
#include "check_assertion.h"
diff --git a/libcxx/test/libcxx/thread/thread.latch/assert.ctor.pass.cpp b/libcxx/test/libcxx/thread/thread.latch/assert.ctor.pass.cpp
index 5f1ea19d82a50..d5f72105c3c98 100644
--- a/libcxx/test/libcxx/thread/thread.latch/assert.ctor.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.latch/assert.ctor.pass.cpp
@@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: no-threads
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
// <latch>
@@ -16,10 +17,6 @@
// Make sure that calling latch with a negative value triggers an assertion
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
#include <latch>
#include "check_assertion.h"
diff --git a/libcxx/test/libcxx/thread/thread.semaphore/assert.ctor.pass.cpp b/libcxx/test/libcxx/thread/thread.semaphore/assert.ctor.pass.cpp
index 1e33add779496..c5d7c0222f34f 100644
--- a/libcxx/test/libcxx/thread/thread.semaphore/assert.ctor.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.semaphore/assert.ctor.pass.cpp
@@ -6,12 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: no-threads
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
-// REQUIRES: has-unix-headers
// <semaphore>
diff --git a/libcxx/test/libcxx/thread/thread.semaphore/assert.release.pass.cpp b/libcxx/test/libcxx/thread/thread.semaphore/assert.release.pass.cpp
index a5a01a3847878..912a3d08e0d80 100644
--- a/libcxx/test/libcxx/thread/thread.semaphore/assert.release.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.semaphore/assert.release.pass.cpp
@@ -6,12 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: no-threads
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
-// REQUIRES: has-unix-headers
// <semaphore>
diff --git a/libcxx/test/libcxx/time/time.clock/time.clock.gps/time.clock.gps.members/assert.from_utc.pass.cpp b/libcxx/test/libcxx/time/time.clock/time.clock.gps/time.clock.gps.members/assert.from_utc.pass.cpp
index d8200439d9737..34d1dec5c1138 100644
--- a/libcxx/test/libcxx/time/time.clock/time.clock.gps/time.clock.gps.members/assert.from_utc.pass.cpp
+++ b/libcxx/test/libcxx/time/time.clock/time.clock.gps/time.clock.gps.members/assert.from_utc.pass.cpp
@@ -7,15 +7,12 @@
//===----------------------------------------------------------------------===//
// REQUIRES: std-at-least-c++20
-// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
+// REQUIRES: can-test-hardening-assertions-extensive
+// UNSUPPORTED: no-filesystem, no-tzdb
// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// REQUIRES: has-unix-headers
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
// <chrono>
//
// class gps_clock;
diff --git a/libcxx/test/libcxx/time/time.clock/time.clock.gps/time.clock.gps.members/assert.to_utc.pass.cpp b/libcxx/test/libcxx/time/time.clock/time.clock.gps/time.clock.gps.members/assert.to_utc.pass.cpp
index d61b3374f661f..486f58914a84b 100644
--- a/libcxx/test/libcxx/time/time.clock/time.clock.gps/time.clock.gps.members/assert.to_utc.pass.cpp
+++ b/libcxx/test/libcxx/time/time.clock/time.clock.gps/time.clock.gps.members/assert.to_utc.pass.cpp
@@ -7,15 +7,12 @@
//===----------------------------------------------------------------------===//
// REQUIRES: std-at-least-c++20
-// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
+// REQUIRES: can-test-hardening-assertions-extensive
+// UNSUPPORTED: no-filesystem, no-tzdb
// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// REQUIRES: has-unix-headers
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
// <chrono>
//
// class gps_clock;
diff --git a/libcxx/test/libcxx/time/time.clock/time.clock.tai/time.clock.tai.members/assert.from_utc.pass.cpp b/libcxx/test/libcxx/time/time.clock/time.clock.tai/time.clock.tai.members/assert.from_utc.pass.cpp
index f04595ce34ceb..9678deedbbaba 100644
--- a/libcxx/test/libcxx/time/time.clock/time.clock.tai/time.clock.tai.members/assert.from_utc.pass.cpp
+++ b/libcxx/test/libcxx/time/time.clock/time.clock.tai/time.clock.tai.members/assert.from_utc.pass.cpp
@@ -7,15 +7,12 @@
//===----------------------------------------------------------------------===//
// REQUIRES: std-at-least-c++20
-// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
+// REQUIRES: can-test-hardening-assertions-extensive
+// UNSUPPORTED: no-filesystem, no-tzdb
// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// REQUIRES: has-unix-headers
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
// <chrono>
//
// class tai_clock;
diff --git a/libcxx/test/libcxx/time/time.clock/time.clock.tai/time.clock.tai.members/assert.to_utc.pass.cpp b/libcxx/test/libcxx/time/time.clock/time.clock.tai/time.clock.tai.members/assert.to_utc.pass.cpp
index 624c6c4bce4ca..24cba55a06e2d 100644
--- a/libcxx/test/libcxx/time/time.clock/time.clock.tai/time.clock.tai.members/assert.to_utc.pass.cpp
+++ b/libcxx/test/libcxx/time/time.clock/time.clock.tai/time.clock.tai.members/assert.to_utc.pass.cpp
@@ -7,15 +7,12 @@
//===----------------------------------------------------------------------===//
// REQUIRES: std-at-least-c++20
-// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
+// REQUIRES: can-test-hardening-assertions-extensive
+// UNSUPPORTED: no-filesystem, no-tzdb
// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// REQUIRES: has-unix-headers
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
// <chrono>
//
// class tai_clock;
diff --git a/libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.ambig/assert.ctor.pass.cpp b/libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.ambig/assert.ctor.pass.cpp
index ee2370f5bce25..7a31e689ec743 100644
--- a/libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.ambig/assert.ctor.pass.cpp
+++ b/libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.ambig/assert.ctor.pass.cpp
@@ -6,12 +6,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
-
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// UNSUPPORTED: no-filesystem, no-tzdb
// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing
diff --git a/libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.nonexist/assert.ctor.pass.cpp b/libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.nonexist/assert.ctor.pass.cpp
index 5d896c34e4ccd..3bffe11481c2b 100644
--- a/libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.nonexist/assert.ctor.pass.cpp
+++ b/libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.nonexist/assert.ctor.pass.cpp
@@ -6,12 +6,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
-
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// UNSUPPORTED: no-filesystem, no-tzdb
// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing
diff --git a/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_local.pass.cpp b/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_local.pass.cpp
index eb0ae4cf4b187..e85d8a18e3bec 100644
--- a/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_local.pass.cpp
+++ b/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_local.pass.cpp
@@ -6,12 +6,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
-
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// UNSUPPORTED: no-filesystem, no-tzdb
// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing
diff --git a/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys.pass.cpp b/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys.pass.cpp
index 57b7f8d0f30a0..2f835cfb84dbf 100644
--- a/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys.pass.cpp
+++ b/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys.pass.cpp
@@ -6,12 +6,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
-
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// UNSUPPORTED: no-filesystem, no-tzdb
// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing
diff --git a/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys_choose.pass.cpp b/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys_choose.pass.cpp
index 85ce6019fcd55..8a358856f6a39 100644
--- a/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys_choose.pass.cpp
+++ b/libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys_choose.pass.cpp
@@ -6,12 +6,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
-
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// UNSUPPORTED: no-filesystem, no-tzdb
// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing
diff --git a/libcxx/test/libcxx/utilities/assert.exception_guard.no_exceptions.pass.cpp b/libcxx/test/libcxx/utilities/assert.exception_guard.no_exceptions.pass.cpp
index c6ddb8bd252a4..128edc3600348 100644
--- a/libcxx/test/libcxx/utilities/assert.exception_guard.no_exceptions.pass.cpp
+++ b/libcxx/test/libcxx/utilities/assert.exception_guard.no_exceptions.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode=debug
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-debug
// ADDITIONAL_COMPILE_FLAGS: -fno-exceptions
#include <__utility/exception_guard.h>
diff --git a/libcxx/test/libcxx/utilities/expected/expected.expected/assert.arrow.pass.cpp b/libcxx/test/libcxx/utilities/expected/expected.expected/assert.arrow.pass.cpp
index 47481bcbef8a8..1fcc9901e2a6d 100644
--- a/libcxx/test/libcxx/utilities/expected/expected.expected/assert.arrow.pass.cpp
+++ b/libcxx/test/libcxx/utilities/expected/expected.expected/assert.arrow.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// constexpr const T* operator->() const noexcept;
// constexpr T* operator->() noexcept;
diff --git a/libcxx/test/libcxx/utilities/expected/expected.expected/assert.deref.pass.cpp b/libcxx/test/libcxx/utilities/expected/expected.expected/assert.deref.pass.cpp
index 5ab43d38ccb15..f04b3c8473930 100644
--- a/libcxx/test/libcxx/utilities/expected/expected.expected/assert.deref.pass.cpp
+++ b/libcxx/test/libcxx/utilities/expected/expected.expected/assert.deref.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// constexpr const T& operator*() const & noexcept;
// constexpr T& operator*() & noexcept;
diff --git a/libcxx/test/libcxx/utilities/expected/expected.expected/assert.error.pass.cpp b/libcxx/test/libcxx/utilities/expected/expected.expected/assert.error.pass.cpp
index 92bf305994c18..61be7893d6c2a 100644
--- a/libcxx/test/libcxx/utilities/expected/expected.expected/assert.error.pass.cpp
+++ b/libcxx/test/libcxx/utilities/expected/expected.expected/assert.error.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// constexpr const E& error() const & noexcept;
// constexpr E& error() & noexcept;
diff --git a/libcxx/test/libcxx/utilities/expected/expected.void/assert.deref.pass.cpp b/libcxx/test/libcxx/utilities/expected/expected.void/assert.deref.pass.cpp
index 6f1ba075b3245..77a4947b8c1ec 100644
--- a/libcxx/test/libcxx/utilities/expected/expected.void/assert.deref.pass.cpp
+++ b/libcxx/test/libcxx/utilities/expected/expected.void/assert.deref.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// constexpr void operator*() const noexcept;
//
diff --git a/libcxx/test/libcxx/utilities/expected/expected.void/assert.error.pass.cpp b/libcxx/test/libcxx/utilities/expected/expected.void/assert.error.pass.cpp
index a1c92ff85f33a..891abeb070ccd 100644
--- a/libcxx/test/libcxx/utilities/expected/expected.void/assert.error.pass.cpp
+++ b/libcxx/test/libcxx/utilities/expected/expected.void/assert.error.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// constexpr const E& error() const & noexcept;
// constexpr E& error() & noexcept;
diff --git a/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/assert.array.pass.cpp b/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/assert.array.pass.cpp
index 1e9b1d93eb06f..83006b37d32a0 100644
--- a/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/assert.array.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/assert.array.pass.cpp
@@ -10,8 +10,8 @@
// Formatting non-null-terminated character arrays.
-// REQUIRES: std-at-least-c++20, has-unix-headers, libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
+// REQUIRES: std-at-least-c++20
#include <format>
diff --git a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.ref/func.wrap.ref.ctor/assert.constant_arg_ptr.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.ref/func.wrap.ref.ctor/assert.constant_arg_ptr.pass.cpp
index 9703de0a59c2c..fc9c2dfa01f49 100644
--- a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.ref/func.wrap.ref.ctor/assert.constant_arg_ptr.pass.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.ref/func.wrap.ref.ctor/assert.constant_arg_ptr.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// REQUIRES: std-at-least-c++26
-// UNSUPPORTED: libcpp-hardening-mode=none || libcpp-hardening-mode=fast
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// template<auto f, class T>
// constexpr function_ref(constant_wrapper<f>, cv T* obj) noexcept;
diff --git a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.ref/func.wrap.ref.ctor/assert.function_ptr.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.ref/func.wrap.ref.ctor/assert.function_ptr.pass.cpp
index e69776d0e3c90..25bc24c157529 100644
--- a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.ref/func.wrap.ref.ctor/assert.function_ptr.pass.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.ref/func.wrap.ref.ctor/assert.function_ptr.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// REQUIRES: std-at-least-c++26
-// UNSUPPORTED: libcpp-hardening-mode=none || libcpp-hardening-mode=fast
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// template<class F> function_ref(F* f) noexcept;
// Preconditions: f is not a null pointer.
diff --git a/libcxx/test/libcxx/utilities/optional/optional.iterator/assert.arithmetic.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.iterator/assert.arithmetic.pass.cpp
index cd73d67b39038..fe348a12962ba 100644
--- a/libcxx/test/libcxx/utilities/optional/optional.iterator/assert.arithmetic.pass.cpp
+++ b/libcxx/test/libcxx/utilities/optional/optional.iterator/assert.arithmetic.pass.cpp
@@ -11,7 +11,8 @@
// Add to iterator out of bounds.
// REQUIRES: std-at-least-c++26
-// UNSUPPORTED: libcpp-hardening-mode=none, libcpp-has-abi-bounded-iterators-in-optional
+// REQUIRES: can-test-hardening-assertions-fast
+// UNSUPPORTED: libcpp-has-abi-bounded-iterators-in-optional
#include <optional>
diff --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.iterator/assert.bounded_iterator.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.iterator/assert.bounded_iterator.pass.cpp
index 393b9e5f06476..a7aecabd75a01 100644
--- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.iterator/assert.bounded_iterator.pass.cpp
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.iterator/assert.bounded_iterator.pass.cpp
@@ -9,7 +9,7 @@
// <optional>
// REQUIRES: std-at-least-c++26, libcpp-has-abi-bounded-iterators-in-optional
-// UNSUPPORTED: libcpp-hardening-mode=none
+// REQUIRES: can-test-hardening-assertions-fast
// Test that an assertion fires for invalid uses of the following operators on a bounded iterator:
diff --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.dereference.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.dereference.pass.cpp
index 31938b3f8fbaa..29e5cf74d7f8d 100644
--- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.dereference.pass.cpp
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.dereference.pass.cpp
@@ -13,10 +13,8 @@
// constexpr const T& optional<T>::operator*() const &;
// constexpr T&& optional<T>::operator*() const &&;
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <optional>
diff --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.op_arrow.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.op_arrow.pass.cpp
index 52009628327db..f33b7c51fe5a8 100644
--- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.op_arrow.pass.cpp
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.op_arrow.pass.cpp
@@ -11,10 +11,8 @@
// constexpr T* optional<T>::operator->();
// constexpr const T* optional<T>::operator->() const;
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <optional>
diff --git a/libcxx/test/libcxx/utilities/template.bitset/assert.pass.cpp b/libcxx/test/libcxx/utilities/template.bitset/assert.pass.cpp
index 4019bdf1318eb..8f2fbc735f3bc 100644
--- a/libcxx/test/libcxx/utilities/template.bitset/assert.pass.cpp
+++ b/libcxx/test/libcxx/utilities/template.bitset/assert.pass.cpp
@@ -10,10 +10,7 @@
// Test hardening assertions for std::bitset.
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// UNSUPPORTED: c++03
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
#include <bitset>
diff --git a/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/assert.deallocate.pass.cpp b/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/assert.deallocate.pass.cpp
index 5a9813a232b85..6e5e5095df704 100644
--- a/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/assert.deallocate.pass.cpp
+++ b/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/assert.deallocate.pass.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14
-// REQUIRES: has-unix-headers, libcpp-hardening-mode=debug
// <memory_resource>
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/assert.ranges_clamp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/assert.ranges_clamp.pass.cpp
index 07e56e73b6f34..b90fbe2043979 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/assert.ranges_clamp.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/assert.ranges_clamp.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: availability-verbose_abort-missing
// <algorithm>
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.pop_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.pop_heap.pass.cpp
index b6b6babafba1b..a6133040ae346 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.pop_heap.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.pop_heap.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
// <algorithm>
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.ranges_pop_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.ranges_pop_heap.pass.cpp
index ba55c14bf5590..768212cefae60 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.ranges_pop_heap.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.ranges_pop_heap.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: availability-verbose_abort-missing
// <algorithm>
diff --git a/libcxx/test/std/containers/sequences/array/assert.back.pass.cpp b/libcxx/test/std/containers/sequences/array/assert.back.pass.cpp
index b9dec01033334..bd8cf745681c2 100644
--- a/libcxx/test/std/containers/sequences/array/assert.back.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/assert.back.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
// test that array<T, 0>::back() triggers an assertion
diff --git a/libcxx/test/std/containers/sequences/array/assert.front.pass.cpp b/libcxx/test/std/containers/sequences/array/assert.front.pass.cpp
index 67a70a1d63c52..d5c02e827914d 100644
--- a/libcxx/test/std/containers/sequences/array/assert.front.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/assert.front.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
// test that array<T, 0>::front() triggers an assertion
diff --git a/libcxx/test/std/containers/sequences/array/assert.indexing.pass.cpp b/libcxx/test/std/containers/sequences/array/assert.indexing.pass.cpp
index ea0ffce3b3007..ee3a391e20dad 100644
--- a/libcxx/test/std/containers/sequences/array/assert.indexing.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/assert.indexing.pass.cpp
@@ -6,10 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
// <array>
diff --git a/libcxx/test/std/containers/sequences/array/assert.iterators.pass.cpp b/libcxx/test/std/containers/sequences/array/assert.iterators.pass.cpp
index 85e2df1eba981..f9f9091fcd83c 100644
--- a/libcxx/test/std/containers/sequences/array/assert.iterators.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/assert.iterators.pass.cpp
@@ -6,11 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// REQUIRES: libcpp-has-abi-bounded-iterators-in-std-array
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <array>
diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/assert.push_back.invalidation.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/assert.push_back.invalidation.pass.cpp
index 4a899139d5f68..6446211369471 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/assert.push_back.invalidation.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/assert.push_back.invalidation.pass.cpp
@@ -14,11 +14,8 @@
// the insertion point remain valid but those at or after the insertion point,
// including the past-the-end iterator, are invalidated.
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// REQUIRES: libcpp-has-abi-bounded-iterators-in-vector
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
#include <vector>
#include <cassert>
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/native_handle.assert.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/native_handle.assert.pass.cpp
index 9e4d88642d49e..47c96137bc0b0 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/native_handle.assert.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/native_handle.assert.pass.cpp
@@ -6,12 +6,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: availability-verbose_abort-missing
-
// <fstream>
// class basic_filebuf;
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/native_handle.assert.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/native_handle.assert.pass.cpp
index 8fd37f68fc97a..201af69d49afc 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/native_handle.assert.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/native_handle.assert.pass.cpp
@@ -6,12 +6,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: availability-verbose_abort-missing
-
// <fstream>
// class basic_fstream;
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/native_handle.assert.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/native_handle.assert.pass.cpp
index c17b778c4afad..c4c479bd8dfce 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/native_handle.assert.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/native_handle.assert.pass.cpp
@@ -6,12 +6,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: availability-verbose_abort-missing
-
// <fstream>
// class basic_ifstream;
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/native_handle.assert.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/native_handle.assert.pass.cpp
index 243be70ec9452..f6b3f5045f000 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/native_handle.assert.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/native_handle.assert.pass.cpp
@@ -6,12 +6,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-extensive
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: availability-verbose_abort-missing
-
// <fstream>
// class basic_ofstream;
diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.assert.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.assert.pass.cpp
index 7d1cc8acf7266..c488a3679d804 100644
--- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.assert.pass.cpp
+++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.get.area/setg.assert.pass.cpp
@@ -6,9 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
// <streambuf>
diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.assert.pass.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.assert.pass.cpp
index e0cd6438d2b44..e3cb6641210b7 100644
--- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.assert.pass.cpp
+++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/setp.assert.pass.cpp
@@ -6,9 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-fast
// <streambuf>
diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturating_div.assert.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturating_div.assert.pass.cpp
index 79cbd8124b2de..9e0a79f6f5295 100644
--- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturating_div.assert.pass.cpp
+++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturating_div.assert.pass.cpp
@@ -8,9 +8,7 @@
// REQUIRES: std-at-least-c++26
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// XFAIL: availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
// <numeric>
diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/assert.ctor.value.bound.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/assert.ctor.value.bound.pass.cpp
index da21a32bf8298..5f1169575a915 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/assert.ctor.value.bound.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/assert.ctor.value.bound.pass.cpp
@@ -6,12 +6,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
-
// Test the precondition check in iota_view(value, bound) that `bound` is reachable from `value`.
#include <ranges>
diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp
index 43c89a84663e7..3f656bcd8fb88 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-hardening-mode=none
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
// <memory>
//
diff --git a/libcxx/test/std/utilities/utility/utility.unreachable/assert.unreachable.pass.cpp b/libcxx/test/std/utilities/utility/utility.unreachable/assert.unreachable.pass.cpp
index f95b83ff4eb3c..76665c8e3b44d 100644
--- a/libcxx/test/std/utilities/utility/utility.unreachable/assert.unreachable.pass.cpp
+++ b/libcxx/test/std/utilities/utility/utility.unreachable/assert.unreachable.pass.cpp
@@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
+// REQUIRES: can-test-hardening-assertions-debug
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// REQUIRES: libcpp-hardening-mode=debug
-// XFAIL: availability-verbose_abort-missing
// Make sure that reaching std::unreachable() with assertions enabled triggers an assertion.
diff --git a/libcxx/test/support/test.support/test_check_assertion.pass.cpp b/libcxx/test/support/test.support/test_check_assertion.pass.cpp
index 9d356ef30a501..9d0f847dee6b5 100644
--- a/libcxx/test/support/test.support/test_check_assertion.pass.cpp
+++ b/libcxx/test/support/test.support/test_check_assertion.pass.cpp
@@ -6,9 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03
-// UNSUPPORTED: libcpp-hardening-mode=none
+// REQUIRES: can-test-hardening-assertions-fast
// XFAIL: availability-verbose_abort-missing
#include <cassert>
diff --git a/libcxx/utils/libcxx/test/features/__init__.py b/libcxx/utils/libcxx/test/features/__init__.py
index 5c0d1f3aaafc6..8e9bc0e97b2d6 100644
--- a/libcxx/utils/libcxx/test/features/__init__.py
+++ b/libcxx/utils/libcxx/test/features/__init__.py
@@ -6,7 +6,7 @@
#
# ===----------------------------------------------------------------------===##
-from . import availability, compiler, gdb, libcxx_macros, localization, misc, platform
+from . import availability, compiler, gdb, hardening, libcxx_macros, localization, misc, platform
# Lit features are evaluated in order. Some features depend on other features, so
# we are careful to define them in the correct order. For example, several features
@@ -19,3 +19,4 @@
DEFAULT_FEATURES += gdb.features
DEFAULT_FEATURES += misc.features
DEFAULT_FEATURES += availability.features
+DEFAULT_FEATURES += hardening.features # this depends on availability, misc and libc++ macro features
diff --git a/libcxx/utils/libcxx/test/features/hardening.py b/libcxx/utils/libcxx/test/features/hardening.py
new file mode 100644
index 0000000000000..dadf1a2c547f9
--- /dev/null
+++ b/libcxx/utils/libcxx/test/features/hardening.py
@@ -0,0 +1,113 @@
+# ===----------------------------------------------------------------------===##
+#
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+#
+# ===----------------------------------------------------------------------===##
+
+from libcxx.test.dsl import Feature, programSucceeds
+from lit.BooleanExpression import BooleanExpression
+
+features = []
+
+# Detect the hardening mode that the tests are being compiled with as `libcpp-hardening-mode=<mode>`.
+#
+# Note that this is the mode in effect when compiling the tests, which is not necessarily the mode
+# the library was configured with, since it can be overridden with compiler flags.
+for mode in ("none", "fast", "extensive", "debug"):
+ check_program = f"""
+ #include <stddef.h> // any header to get the definitions
+ int main(int, char**) {{
+ #if defined(_LIBCPP_VERSION) && \\
+ defined(_LIBCPP_HARDENING_MODE) && _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_{mode.upper()}
+ return 0;
+ #else
+ return 1;
+ #endif
+ }}
+ """
+ features.append(
+ Feature(
+ name=f"libcpp-hardening-mode={mode}",
+ when=lambda cfg, prog=check_program: programSucceeds(cfg, prog)
+ )
+ )
+
+# Detect the assertion semantic used by hardening as `libcpp-assertion-semantic=<semantic>`.
+#
+# Like the hardening mode above, this is the semantic in effect when compiling the tests, whether it
+# comes from how the library was configured or from elsewhere.
+for semantic in ("ignore", "observe", "quick_enforce", "enforce"):
+ check_program = f"""
+ #include <stddef.h> // any header to get the definitions
+ int main(int, char**) {{
+ #if defined(_LIBCPP_VERSION) && \\
+ defined(_LIBCPP_ASSERTION_SEMANTIC) && \\
+ _LIBCPP_ASSERTION_SEMANTIC == _LIBCPP_ASSERTION_SEMANTIC_{semantic.upper()}
+ return 0;
+ #else
+ return 1;
+ #endif
+ }}
+ """
+ features.append(
+ Feature(
+ name=f"libcpp-assertion-semantic={semantic}",
+ when=lambda cfg, prog=check_program: programSucceeds(cfg, prog)
+ )
+ )
+
+# Whether the test suite is able to check that hardening assertions fire.
+#
+# Such tests are written using the `TEST_LIBCPP_ASSERT_FAILURE` macro from `check_assertion.h`,
+# which runs the code that should trigger the assertion in a child process and inspects how that
+# process died. That machinery requires Unix headers (it uses `fork` and pipes), C++11 or later,
+# and localization support (it uses `<regex>` and `<sstream>`).
+#
+# On top of that, a failing assertion must be observable at all, which depends on the assertion
+# semantic in effect:
+# - with `ignore`, the assertion isn't even evaluated, so there is nothing to observe;
+# - with `enforce`, the failure is reported through `std::__libcpp_verbose_abort`. When that function
+# isn't available in the library we're running against, `_LIBCPP_VERBOSE_ABORT` degrades to a bare
+# `abort()`, so neither the assertion message nor the way the process died match what the test suite
+# expects.
+_can_test_hardening_assertions = " && ".join(
+ [
+ "stdlib=libc++",
+ "has-unix-headers",
+ "!c++03",
+ "!no-localization",
+ "!libcpp-assertion-semantic=ignore",
+ "!(libcpp-assertion-semantic=enforce && availability-verbose_abort-missing)",
+ ]
+)
+
+features.append(
+ Feature(
+ name="can-test-hardening-assertions",
+ when=lambda cfg: BooleanExpression.evaluate(
+ _can_test_hardening_assertions, cfg.available_features
+ ),
+ )
+)
+
+# Whether the test suite is able to check that hardening assertions of a given category fire.
+#
+# Assertion categories are enabled by different hardening modes, so the suffix is the weakest mode in
+# which the assertion under test is enabled. For example `_LIBCPP_ASSERT_NON_NULL` is enabled in the
+# `extensive` and `debug` modes, so a test for such an assertion should use
+# `can-test-hardening-assertions-extensive`.
+enabling_modes = {
+ "fast": ("fast", "extensive", "debug"),
+ "extensive": ("extensive", "debug"),
+ "debug": ("debug",),
+}
+for category, modes in enabling_modes.items():
+ expression = "can-test-hardening-assertions && ({})".format(" || ".join(f"libcpp-hardening-mode={mode}" for mode in modes))
+ features.append(
+ Feature(
+ name=f"can-test-hardening-assertions-{category}",
+ when=lambda cfg, expr=expression: BooleanExpression.evaluate(expr, cfg.available_features)
+ )
+ )
diff --git a/libcxx/utils/libcxx/test/features/libcxx_macros.py b/libcxx/utils/libcxx/test/features/libcxx_macros.py
index bcc081e2dc2de..ec149bef1a40e 100644
--- a/libcxx/utils/libcxx/test/features/libcxx_macros.py
+++ b/libcxx/utils/libcxx/test/features/libcxx_macros.py
@@ -6,7 +6,7 @@
#
# ===----------------------------------------------------------------------===##
-from libcxx.test.dsl import Feature, compilerMacros, programSucceeds
+from libcxx.test.dsl import Feature, compilerMacros
features = []
@@ -78,22 +78,3 @@
and compilerMacros(cfg)[m] == "0",
)
)
-
-for mode in ("none", "fast", "extensive", "debug"):
- check_program = f"""
- #include <stddef.h> // any header to get the definitions
- int main(int, char**) {{
- #if defined(_LIBCPP_VERSION) && \\
- defined(_LIBCPP_HARDENING_MODE) && _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_{mode.upper()}
- return 0;
- #else
- return 1;
- #endif
- }}
- """
- features.append(
- Feature(
- name=f"libcpp-hardening-mode={mode}",
- when=lambda cfg, prog=check_program: programSucceeds(cfg, prog)
- )
- )
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index d0bb38ab84df4..909815694c2cc 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -484,7 +484,6 @@ def getSuitableClangTidy(cfg):
AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_OBSERVE") if assertion_semantic == "observe" else None,
AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_QUICK_ENFORCE") if assertion_semantic == "quick_enforce" else None,
AddCompileFlag("-D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_ENFORCE") if assertion_semantic == "enforce" else None,
- AddFeature("libcpp-assertion-semantic={}".format(assertion_semantic)) if assertion_semantic != "undefined" else None,
],
),
),
>From e3805b3ee46ff58c7c434b6de0bed874270070fa Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 31 Jul 2026 11:58:44 -0400
Subject: [PATCH 2/4] Tweak hardening tests
---
.../assertions/modes/override_with_unchecked_mode.pass.cpp | 5 ++---
.../semantics/override_with_ignore_semantic.pass.cpp | 7 ++++---
.../semantics/override_with_observe_semantic.pass.cpp | 7 ++++---
3 files changed, 10 insertions(+), 9 deletions(-)
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 34fc04687c4f7..334bd06b96d63 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
@@ -8,11 +8,10 @@
// This test ensures that we can override any hardening mode with the unchecked mode on a per-TU basis.
-// REQUIRES: can-test-hardening-assertions
+// REQUIRES: stdlib=libc++
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE
-#include <cassert>
-#include "check_assertion.h"
+#include <vector> // pulls in the valid element access assertion
int main(int, char**) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(true, "Should not fire");
diff --git a/libcxx/test/libcxx/assertions/semantics/override_with_ignore_semantic.pass.cpp b/libcxx/test/libcxx/assertions/semantics/override_with_ignore_semantic.pass.cpp
index e66220ba99aca..52b6b391181a8 100644
--- a/libcxx/test/libcxx/assertions/semantics/override_with_ignore_semantic.pass.cpp
+++ b/libcxx/test/libcxx/assertions/semantics/override_with_ignore_semantic.pass.cpp
@@ -9,12 +9,13 @@
// This test ensures that we can override the assertion semantic used by any hardening mode with `ignore` on a per-TU
// basis (this is valid for the `none` mode as well, though a no-op).
-// REQUIRES: can-test-hardening-assertions
// UNSUPPORTED: libcpp-has-no-experimental-hardening-observe-semantic
+// assertion semantics require libc++ and C++11
+// UNSUPPORTED: c++03
+// REQUIRES: stdlib=libc++
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_IGNORE
-#include <cassert>
-#include "check_assertion.h"
+#include <vector> // pulls in the valid element access assertion
int main(int, char**) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(true, "Should not fire");
diff --git a/libcxx/test/libcxx/assertions/semantics/override_with_observe_semantic.pass.cpp b/libcxx/test/libcxx/assertions/semantics/override_with_observe_semantic.pass.cpp
index b354893b7b811..cfa478ae085a4 100644
--- a/libcxx/test/libcxx/assertions/semantics/override_with_observe_semantic.pass.cpp
+++ b/libcxx/test/libcxx/assertions/semantics/override_with_observe_semantic.pass.cpp
@@ -9,12 +9,13 @@
// This test ensures that we can override the assertion semantic used by any checked hardening mode with `observe` on
// a per-TU basis.
-// REQUIRES: can-test-hardening-assertions-fast
// UNSUPPORTED: libcpp-has-no-experimental-hardening-observe-semantic
+// assertion semantics require libc++ and C++11
+// UNSUPPORTED: c++03
+// REQUIRES: stdlib=libc++
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_OBSERVE
-#include <cassert>
-#include "check_assertion.h"
+#include <vector> // pulls in the valid element access assertion
int main(int, char**) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(true, "Should not fire");
>From 6982c9f9a5faffbda4c37fe359bc3c266410d15d Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 31 Jul 2026 12:11:40 -0400
Subject: [PATCH 3/4] Remove redundant assertion semantic check
---
.../strings/basic.string/string.modifiers/assert.assign.pass.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.assign.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.assign.pass.cpp
index 75717d200e49b..81f9aa6aa5a48 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.assign.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.assign.pass.cpp
@@ -13,7 +13,6 @@
// basic_string& assign(const value_type* s, size_type pos, size_type n);
// REQUIRES: can-test-hardening-assertions-extensive
-// UNSUPPORTED: libcpp-assertion-semantic={{ignore|observe}}
#include <string>
>From 8907b053022da0b052c0034db156382d5adc22ae Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 31 Jul 2026 13:24:04 -0400
Subject: [PATCH 4/4] Migrate recently added test
---
.../assert.initial_size.pass.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/assert.initial_size.pass.cpp b/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/assert.initial_size.pass.cpp
index 61c331d9158ce..7cdd7fe27e9f4 100644
--- a/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/assert.initial_size.pass.cpp
+++ b/libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/assert.initial_size.pass.cpp
@@ -18,10 +18,7 @@
// UNSUPPORTED: c++03, c++11, c++14
// UNSUPPORTED: availability-pmr-missing
-// REQUIRES: has-unix-headers
-// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
-// UNSUPPORTED: libcpp-assertion-semantic={{ignore|observe}}
-// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// REQUIRES: can-test-hardening-assertions-extensive
#include <cstddef>
#include <memory_resource>
More information about the libcxx-commits
mailing list