[lldb] Fix TestSBValueSetTypeSyntheticOverride with libstdc++#210495
Conversation
This is not necessarily true across all configurations, particularly with gnu libstdc++
|
@llvm/pr-subscribers-lldb Author: David Mentler (mentlerd) ChangesMy test added in #209056 assumed that a Do the safe thing and skip that part of the test if conditions are not right. Full diff: https://github.com/llvm/llvm-project/pull/210495.diff 1 Files Affected:
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..907d1af956219 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
@@ -18,8 +18,11 @@ def test(self):
# CXX runtime synthetic can be overridden
vec = frame.FindVariable("vec")
- self.assertTrue(vec.IsSynthetic())
- self.checkOverride(vec, before=None)
+
+ # GNU libstdc++'s std::vector doesn't have a CXXSyntheticChildren implementation
+ # Use the fact that GetTypeSynthetic() only returns scripted SCPs to filter
+ if vec.IsSynthetic() and vec.GetTypeSynthetic() is None:
+ self.checkOverride(vec, before=None)
# Python synthetic can be overridden
foo = frame.FindVariable("foo")
|
This part of the test has a non-trivial expectation against the LLDB which it tests: it wants std::vector to have a non-scripted synthetic child provider implementation.
|
My rationale for the removal is that it's best if the test only relies on the part of the environment it controls. The builtin formatter case is still interesting, but there isn't a reliable way of telling if an SCP implementation is builtin or not at the moment. (SBTypeSynthetic only represents scripted SCPs at the moment) |
I'm not sure if I understand this correctly. You were checking that there wasn't a synthetic children provider: |
I was checking that the scripted synthetic child provider's python implementation is The now removed test wished to check if a |
|
Can you ignore the |
|
Sure, that makes sense. Done! |
My test added in #209056 assumed that a
CXXSyntheticChildrenimplementation forstd::vectoris 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