swiftlang / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Swift’s stable releases of Clang as well as support the Swift project.
https://llvm.org
Other
1.12k stars 330 forks source link

LLDB test fails due to unexpected prefix in address range expression #9637

Open weliveindetail opened 2 hours ago

weliveindetail commented 2 hours ago

The python_api/address_range/TestAddressRange.py test fails in SwiftCI, because the reported range is prefixed with the name of the executable that that won't match the regex:

Expected:     [0x140001020-0x14000103d)
Actual:  a.out[0x140001020-0x14000103d)

Right now, I cannot reproduce it locally (neither swiftlang nor upstream LLDB). Log from CI:

FAIL: test_address_range_print_resolved (TestAddressRange.AddressRangeTestCase)
    Make sure the SBAddressRange can be printed when resolved.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\lldb\test\API\python_api\address_range\TestAddressRange.py", line 194, in test_address_range_print_resolved
    self.assertRegex(result.GetOutput(), "^\[0x[0-9a-f]+\-0x[0-9a-f]+\)")
AssertionError: Regex didn't match: '^\\[0x[0-9a-f]+\\-0x[0-9a-f]+\\)' not found in 'a.out[0x140001020-0x14000103d)\r\n'
Config=x86_64-T:\5\bin\clang.exe
----------------------------------------------------------------------
weliveindetail commented 2 hours ago

In fact, the actual output fits the regex from test_address_range_print_not_resolved(). Is this a resolver issue (even though all the others pass) or a formatting issue? Do we link extra DLL's and the prefix is supposed to disambiguate?

Any good guess @mbucko?