Author: labath Date: Fri Aug 31 11:25:01 2018 New Revision: 341235 URL: http://llvm.org/viewvc/llvm-project?rev=341235&view=rev Log: Avoid using short identifiers in some tests
This applies the same workaround as r321271 to other tests. The root problem is that lldb finds an internal symbol with the same name in the debug info of system libraries, and then fails to disambiguate between the two. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/main.cpp Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py?rev=341235&r1=341234&r2=341235&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py Fri Aug 31 11:25:01 2018 @@ -107,7 +107,7 @@ class DataFormatterSynthValueTestCase(Te # check that an aptly defined synthetic provider does not affect # one-lining self.expect( - "expression struct S { myInt theInt{12}; }; S()", + "expression struct Struct { myInt theInt{12}; }; Struct()", substrs=['(theInt = 12)']) # check that we can use a synthetic value in a summary Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py?rev=341235&r1=341234&r2=341235&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py Fri Aug 31 11:25:01 2018 @@ -52,23 +52,23 @@ class TestCppTypeLookup(TestBase): self.assertTrue(expr_result.GetError().Fail(), "'namespace_only' exists in namespace only") - # Make sure we can find the correct type in a namespace "a" - expr_result = frame.EvaluateExpression("*((a::namespace_only *)&i)") + # Make sure we can find the correct type in a namespace "nsp_a" + expr_result = frame.EvaluateExpression("*((nsp_a::namespace_only *)&i)") self.check_value(expr_result, "a", 123) - # Make sure we can find the correct type in a namespace "b" - expr_result = frame.EvaluateExpression("*((b::namespace_only *)&i)") + # Make sure we can find the correct type in a namespace "nsp_b" + expr_result = frame.EvaluateExpression("*((nsp_b::namespace_only *)&i)") self.check_value(expr_result, "b", 123) # Make sure we can find the correct type in the root namespace expr_result = frame.EvaluateExpression("*((namespace_and_file *)&i)") self.check_value(expr_result, "ff", 123) - # Make sure we can find the correct type in a namespace "a" + # Make sure we can find the correct type in a namespace "nsp_a" expr_result = frame.EvaluateExpression( - "*((a::namespace_and_file *)&i)") + "*((nsp_a::namespace_and_file *)&i)") self.check_value(expr_result, "aa", 123) - # Make sure we can find the correct type in a namespace "b" + # Make sure we can find the correct type in a namespace "nsp_b" expr_result = frame.EvaluateExpression( - "*((b::namespace_and_file *)&i)") + "*((nsp_b::namespace_and_file *)&i)") self.check_value(expr_result, "bb", 123) # Make sure we don't accidentally accept structures that exist only @@ -84,11 +84,11 @@ class TestCppTypeLookup(TestBase): expr_result = frame.EvaluateExpression( "*((contains_type::in_contains_type *)&i)") self.check_value(expr_result, "fff", 123) - # Make sure we can find the correct type in a namespace "a" + # Make sure we can find the correct type in a namespace "nsp_a" expr_result = frame.EvaluateExpression( - "*((a::contains_type::in_contains_type *)&i)") + "*((nsp_a::contains_type::in_contains_type *)&i)") self.check_value(expr_result, "aaa", 123) - # Make sure we can find the correct type in a namespace "b" + # Make sure we can find the correct type in a namespace "nsp_b" expr_result = frame.EvaluateExpression( - "*((b::contains_type::in_contains_type *)&i)") + "*((nsp_b::contains_type::in_contains_type *)&i)") self.check_value(expr_result, "bbb", 123) Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/main.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/main.cpp?rev=341235&r1=341234&r2=341235&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/main.cpp (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/main.cpp Fri Aug 31 11:25:01 2018 @@ -11,7 +11,7 @@ // levels in the code and test that we can properly locate these types with // a varienty of different expressions. -namespace a { +namespace nsp_a { struct namespace_only { int a; }; @@ -24,7 +24,7 @@ namespace a { }; }; }; -namespace b { +namespace nsp_b { struct namespace_only { int b; }; @@ -50,12 +50,12 @@ struct contains_type { int main (int argc, char const *argv[]) { - a::namespace_only a_namespace_only = { 1 }; - a::namespace_and_file a_namespace_and_file = { 2 }; - a::contains_type::in_contains_type a_in_contains_type = { 3 }; - b::namespace_only b_namespace_only = { 11 }; - b::namespace_and_file b_namespace_and_file = { 22 }; - b::contains_type::in_contains_type b_in_contains_type = { 33 }; + nsp_a::namespace_only a_namespace_only = { 1 }; + nsp_a::namespace_and_file a_namespace_and_file = { 2 }; + nsp_a::contains_type::in_contains_type a_in_contains_type = { 3 }; + nsp_b::namespace_only b_namespace_only = { 11 }; + nsp_b::namespace_and_file b_namespace_and_file = { 22 }; + nsp_b::contains_type::in_contains_type b_in_contains_type = { 33 }; namespace_and_file file_namespace_and_file = { 44 }; contains_type::in_contains_type file_in_contains_type = { 55 }; int i = 123; // Provide an integer that can be used for casting _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits