From 379f24ffde03d1730f1e8332574865277a5478fe Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Thu, 8 Jul 2021 18:08:11 -0700 Subject: 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. --- lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp') 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 trace_type_or_err = - client.SendTraceSupported()) { + client.SendTraceSupported(timeout)) { trace_type = *trace_type_or_err; error_message = ""; return true; -- cgit v1.1