aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2021-07-08 18:08:11 -0700
committerJim Ingham <jingham@apple.com>2021-07-12 14:20:49 -0700
commit379f24ffde03d1730f1e8332574865277a5478fe (patch)
treea909065866440d445291e8d71a43c2f2b80d866f /lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
parent35909ff6cf27373efa6f1974d4ad349beb6959a0 (diff)
downloadllvm-379f24ffde03d1730f1e8332574865277a5478fe.zip
llvm-379f24ffde03d1730f1e8332574865277a5478fe.tar.gz
llvm-379f24ffde03d1730f1e8332574865277a5478fe.tar.bz2
Revert "Revert "Reset the wakeup timeout when we re-enter the continue wait.""
This reverts commit 82a38837150099288a1262391ef43e1fd69ffde4. The original version had a copy-paste error: using the Interrupt timeout for the ResumeSynchronous wait, which is clearly wrong. This error would have been evident with real use, but the interrupt is long enough that it only caused one testsuite failure (in the Swift fork). Anyway, I found that mistake and fixed it and checked all the other places where I had to plumb through a timeout, and added a test with a short interrupt timeout stepping over a function that takes 3x the interrupt timeout to complete, so that should detect a similar mistake in the future.
Diffstat (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp')
-rw-r--r--lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
index 45e0356..7818092 100644
--- a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
+++ b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
@@ -384,8 +384,9 @@ TEST_F(GDBRemoteCommunicationClientTest, SendTraceSupportedPacket) {
TraceSupportedResponse trace_type;
std::string error_message;
auto callback = [&] {
+ std::chrono::seconds timeout(10);
if (llvm::Expected<TraceSupportedResponse> trace_type_or_err =
- client.SendTraceSupported()) {
+ client.SendTraceSupported(timeout)) {
trace_type = *trace_type_or_err;
error_message = "";
return true;