[Lldb-commits] [PATCH] D97769: [lldb] Apply gdb-remote timeout to platform connections as well

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 2 07:07:20 PST 2021


labath created this revision.
labath added reviewers: JDevlieghere, clayborg.
Herald added a subscriber: kristof.beyls.
labath requested review of this revision.
Herald added a project: LLDB.

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 <https://reviews.llvm.org/rG4b284b9ca8098e284b8d965a633b71bd283043d6>, 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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97769

Files:
  lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
  lldb/test/API/commands/platform/connect/TestPlatformConnect.py
  lldb/test/API/functionalities/gdb_remote_client/TestPlatformClient.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97769.327442.patch
Type: text/x-patch
Size: 4928 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210302/54a5c68b/attachment-0001.bin>


More information about the lldb-commits mailing list