[Lldb-commits] [lldb] [lldb-dap] Fix test: TestDAP_server.py (PR #157924)

via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 10 11:33:19 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Roy Shi (royitaqi)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/157924.diff


1 Files Affected:

- (modified) lldb/test/API/tools/lldb-dap/server/TestDAP_server.py (+3-3) 


``````````diff
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.

``````````

</details>


https://github.com/llvm/llvm-project/pull/157924


More information about the lldb-commits mailing list