jankratochvil created this revision. jankratochvil added reviewers: aprantl, labath, clayborg. jankratochvil added a project: LLDB. Herald added subscribers: lldb-commits, abidh.
rL357954 <https://reviews.llvm.org/rL357954> did increase `packet-timeout` 1sec -> 5secs. Which is IMO about the maximum timeout reasonable for regular use. But for testsuite I think the timeout should be higher as the testsuite runs in parallel and it can be run even on slow hosts and with other load (moreover if it runs on some slow arch). I have chosen 300 secs, I do not mind lower but it should be >=60 I think. I agree these testsuite settings together with `symbols.enable-external-lookup` should be unified to a single place but that can be some other patch. This patch was based on this testsuite timeout: http://lab.llvm.org:8014/builders/lldb-x86_64-fedora/builds/546/steps/test/logs/stdio FAIL: test_connect (TestGDBRemoteClient.TestGDBRemoteClient) Test connecting to a remote gdb server ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py", line 13, in test_connect process = self.connect(target) File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py", line 480, in connect self.assertTrue(error.Success(), error.description) AssertionError: False is not True : failed to get reply to handshake packet Repository: rLLDB LLDB https://reviews.llvm.org/D65271 Files: lldb/lit/lit-lldb-init.in lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py lldb/packages/Python/lldbsuite/test/lldbtest.py lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/tools/lldb-test/lldb-test.cpp
Index: lldb/tools/lldb-test/lldb-test.cpp =================================================================== --- lldb/tools/lldb-test/lldb-test.cpp +++ lldb/tools/lldb-test/lldb-test.cpp @@ -976,6 +976,12 @@ auto Dbg = lldb_private::Debugger::CreateInstance(); ModuleList::GetGlobalModuleListProperties().SetEnableExternalLookup(false); + // Unable to get: + // GetGlobalPluginProperties()->SetPacketTimeout(std::chrono::seconds(300)); + CommandReturnObject Result; + Dbg->GetCommandInterpreter().HandleCommand( + "settings set plugin.process.gdb-remote.packet-timeout 300", + /*add_to_history*/ eLazyBoolNo, Result); if (!opts::Log.empty()) Dbg->EnableLog("lldb", {"all"}, opts::Log, 0, errs()); Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -211,6 +211,7 @@ // may take a little longer than normal to receive a reply. Wait at least // 6 seconds for a reply to this packet. + // 6 secs are still not sufficient; this line is not to be checked-in. ScopedTimeout timeout(*this, std::max(GetPacketTimeout(), seconds(6))); StringExtractorGDBRemote response; Index: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py =================================================================== --- lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py +++ lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py @@ -448,7 +448,8 @@ if trace: args_dict['trace'] = trace args_dict['initCommands'] = [ - 'settings set symbols.enable-external-lookup false'] + 'settings set symbols.enable-external-lookup false', + 'settings set plugin.process.gdb-remote.packet-timeout 300'] if initCommands: args_dict['initCommands'].extend(initCommands) if preRunCommands: @@ -579,7 +580,8 @@ if trace: args_dict['trace'] = trace args_dict['initCommands'] = [ - 'settings set symbols.enable-external-lookup false'] + 'settings set symbols.enable-external-lookup false', + 'settings set plugin.process.gdb-remote.packet-timeout 300'] if initCommands: args_dict['initCommands'].extend(initCommands) if preRunCommands: Index: lldb/packages/Python/lldbsuite/test/lldbtest.py =================================================================== --- lldb/packages/Python/lldbsuite/test/lldbtest.py +++ lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -716,7 +716,9 @@ else: self.lldbVSCodeExec = None - self.lldbOption = "-o 'settings set symbols.enable-external-lookup false'" + self.lldbOption = ( + "-o 'settings set symbols.enable-external-lookup false'" + " -o 'settings set plugin.process.gdb-remote.packet-timeout 300'") # If we spawn an lldb process for test (via pexpect), do not load the # init file unless told otherwise. @@ -1864,6 +1866,9 @@ # differ in the debug info, which is not being hashed. self.runCmd('settings set symbols.enable-external-lookup false') + # Testsuite runs in parallel and the host can have also other load. + self.runCmd('settings set plugin.process.gdb-remote.packet-timeout 300') + # Disable color. self.runCmd("settings set use-color false") Index: lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py =================================================================== --- lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py +++ lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py @@ -21,6 +21,7 @@ def threadStopInfo(self, threadnum): if threadnum == 0x1ff0d: return "T02thread:1ff0d;thread-pcs:10001bc00;" + return "" def setBreakpoint(self, packet): if packet.startswith("Z2,"): Index: lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template =================================================================== --- lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template +++ lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template @@ -32,6 +32,7 @@ SBDebugger::Initialize(); SBDebugger dbg = SBDebugger::Create(); dbg.HandleCommand("settings set symbols.enable-external-lookup false"); + dbg.HandleCommand("settings set plugin.process.gdb-remote.packet-timeout 300"); try { if (!dbg.IsValid()) Index: lldb/lit/lit-lldb-init.in =================================================================== --- lldb/lit/lit-lldb-init.in +++ lldb/lit/lit-lldb-init.in @@ -1,3 +1,4 @@ # LLDB init file for the LIT tests. settings set symbols.enable-external-lookup false +settings set plugin.process.gdb-remote.packet-timeout 300 settings set interpreter.echo-comment-commands false
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits