https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/114122
>From 00d136ed33cdc4362f7f23804ee184ddb1fb2539 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang <avogelsges...@salesforce.com> Date: Tue, 29 Oct 2024 20:23:13 +0000 Subject: [PATCH 1/2] [lldb][test] Skip `LibCxxInternalsRecognizerTestCase` on clang <= 17 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/ --- .../libcxx-internals-recognizer/TestLibcxxInternalsRecognizer.py | 1 + 1 file changed, 1 insertion(+) 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() >From f59335ac2e4d69811ad5257a0954f42a86236843 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang <avogelsges...@salesforce.com> Date: Wed, 30 Oct 2024 23:26:57 +0000 Subject: [PATCH 2/2] Correctly fix the issue --- .../TestLibcxxInternalsRecognizer.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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 0270e78808c646..5a26c045a312e8 100644 --- a/lldb/test/API/lang/cpp/libcxx-internals-recognizer/TestLibcxxInternalsRecognizer.py +++ b/lldb/test/API/lang/cpp/libcxx-internals-recognizer/TestLibcxxInternalsRecognizer.py @@ -3,12 +3,13 @@ from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil +import re class LibCxxInternalsRecognizerTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True @add_test_categories(["libc++"]) - @skipIf(compiler="clang", compiler_version=["<", "18.0"]) + @skipIf(compiler="clang", compiler_version=["<", "16.0"]) def test_frame_recognizer(self): """Test that implementation details of libc++ are hidden""" self.build() @@ -22,7 +23,7 @@ def test_frame_recognizer(self): # We never hide the frame of the entry-point into the standard library, even # if the name starts with `__` which usually indicates an internal function. "ranges_sort_less(int, int)": [ - "ranges::__sort::operator()", + re.compile("ranges::__sort::(__fn::)?operator\(\)"), "test_algorithms", ], # `ranges::views::transform` internally uses `std::invoke`, and that @@ -58,9 +59,11 @@ def test_frame_recognizer(self): ): frame_id = frame_id + 1 # Expect the correct parent frame - self.assertIn( - expected_parent, thread.GetFrameAtIndex(frame_id).GetFunctionName() - ) + 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}'") + else: + self.assertIn(expected_parent, func_name) frame_id = frame_id + 1 process.Continue() _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits