https://bugs.llvm.org/show_bug.cgi?id=50861
Bug ID: 50861
Summary: libstdc++ tests fail with GCC as the test compiler
Product: lldb
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: lldb-dev@lists.llvm.org
Reporter: teempe...@gmail.com
CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org
All of these tests fail with GCC 8.5, 9.4, 10.3 and 11.1 as the test compiler.
Quick debugging suggests that we fail to ASTImport some type into the scratch
AST of LLDB.
Failure outputs:
```
FAIL: test_with_run_command_dwarf
(TestDataFormatterStdIterator.StdIteratorDataFormatterTestCase)
Test that libstdcpp iterators format properly.
--
Traceback (most recent call last):
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 1830, in test_method
return attrvalue(self)
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py",
line 63, in test_with_run_command
self.expect(
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 2550, in expect
self.fail(log_msg)
AssertionError: Ran command:
"frame variable simI"
Got output:
(simter) simI = {
first = {
_M_dataplus = (_M_p = "world")
_M_string_length = 5
= (_M_local_buf = "world", _M_allocated_capacity = 431316168567)
}
second = 42
}
Expecting sub string: "first = "world"" (was not found)
==
FAIL: test_with_run_command_dwarf
(TestDataFormatterStdList.StdListDataFormatterTestCase)
Test that that file and class static variables display correctly.
--
Traceback (most recent call last):
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 1830, in test_method
return attrvalue(self)
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py",
line 186, in test_with_run_command
self.expect("p text_list",
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 2550, in expect
self.fail(log_msg)
AssertionError: Ran command:
"p text_list"
Got output:
$2 =
==
FAIL: test_with_run_command_dwarf
(TestDataFormatterStdMap.StdMapDataFormatterTestCase)
Test that that file and class static variables display correctly.
--
Traceback (most recent call last):
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 1830, in test_method
return attrvalue(self)
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py",
line 95, in test_with_run_command
self.expect("p ii",
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 2550, in expect
self.fail(log_msg)
AssertionError: Ran command:
"p ii"
Got output:
(std::map, std::allocator<> >) $0 = map has 0 items {}
Expecting sub string: "map has 9 items" (was not found)
Config=x86_64-/home/gcc_builder/10.3.0/bin/gcc
==
FAIL: test_with_run_command_dwarf
(TestDataFormatterStdSmartPtr.StdSmartPtrDataFormatterTestCase)
--
Traceback (most recent call last):
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 1830, in test_method
return attrvalue(self)
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py",
line 30, in test_with_run_command
self.expect("frame variable ssp", substrs=['ssp = "foobar"'])
File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 2550, in expect
self.fail(log_msg)
AssertionError: Ran command:
"frame variable ssp"
Got output:
(std::shared_ptr,
std::allocator<> > >) ssp = std::__shared_ptr, std::allocator<> >, __gnu_