[Lldb-commits] [lldb] [lldb-dap] Fix test: TestDAP_server.py (PR #157924)
Roy Shi via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 10 11:32:45 PDT 2025
https://github.com/royitaqi created https://github.com/llvm/llvm-project/pull/157924
See https://github.com/llvm/llvm-project/pull/156803#issuecomment-3275911510 for full context.
TL;DR
* In https://github.com/llvm/llvm-project/pull/156803, we see a builtbot failure for `TestDAP_server.py` on Debian. Note that macOS and other Linux distributions (like CentOS) seem to pass the tests (verified by buildbot in the PR and my local 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 failure is that the `process.wait()` timed out.
* The above suggested 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.
>From f5cfe38c237484c296c25c33de0911bd32f4ad16 Mon Sep 17 00:00:00 2001
From: Roy Shi <royshi at meta.com>
Date: Wed, 10 Sep 2025 11:24:19 -0700
Subject: [PATCH] [lldb-dap] Fix test: TestDAP_server.py
---
lldb/test/API/tools/lldb-dap/server/TestDAP_server.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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.
More information about the lldb-commits
mailing list