-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[lldb-dap] Fix test: TestDAP_server.py #157924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lldb-dap] Fix test: TestDAP_server.py #157924
Conversation
@llvm/pr-subscribers-lldb Author: Roy Shi (royitaqi) ChangesSee #156803 (comment) for full context. TL;DR
Full diff: https://github.com/llvm/llvm-project/pull/157924.diff 1 Files Affected:
diff --git a/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py b/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py
index 2ab6c7ed24710..12b321cf42778 100644
--- a/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py
+++ b/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py
@@ -127,7 +127,7 @@ def test_connection_timeout_at_server_start(self):
self.start_server(
connection="listen://localhost:0",
connection_timeout=1,
- wait_seconds_for_termination=2,
+ wait_seconds_for_termination=5,
)
@skipIfWindows
@@ -139,7 +139,7 @@ def test_connection_timeout_long_debug_session(self):
(_, connection) = self.start_server(
connection="listen://localhost:0",
connection_timeout=1,
- wait_seconds_for_termination=2,
+ wait_seconds_for_termination=5,
)
# The connection timeout should not cut off the debug session
self.run_debug_session(connection, "Alice", 1.5)
@@ -153,7 +153,7 @@ def test_connection_timeout_multiple_sessions(self):
(_, connection) = self.start_server(
connection="listen://localhost:0",
connection_timeout=1,
- wait_seconds_for_termination=2,
+ wait_seconds_for_termination=5,
)
time.sleep(0.5)
# Should be able to connect to the server.
|
I'm thinking the change is small and safe enough that I will merge without any approval, in the hope that the buildbot will be fixed sooner. I'm open to feedback if this is not a suitable case for such merge. EDIT: Latest update: It seems this patch has fixed the buildbot - it is green now. |
See llvm#156803 (comment) for full context. Summary: * In llvm#156803, we see a builtbot failure for `TestDAP_server.py` on Debian. Note that macOS and other Linux distributions (like CentOS, or whatever Linux the [required buildbot](https://github.com/llvm/llvm-project/actions/runs/17594257911/job/49982560193#logs) uses) seem to pass the tests. * In the 3 newly added tests, the most complex test case passed, while the other easier ones failed. ``` PASS: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_multiple_sessions (TestDAP_server.TestDAP_server.test_connection_timeout_multiple_sessions) FAIL: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_long_debug_session (TestDAP_server.TestDAP_server.test_connection_timeout_long_debug_session) FAIL: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_at_server_start (TestDAP_server.TestDAP_server.test_connection_timeout_at_server_start) ``` * The error is that `process.wait(timeout)` timed out during the teardown of the tests. * The above suggests that maybe the root cause is that the timeout is set too strictly (and that maybe the server termination on Debian is slower than the other Linux distribution for some reason). * This patch loosens that timeout from 2s to 5s. Let's see if this works. * FWIW, I cannot verify the root cause, because I don't have a Debian machine. (cherry picked from commit 11a4f5b)
See #156803 (comment) for full context.
Summary:
--connection-timeout
#156803, we see a builtbot failure forTestDAP_server.py
on Debian. Note that macOS and other Linux distributions (like CentOS, or whatever Linux the required buildbot uses) seem to pass the tests.process.wait(timeout)
timed out during the teardown of the tests.