-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[libc++] Fix name of is_always_lock_free test which was never being run #106077
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
[libc++] Fix name of is_always_lock_free test which was never being run #106077
Conversation
@llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesFull diff: https://github.com/llvm/llvm-project/pull/106077.diff 1 Files Affected:
diff --git a/libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.cpp b/libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.pass.cpp
similarity index 100%
rename from libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.cpp
rename to libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.pass.cpp
|
03a3f8e
to
6ff7ed8
Compare
Seems like this PR caused tests to fail. Can you have a look @ldionne |
ping |
@philnik777 you approved it - but the tests are failing - I did re-run them and it still failed. Would it still be safe to merge this? |
Not as-is. We need to suppress the diagnostic that causes the test to fail, but that's a minor change. |
Sorry, I dropped the ball on this cause I was absorbed by the modules work. Looking now. |
6ff7ed8
to
eddceb7
Compare
Seems like there are still a lot of CI problems here? |
17e0d67
to
8225a05
Compare
8225a05
to
037efef
Compare
037efef
to
74dd036
Compare
// UNSUPPORTED: c++03, c++11, c++14 | ||
// XFAIL: LIBCXX-PICOLIBC-FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@domin144 @mplatings I don't quite understand why this fails. There seems to be missing the __atomic_is_lock_free
intrinsic on the Picolibc setup, but the other atomic tests are working. Could you take a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will merge this because we want to cherry-pick onto LLVM 19 and it's better to have this test for most platforms than for none of them, but I would really appreciate if we could address this in a follow-up.
/cherry-pick b456619 |
…un (llvm#106077) (cherry picked from commit b456619)
/pull-request #110838 |
Currently this test is completely xfailed as part of the patch #106077. But this test works on A and R profile, not in v7M profile. Because the test contain cases in which m-profile will fail for atomic types greater than 4 bytes in size.
…un (llvm#106077) (cherry picked from commit b456619)
@@ -45,7 +51,8 @@ void check_always_lock_free(std::atomic<T> const& a) { | |||
|
|||
// In all cases, also sanity-check it based on the implication always-lock-free => lock-free. | |||
if (is_always_lock_free) { | |||
std::same_as<bool> decltype(auto) is_lock_free = a.is_lock_free(); | |||
auto is_lock_free = a.is_lock_free(); | |||
ASSERT_SAME_TYPE(decltype(is_always_lock_free), bool const); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASSERT_SAME_TYPE(decltype(is_always_lock_free), bool const); | |
ASSERT_SAME_TYPE(decltype(is_lock_free), bool); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you open a PR to fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… `-Wno-psabi` (llvm#113608) MSVC doesn't understand `-Wno-psabi`, which was introduced here by @ldionne in llvm#106077. Using `ADDITIONAL_COMPILE_FLAGS(gcc-style-warnings)` (implemented by llvm#75317) avoids passing this to MSVC.
No description provided.