[all-commits] [llvm/llvm-project] 362b9d: [lldb-dap] Refactoring DebugCommunication to impro...
John Harrison via All-commits
all-commits at lists.llvm.org
Tue Jun 17 14:42:27 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 362b9d78b4ee9107da2b5e90b3764b0f0fa610fe
https://github.com/llvm/llvm-project/commit/362b9d78b4ee9107da2b5e90b3764b0f0fa610fe
Author: John Harrison <harjohn at google.com>
Date: 2025-06-17 (Tue, 17 Jun 2025)
Changed paths:
M lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
M lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
M lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py
M lldb/test/API/tools/lldb-dap/cancel/TestDAP_cancel.py
M lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
M lldb/test/API/tools/lldb-dap/module/TestDAP_module.py
M lldb/test/API/tools/lldb-dap/output/TestDAP_output.py
Log Message:
-----------
[lldb-dap] Refactoring DebugCommunication to improve test consistency. (#143818)
In DebugCommunication, we currently are using 2 thread to drive
lldb-dap. At the moment, they make an attempt at only synchronizing the
`recv_packets` between the reader thread and the main test thread. Other
stateful properties of the debug session are not guarded by a
locks/mutex.
To mitigate this, I am moving any state updates to the main thread
inside the `_recv_packet` method to ensure that between calls to
`_recv_packet` the state does not change out from under us in a test.
This does mean the precise timing of events has changed slightly as a
result and I've updated the existing tests that fail for me locally with
this new behavior.
I think this should result in overall more predictable behavior, even if
the test is slow due to the host workload or architecture differences.
---------
Co-authored-by: Ebuka Ezike <yerimyah1 at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list