[lldb-dev] [Bug 50861] New: libstdc++ tests fail with GCC as the test compiler

via lldb-dev lldb-dev at lists.llvm.org
Fri Jun 25 02:38:55 PDT 2021


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 at lists.llvm.org
          Reporter: teemperor at gmail.com
                CC: jdevlieghere at apple.com, llvm-bugs at 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<int, int, std::less<int>, 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::basic_string<char, std::char_traits<char>,
std::allocator<> > >) ssp = std::__shared_ptr<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<> >, __gnu_cxx::_S_atomic>::element_type
@ 0x0000000000418f00 {
  _M_ptr = 0x0000000000418f00
}
======================================================================
FAIL: test_with_run_command_dwo
(TestDataFormatterStdVector.StdVectorDataFormatterTestCase)
   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/vector/TestDataFormatterStdVector.py",
line 168, in test_with_run_command
    self.expect("p strings",
  File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 2457, in expect
    self.runCmd(
  File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 2160, in runCmd
    self.assertTrue(self.res.Succeeded(),
AssertionError: False is not True : Command 'p strings
Error output:
error: expression failed to parse:
error: <lldb wrapper prefix>:45:31: no member named 'strings' in namespace
'$__lldb_local_vars'
    using $__lldb_local_vars::strings;
          ~~~~~~~~~~~~~~~~~~~~^
error: <user expression 3>:1:1: use of undeclared identifier 'strings'
strings
^
======================================================================
FAIL: test_with_run_command_dwarf
(TestDataFormatterStdUniquePtr.StdUniquePtrDataFormatterTestCase)
----------------------------------------------------------------------
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/packages/Python/lldbsuite/test/decorators.py",
line 149, in wrapper
    return func(*args, **kwargs)
  File
"/var/lib/jenkins/workspace/llvm-master-test-matrix/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py",
line 44, in test_with_run_command
    self.assertEqual('"foobar"',
frame.GetValueForVariablePath("sup.object").GetSummary())
AssertionError: '"foobar"' != None
Config=x86_64-/home/gcc_builder/10.3.0/bin/gcc
======================================================================
FAIL: test_with_run_command_dwarf
(TestDataFormatterStdTuple.StdTupleDataFormatterTestCase)
----------------------------------------------------------------------
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/tuple/TestDataFormatterStdTuple.py",
line 32, in test_with_run_command
    self.expect("frame variable ts", substrs=['[0] = "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 ts"

Got output:
(std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<> >
>) ts = {
  [0] = {
    _M_dataplus = (_M_p = "foobar")
    _M_string_length = 6
     = (_M_local_buf = "foobar", _M_allocated_capacity = 125762588864358)
  }
}

Expecting sub string: "[0] = "foobar"" (was not found)
Config=x86_64-/home/gcc_builder/10.3.0/bin/gcc
======================================================================
FAIL: test_with_run_command_dwarf
(TestDataFormatterStdString.StdStringDataFormatterTestCase)
   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/string/TestDataFormatterStdString.py",
line 78, in test_with_run_command
    self.assertEqual(var_uchar.GetSummary(), '"aaaaa"', "u summary wrong")
AssertionError: None != '"aaaaa"' : u summary wrong
Config=x86_64-/home/gcc_builder/10.3.0/bin/gcc
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20210625/9a1c970d/attachment-0001.html>


More information about the lldb-dev mailing list