This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Apply gdb-remote timeout to platform connections as well
ClosedPublic

Authored by labath on Mar 2 2021, 7:07 AM.

Details

Summary

We have a plugin.process.gdb-remote.packet-timeout setting, which can be
used to control how long the lldb client is willing to wait before
declaring the server side dead. Our test suite makes use of this
feature, and sets the setting value fairly high, as the low default
value can cause flaky tests, particularly on slower bots.

After fixing TestPlatformConnect (one of the few tests exercising the
remote platform capabilities of lldb) in 4b284b9ca, it immediately
started being flaky on the arm bots. It turns out this is because the
packet-timeout setting is not being applied to platform connections.

This patch makes the platform connections also respect the value of this
setting. This does create a slightly weird dependency, where one plugin
depends on the setting value from another plugin (of a completely
different kind). However, it seemed to me that creating a separate
setting for platform connections would be even more confusing. I'm open
to other ideas, though.

I also add a test which checks that the timeout value is being honored.

Diff Detail

Event Timeline

labath created this revision.Mar 2 2021, 7:07 AM
labath requested review of this revision.Mar 2 2021, 7:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2021, 7:07 AM
This revision is now accepted and ready to land.Mar 2 2021, 10:18 AM
JDevlieghere accepted this revision.Mar 2 2021, 10:23 AM
This revision was landed with ongoing or failed builds.Mar 4 2021, 5:46 AM
This revision was automatically updated to reflect the committed changes.