Skip to content

[libc++][test] disable all atomic<long double> tests #74201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 11, 2023

Conversation

huixie90
Copy link
Member

@huixie90 huixie90 commented Dec 2, 2023

fixes #73791

@huixie90 huixie90 requested a review from a team as a code owner December 2, 2023 17:57
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Dec 2, 2023
@llvmbot
Copy link
Member

llvmbot commented Dec 2, 2023

@llvm/pr-subscribers-libcxx

Author: Hui (huixie90)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/74201.diff

16 Files Affected:

  • (modified) libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp (+2-1)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp (+2-1)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp (+2-4)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp (+2-1)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp (+2-4)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp (+2-6)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp (+2-6)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp (+2-3)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp (+2-1)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp (+2-1)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp (+2-1)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp (+2-1)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp (+2-4)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp (+2-4)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp (+2-3)
  • (modified) libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp (+2-4)
diff --git a/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp b/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
index 42a7c08fa75ba..3d5a6e1bfc550 100644
--- a/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
@@ -45,7 +45,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp
index 3daf3aba71fc9..261cb6da58ea7 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp
@@ -56,7 +56,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp
index 27853ef08c748..26b9f24b5a282 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp
@@ -236,10 +236,8 @@ int main(int, char**) {
   test<float>();
   test<double>();
 
-// https://github.com/llvm/llvm-project/issues/47978
-#ifndef TEST_COMPILER_CLANG
-  test<long double>();
-#endif
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp
index aad6354084761..628e67fc8b5cf 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp
@@ -56,7 +56,8 @@ constexpr void testOne() {
 constexpr bool test() {
   testOne<float>();
   testOne<double>();
-  testOne<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // testOne<long double>();
   return true;
 }
 
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp
index 9c67d7e671cfa..86db67ae82ca6 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp
@@ -6,9 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
-// XFAIL: target={{x86_64-.*}} && tsan
-// XFAIL: target={{x86_64-.*}} && msan
 // XFAIL: !has-64-bit-atomics
 // UNSUPPORTED: !non-lockfree-atomics
 
@@ -72,7 +69,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
index 664185fc243f9..8808ea389a3e4 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
@@ -6,11 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: LIBCXX-AIX-FIXME
-// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
-// XFAIL: target={{x86_64-.*}} && tsan
-// Hangs with msan.
-// UNSUPPORTED: msan
 // XFAIL: !has-64-bit-atomics
 // UNSUPPORTED: !non-lockfree-atomics
 
@@ -114,7 +109,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
index c4e33538de741..cf266a9b41af8 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
@@ -6,11 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: LIBCXX-AIX-FIXME
-// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
-// XFAIL: target={{x86_64-.*}} && tsan
-// Hangs with msan.
-// UNSUPPORTED: msan
 // XFAIL: !has-64-bit-atomics
 // UNSUPPORTED: !non-lockfree-atomics
 
@@ -115,7 +110,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
index b495d04989e20..495071375d526 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
@@ -6,9 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
 // XFAIL: !has-64-bit-atomics
-// XFAIL: target={{x86_64-.*}} && tsan
 // UNSUPPORTED: !non-lockfree-atomics
 
 //  floating-point-type load(memory_order = memory_order::seq_cst) volatile noexcept;
@@ -134,7 +132,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
index b5422c0362dc1..13e2e110d0f27 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp
@@ -55,7 +55,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp
index eca7a19e5c57d..903826d7851f9 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_all.pass.cpp
@@ -93,7 +93,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp
index 183cf18b820e7..33c5d96591eea 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/notify_one.pass.cpp
@@ -77,7 +77,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp
index 58c8da6c1042b..1429bde4a440d 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.float.pass.cpp
@@ -52,7 +52,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
index b1ef276d870cf..0dca0efd5aafb 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
@@ -7,10 +7,7 @@
 //===----------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: !has-64-bit-atomics
-// UNSUPPORTED: LIBCXX-AIX-FIXME
 // UNSUPPORTED: !non-lockfree-atomics
-// Hangs with msan.
-// UNSUPPORTED: msan
 
 // floating-point-type operator-=(floating-point-type) volatile noexcept;
 // floating-point-type operator-=(floating-point-type) noexcept;
@@ -98,7 +95,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
index 0b1781bf8e571..49c70b298feeb 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
@@ -7,10 +7,7 @@
 //===----------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: !has-64-bit-atomics
-// UNSUPPORTED: LIBCXX-AIX-FIXME
 // UNSUPPORTED: !non-lockfree-atomics
-// Hangs with msan.
-// UNSUPPORTED: msan
 
 // floating-point-type operator+=(floating-point-type) volatile noexcept;
 // floating-point-type operator+=(floating-point-type) noexcept;
@@ -98,7 +95,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp
index 81d17cd32a6c5..22fc272f967ee 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/store.pass.cpp
@@ -6,9 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
 // XFAIL: !has-64-bit-atomics
-// XFAIL: target={{x86_64-.*}} && tsan
 // UNSUPPORTED: !non-lockfree-atomics
 
 // void store(floating-point-type, memory_order = memory_order::seq_cst) volatile noexcept;
@@ -109,7 +107,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp
index d95801e25d35e..3d5dd0b7f049a 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/wait.pass.cpp
@@ -7,9 +7,6 @@
 //===----------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
-// Clang's support for atomic operations on long double is broken. See https://github.com/llvm/llvm-project/issues/72893
-// XFAIL: target={{x86_64-.*}} && tsan
-// XFAIL: target={{x86_64-.*}} && msan
 // XFAIL: !has-64-bit-atomics
 // UNSUPPORTED: !non-lockfree-atomics
 
@@ -120,7 +117,8 @@ void test() {
 int main(int, char**) {
   test<float>();
   test<double>();
-  test<long double>();
+  // https://github.com/llvm/llvm-project/issues/47978
+  // test<long double>();
 
   return 0;
 }

@EricWF
Copy link
Member

EricWF commented Dec 2, 2023

This does not fix the issue, it hides it.

Copy link
Member

@EricWF EricWF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an OK way to deal with broken tests.

@huixie90
Copy link
Member Author

huixie90 commented Dec 3, 2023

This is not an OK way to deal with broken tests.

There are lots of discussions on the other PR when these tests were added. Basically long double atomic is broken for years and we had some bug reports (against clang) open already. These tests were newly added which already had lots of platforms disabled. But after the merge, we just got more reports that these tests failed in the wild that lots of other platforms that are not in our CI. After some discussions, we will just disable the tests. atomic long double was and is broken. We need to fix the issue before we can have these tests running.

We cannot fix it in the library side by our own. We need clang’s support (at least provide a way to zero out the long double’s 56bits padding)

Copy link
Member

@ldionne ldionne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @huixie90 here. This is not fixing the broken atomic support, but we have other GH issues tracking that. This is merely making the CI green again for some configurations that are currently failing.

The bottom line is that atomic's support for long double is broken all around and we added tests for it, which now obviously fail. We should probably have punted on adding the tests for long double until they actually worked on all platforms, and this is what this PR is doing.

@ldionne
Copy link
Member

ldionne commented Dec 4, 2023

The alternative here is to keep people's CI broken until the underlying issues with atomic and long double are fixed in Clang, which is likely going to take a while.

@vitalybuka
Copy link
Collaborator

Would it be better to disable long double test for x86_64 only?

Copy link
Member

@mordante mordante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also prefer to temporary disable the tests to get the CI green again.

Copy link
Member

@ldionne ldionne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I am going to merge this since CI seems happy and this will resolve CI issues that have been ongoing for way too long on Gentoo.

@ldionne ldionne merged commit 66be057 into llvm:main Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[libcxx] New std/atomics/atomics.types.generic/atomics.types.float tests hang on amd64
6 participants