From: Eric Fiselier Date: Mon, 20 Jan 2020 02:49:14 +0000 (-0500) Subject: [libc++][libc++abi] Fix or suppress failing tests in single-threaded X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d15fad2653d429efbf1a7c63c375530f8a1a1fa3;p=platform%2Fupstream%2Fllvm.git [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 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 header not hard-error and instead be empty for single-threaded configurations --- diff --git a/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp b/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp index a24aafd..70477d9 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 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 re-exports diff --git a/libcxx/test/libcxx/modules/clocale_exports.sh.cpp b/libcxx/test/libcxx/modules/clocale_exports.sh.cpp index 3225155..6c4bc26 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 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 315d9ac..c473245 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 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 re-exports diff --git a/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp b/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp index 4cbb1d5..a653b05 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 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 5b35ba3..ec86ad8 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 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 7e5b7ac..1c756f4 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()) {