[all-commits] [llvm/llvm-project] f9338d: [lldb][test] XcodeSDKModuleTests: remove non-deter...
Michael Buch via All-commits
all-commits at lists.llvm.org
Mon Mar 3 14:13:27 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f9338db2cbd219fb9819d30531dafd3a24e0e00d
https://github.com/llvm/llvm-project/commit/f9338db2cbd219fb9819d30531dafd3a24e0e00d
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2025-03-03 (Mon, 03 Mar 2025)
Changed paths:
M lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
Log Message:
-----------
[lldb][test] XcodeSDKModuleTests: remove non-deterministic source mapping checks (#129526)
This assertion was added to check that `RegisterXcodeSDK` will correctly
update the source mappings of the module. However, the source mapping
will only get updated if the `Host::RunShellCommand` call to `xcrun`
succeeded. Even if `xcrun` failed to find an SDK, the source mappings
would get an entry. But if the shell invocation itself failed, then the
mappings are not updated (see
https://github.com/llvm/llvm-project/blob/f6212c1cd3d8b827c7d7e2f6cf54b135c27eacc6/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm#L424-L444).
This means depending on how slow `xcrun` is on a given host, this test
may fail. On my machine this happens consistently in debug and release
builds.
This patch removes this flakey assertion. We unfortunately lost some
test coverage here but I'm not sure there's great alternatives unless we
either:
1. Mock the `xcrun` call somehow (we could maybe pass a callable around
which defaults to `xcrun` in non-test code?)
2. Make a `xcrun` time-out not an error either?
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list