mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-20 12:05:48 -04:00

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 60 secs, that should be enough hopefully. Larger value could make debugging with hanging `lldb-server` annoying. 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 Differential Revision: https://reviews.llvm.org/D65271 llvm-svn: 367234
52 lines
1.1 KiB
Plaintext
52 lines
1.1 KiB
Plaintext
|
|
/// LLDB C API Test Driver
|
|
|
|
#include <algorithm>
|
|
#include <iostream>
|
|
#include <iterator>
|
|
#include <string>
|
|
#include <vector>
|
|
#if !defined(_MSC_VER)
|
|
#include <signal.h>
|
|
#endif
|
|
|
|
%include_SB_APIs%
|
|
|
|
#include "common.h"
|
|
|
|
using namespace std;
|
|
using namespace lldb;
|
|
|
|
void test(SBDebugger &dbg, std::vector<string> args);
|
|
|
|
int main(int argc, char** argv) {
|
|
|
|
// Ignore SIGPIPE. The lldb driver does this as well,
|
|
// because we seem to get spurious SIGPIPES on some
|
|
// Unixen that take the driver down.
|
|
#if !defined(_MSC_VER)
|
|
signal(SIGPIPE, SIG_IGN);
|
|
#endif
|
|
int code = 0;
|
|
|
|
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 60");
|
|
|
|
try {
|
|
if (!dbg.IsValid())
|
|
throw Exception("invalid debugger");
|
|
vector<string> args(argv + 1, argv + argc);
|
|
|
|
test(dbg, args);
|
|
} catch (Exception &e) {
|
|
cout << "ERROR: " << e.what() << endl;
|
|
code = 1;
|
|
}
|
|
|
|
SBDebugger::Destroy(dbg);
|
|
return code;
|
|
}
|