Author: David Mentler Date: 2026-07-18T13:23:00+02:00 New Revision: d46a352ecf9708255a938e6d5e972b5221de4c2c
URL: https://github.com/llvm/llvm-project/commit/d46a352ecf9708255a938e6d5e972b5221de4c2c DIFF: https://github.com/llvm/llvm-project/commit/d46a352ecf9708255a938e6d5e972b5221de4c2c.diff LOG: [lldb] Fix TestSBValueSetTypeSyntheticOverride with libstdc++ (#210495) My test added in #209056 assumed that a `CXXSyntheticChildren` implementation for `std::vector` is readily available on all platforms, that is not the case. Do the simplest thing and remove this part of the test for now. Fixes: https://lab.llvm.org/buildbot/#/builders/59/builds/35839 ``` FAIL: test (TestSBValueSetTypeSyntheticOverride.TestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/test/API/python_api/sbvalue_set_type_synthetic_override/TestSBValueSetTypeSyntheticOverride.py", line 22, in test self.checkOverride(vec, before=None) File "/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/test/API/python_api/sbvalue_set_type_synthetic_override/TestSBValueSetTypeSyntheticOverride.py", line 43, in checkOverride self.assertIsNone(impl_before) AssertionError: <lldb.formatters.cpp.gnu_libstdcpp.StdVectorSynthProvider object at 0xfb088f787bb0> is not None ``` Added: Modified: lldb/test/API/python_api/sbvalue_set_type_synthetic_override/TestSBValueSetTypeSyntheticOverride.py Removed: ################################################################################ diff --git a/lldb/test/API/python_api/sbvalue_set_type_synthetic_override/TestSBValueSetTypeSyntheticOverride.py b/lldb/test/API/python_api/sbvalue_set_type_synthetic_override/TestSBValueSetTypeSyntheticOverride.py index e5e8f29ba0e75..39f0243c63896 100644 --- a/lldb/test/API/python_api/sbvalue_set_type_synthetic_override/TestSBValueSetTypeSyntheticOverride.py +++ b/lldb/test/API/python_api/sbvalue_set_type_synthetic_override/TestSBValueSetTypeSyntheticOverride.py @@ -19,7 +19,13 @@ def test(self): # CXX runtime synthetic can be overridden vec = frame.FindVariable("vec") self.assertTrue(vec.IsSynthetic()) - self.checkOverride(vec, before=None) + + # On some platforms the synthetic child provider implementation of + # std::vector is not native, in other words it's scripted + # + # This test can't reliably tell the diff erence, so skip checking + # the 'before' implementation typename check + self.checkOverride(vec, before=None, skip_before_impl_check=True) # Python synthetic can be overridden foo = frame.FindVariable("foo") @@ -31,19 +37,20 @@ def test(self): self.assertFalse(bar.IsSynthetic()) self.checkOverride(bar, before=None) - def checkOverride(self, value, before): + def checkOverride(self, value, before, skip_before_impl_check=False): foo = lldb.SBTypeSynthetic.CreateWithClassName(f"foo_bar_synths.FooSynthetic") bar = lldb.SBTypeSynthetic.CreateWithClassName(f"foo_bar_synths.BarSynthetic") # Target the static (non synthetic) ValueObject static = value.GetNonSyntheticValue() - impl_before = static.GetSyntheticValue().GetTypeSyntheticImplementation() - if not before: - self.assertIsNone(impl_before) - else: - self.assertIsNotNone(impl_before) - self.assertEqual(type(impl_before).__name__, before) + if not skip_before_impl_check: + impl_before = static.GetSyntheticValue().GetTypeSyntheticImplementation() + if not before: + self.assertIsNone(impl_before) + else: + self.assertIsNotNone(impl_before) + self.assertEqual(type(impl_before).__name__, before) static.SetTypeSynthetic(bar) self.assertEqual(static.GetTypeSynthetic(), bar) _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
