[libcxx-commits] [libcxx] d15fad2 - [libc++][libc++abi] Fix or suppress failing tests in single-threaded
Eric Fiselier via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jan 19 18:53:02 PST 2020
Author: Eric Fiselier
Date: 2020-01-19T21:49:14-05:00
New Revision: d15fad2653d429efbf1a7c63c375530f8a1a1fa3
URL: https://github.com/llvm/llvm-project/commit/d15fad2653d429efbf1a7c63c375530f8a1a1fa3
DIFF: https://github.com/llvm/llvm-project/commit/d15fad2653d429efbf1a7c63c375530f8a1a1fa3.diff
LOG: [libc++][libc++abi] Fix or suppress failing tests in single-threaded
builds.
Fix a libc++abi test that was incorrectly checking for threading
primitives even when threading was disabled.
Additionally, temporarily XFAIL some module tests that fail because
the <atomic> header is unsupported but still built as a part of the
std module.
To properly address this libc++ would either need to produce a different
module.modulemap for single-threaded configurations, or it would need
to make the <atomic> header not hard-error and instead be empty
for single-threaded configurations
Added:
Modified:
libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp
libcxx/test/libcxx/modules/clocale_exports.sh.cpp
libcxx/test/libcxx/modules/cstdint_exports.sh.cpp
libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp
libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp
libcxxabi/test/guard_test_basic.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp b/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp
index a24aafdcc737..70477d97678a 100644
--- a/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp
+++ b/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp
@@ -10,6 +10,10 @@
// are not modular
// XFAIL: LIBCXX-WINDOWS-FIXME
+// FIXME: The <atomic> header is not supported for single-threaded systems,
+// but still gets built as part of the 'std' module, which breaks the build.
+// XFAIL: libcpp-has-no-threads
+
// REQUIRES: modules-support
// Test that <cinttypes> re-exports <cstdint>
diff --git a/libcxx/test/libcxx/modules/clocale_exports.sh.cpp b/libcxx/test/libcxx/modules/clocale_exports.sh.cpp
index 3225155ca368..6c4bc2675bb9 100644
--- a/libcxx/test/libcxx/modules/clocale_exports.sh.cpp
+++ b/libcxx/test/libcxx/modules/clocale_exports.sh.cpp
@@ -10,6 +10,10 @@
// are not modular
// XFAIL: LIBCXX-WINDOWS-FIXME
+// FIXME: The <atomic> header is not supported for single-threaded systems,
+// but still gets built as part of the 'std' module, which breaks the build.
+// XFAIL: libcpp-has-no-threads
+
// REQUIRES: modules-support
// UNSUPPORTED: c++98, c++03
diff --git a/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp b/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp
index 315d9ac17b91..c473245fe64f 100644
--- a/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp
+++ b/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp
@@ -10,6 +10,10 @@
// are not modular
// XFAIL: LIBCXX-WINDOWS-FIXME
+// FIXME: The <atomic> header is not supported for single-threaded systems,
+// but still gets built as part of the 'std' module, which breaks the build.
+// XFAIL: libcpp-has-no-threads
+
// REQUIRES: modules-support
// Test that <cstdint> re-exports <stdint.h>
diff --git a/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp b/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp
index 4cbb1d574206..a653b0593277 100644
--- a/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp
+++ b/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp
@@ -10,6 +10,10 @@
// are not modular
// XFAIL: LIBCXX-WINDOWS-FIXME
+// FIXME: The <atomic> header is not supported for single-threaded systems,
+// but still gets built as part of the 'std' module, which breaks the build.
+// XFAIL: libcpp-has-no-threads
+
// REQUIRES: modules-support
// Test that intypes.h re-exports stdint.h
diff --git a/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp b/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp
index 5b35ba30ca6d..ec86ad827dd8 100644
--- a/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp
+++ b/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp
@@ -6,6 +6,10 @@
//
//===----------------------------------------------------------------------===//
+// FIXME: The <atomic> header is not supported for single-threaded systems,
+// but still gets built as part of the 'std' module, which breaks the build.
+// XFAIL: libcpp-has-no-threads
+
// REQUIRES: modules-support
// Test that int8_t and the like are exported from stdint.h not inttypes.h
diff --git a/libcxxabi/test/guard_test_basic.pass.cpp b/libcxxabi/test/guard_test_basic.pass.cpp
index 7e5b7acc3887..1c756f403440 100644
--- a/libcxxabi/test/guard_test_basic.pass.cpp
+++ b/libcxxabi/test/guard_test_basic.pass.cpp
@@ -127,7 +127,7 @@ int main() {
#endif
}
{
-#if defined(__APPLE__) || defined(__linux__)
+#if (defined(__APPLE__) || defined(__linux__)) && !defined(_LIBCXXABI_HAS_NO_THREADS)
assert(PlatformThreadID);
#endif
if (PlatformSupportsThreadID()) {
More information about the libcxx-commits
mailing list