-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lldb][test] Fix LibCxxInternalsRecognizerTestCase
on clang <= 17
#114122
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
Conversation
Because of a build failure with libc++17. See https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-matrix/912/execution/node/107/log/
@llvm/pr-subscribers-lldb Author: Adrian Vogelsgesang (vogelsgesang) ChangesBecause of a build failure with libc++17. Full diff: https://github.com/llvm/llvm-project/pull/114122.diff 1 Files Affected:
diff --git a/lldb/test/API/lang/cpp/libcxx-internals-recognizer/TestLibcxxInternalsRecognizer.py b/lldb/test/API/lang/cpp/libcxx-internals-recognizer/TestLibcxxInternalsRecognizer.py
index ad48208f21e502..0270e78808c646 100644
--- a/lldb/test/API/lang/cpp/libcxx-internals-recognizer/TestLibcxxInternalsRecognizer.py
+++ b/lldb/test/API/lang/cpp/libcxx-internals-recognizer/TestLibcxxInternalsRecognizer.py
@@ -8,6 +8,7 @@ class LibCxxInternalsRecognizerTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
@add_test_categories(["libc++"])
+ @skipIf(compiler="clang", compiler_version=["<", "18.0"])
def test_frame_recognizer(self):
"""Test that implementation details of libc++ are hidden"""
self.build()
|
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.
Thanks!
Note that for the other failure you'll have to make sure we account for inline namespaces in the test assertion (or at least that's what my impression was from the error log) |
Sorry to clarify. I think based on @felipepiovezan comment here: #108870 (comment) On Clang 17 we compile fine, just the assertion fails to find the expected function name (because of the
So really we should skip for <= 15. And fix the assertion for 17+ |
Yeah, I'm just now hitting this assertion on our downstream fork tests too |
good catch! Thanks for staying vigilant
I don't think the inline namespace is the issue here. |
Should be fixed the correct way, now. |
LibCxxInternalsRecognizerTestCase
on clang <= 17LibCxxInternalsRecognizerTestCase
on clang <= 17
You can test this locally with the following command:darker --check --diff -r 70af40ba74cf62fdaa3ae1d7db972c138655049f...9c98586e63151dc6165b6a0e4a529f2bc20d8056 lldb/test/API/lang/cpp/libcxx-internals-recognizer/TestLibcxxInternalsRecognizer.py View the diff from darker here.--- TestLibcxxInternalsRecognizer.py 2024-10-30 23:43:11.000000 +0000
+++ TestLibcxxInternalsRecognizer.py 2024-10-30 23:46:18.234374 +0000
@@ -61,11 +61,11 @@
# Expect the correct parent frame
func_name = thread.GetFrameAtIndex(frame_id).GetFunctionName()
if isinstance(expected_parent, re.Pattern):
self.assertTrue(
expected_parent.search(func_name) is not None,
- f"'{expected_parent}' not found in '{func_name}'"
+ f"'{expected_parent}' not found in '{func_name}'",
)
else:
self.assertIn(expected_parent, func_name)
frame_id = frame_id + 1
process.Continue()
|
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.
LGTM thx!
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.
Awesome, thank you!
@vogelsgesang since I don't know if our timezones align, I am going to click the merge button here to see if we can get the bots green again! |
It's interesting that the 17.0 bot is still not happy:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-matrix/925/execution/node/135/log/ |
i think that's a different test though (meant to look into it but havent yet :D ) |
oh oops, sorry, didn't notice that |
…lvm#114122) We had to disable the tests for libc++ <= 15 because the `std::ranges` functions were not available, yet. Also, on libc++17 there was still an additional `__fn` struct withing `ranges::__sort`. The test expectation was updated to use a regular expression, so we can match both the old and the new name. See https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-matrix/912/execution/node/107/log/
…lvm#114122) We had to disable the tests for libc++ <= 15 because the `std::ranges` functions were not available, yet. Also, on libc++17 there was still an additional `__fn` struct withing `ranges::__sort`. The test expectation was updated to use a regular expression, so we can match both the old and the new name. See https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-matrix/912/execution/node/107/log/
We had to disable the tests for libc++ <= 15 because the
std::ranges
functions were not available, yet.Also, on libc++17 there was still an additional
__fn
struct withingranges::__sort
. The test expectation was updated to use a regular expression, so we can match both the old and the new name.See https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-matrix/912/execution/node/107/log/