diff --git a/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp b/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp --- a/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp +++ b/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp @@ -8,6 +8,7 @@ // Test that the default verbose termination function aborts the program. +// REQUIRES: has-signal // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1 #include diff --git a/libcxx/test/libcxx/containers/associative/map/at.abort.pass.cpp b/libcxx/test/libcxx/containers/associative/map/at.abort.pass.cpp --- a/libcxx/test/libcxx/containers/associative/map/at.abort.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/map/at.abort.pass.cpp @@ -15,7 +15,7 @@ // Make sure we abort() when exceptions are disabled and we fetch a key that // is not in the map. -// REQUIRES: no-exceptions +// REQUIRES: no-exceptions && has-signal #include #include diff --git a/libcxx/test/libcxx/containers/associative/map/at.const.abort.pass.cpp b/libcxx/test/libcxx/containers/associative/map/at.const.abort.pass.cpp --- a/libcxx/test/libcxx/containers/associative/map/at.const.abort.pass.cpp +++ b/libcxx/test/libcxx/containers/associative/map/at.const.abort.pass.cpp @@ -15,7 +15,7 @@ // Make sure we abort() when exceptions are disabled and we fetch a key that // is not in the map. -// REQUIRES: no-exceptions +// REQUIRES: no-exceptions && has-signal #include #include diff --git a/libcxx/test/libcxx/containers/unord/unord.map/at.abort.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/at.abort.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.map/at.abort.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.map/at.abort.pass.cpp @@ -15,7 +15,7 @@ // Make sure we abort() when exceptions are disabled and we fetch a key that // is not in the map. -// REQUIRES: no-exceptions +// REQUIRES: no-exceptions && has-signal // UNSUPPORTED: c++03 #include diff --git a/libcxx/test/libcxx/containers/unord/unord.map/at.const.abort.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/at.const.abort.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.map/at.const.abort.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.map/at.const.abort.pass.cpp @@ -15,7 +15,7 @@ // Make sure we abort() when exceptions are disabled and we fetch a key that // is not in the map. -// REQUIRES: no-exceptions +// REQUIRES: no-exceptions && has-signal // UNSUPPORTED: c++03 #include diff --git a/libcxx/test/libcxx/input.output/iostreams.base/ios/iostate.flags/clear.abort.pass.cpp b/libcxx/test/libcxx/input.output/iostreams.base/ios/iostate.flags/clear.abort.pass.cpp --- a/libcxx/test/libcxx/input.output/iostreams.base/ios/iostate.flags/clear.abort.pass.cpp +++ b/libcxx/test/libcxx/input.output/iostreams.base/ios/iostate.flags/clear.abort.pass.cpp @@ -15,7 +15,7 @@ // Make sure that we abort() when exceptions are disabled and the exception // flag is set for the iostate we pass to clear(). -// REQUIRES: no-exceptions +// REQUIRES: no-exceptions && has-signal #include #include diff --git a/libcxx/test/libcxx/localization/locales/locale.abort.pass.cpp b/libcxx/test/libcxx/localization/locales/locale.abort.pass.cpp --- a/libcxx/test/libcxx/localization/locales/locale.abort.pass.cpp +++ b/libcxx/test/libcxx/localization/locales/locale.abort.pass.cpp @@ -12,7 +12,7 @@ // explicit locale( const char* std_name ); -// REQUIRES: no-exceptions +// REQUIRES: no-exceptions && has-signal // Make sure we abort() when we construct a locale with a null name and // exceptions are disabled. diff --git a/libcxx/test/libcxx/localization/locales/locale.category.abort.pass.cpp b/libcxx/test/libcxx/localization/locales/locale.category.abort.pass.cpp --- a/libcxx/test/libcxx/localization/locales/locale.category.abort.pass.cpp +++ b/libcxx/test/libcxx/localization/locales/locale.category.abort.pass.cpp @@ -12,7 +12,7 @@ // locale(const locale& other, const char* std_name, category cat); -// REQUIRES: no-exceptions +// REQUIRES: no-exceptions && has-signal // Make sure we abort() when we construct a locale with a null name and // exceptions are disabled. diff --git a/libcxx/test/libcxx/localization/locales/use_facet.abort.pass.cpp b/libcxx/test/libcxx/localization/locales/use_facet.abort.pass.cpp --- a/libcxx/test/libcxx/localization/locales/use_facet.abort.pass.cpp +++ b/libcxx/test/libcxx/localization/locales/use_facet.abort.pass.cpp @@ -10,7 +10,7 @@ // template const Facet& use_facet(const locale& loc); -// REQUIRES: no-exceptions +// REQUIRES: no-exceptions && has-signal // Make sure we abort() when we pass a facet not associated to the locale to // use_facet() and exceptions are disabled. diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -141,6 +141,15 @@ } """)), + Feature(name='has-signal', + when=lambda cfg: sourceBuilds(cfg, """ + #include + int main(int, char**) { + std::signal(SIGABRT, nullptr); + return 0; + } + """)), + # Whether Bash can run on the executor. # This is not always the case, for example when running on embedded systems. #