[all-commits] [llvm/llvm-project] 5fe63a: [lldb-dap] Fix flaky test TestDAP_server (#145231)
DrSergei via All-commits
all-commits at lists.llvm.org
Wed Jul 2 04:17:09 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5fe63ae9a3fb7502ce7ed076ea14def97d79e85e
https://github.com/llvm/llvm-project/commit/5fe63ae9a3fb7502ce7ed076ea14def97d79e85e
Author: DrSergei <serzhdruzhok at gmail.com>
Date: 2025-07-02 (Wed, 02 Jul 2025)
Changed paths:
M lldb/test/API/tools/lldb-dap/server/TestDAP_server.py
M lldb/tools/lldb-dap/tool/lldb-dap.cpp
Log Message:
-----------
[lldb-dap] Fix flaky test TestDAP_server (#145231)
This patch fixes a possible data race between main and event handler
threads. Terminated event can be sent from `Disconnect` function or
event handler. Consequently, there are some possible sequences of
events. We must check events twice, because without getting an exited
event, `exit_status` will be None. But, we don't know the order of
events (for example, we can get terminated event before exited event),
so we check events by filter. It is correct, because terminated event
will be sent only once (guarded by `llvm::call_once`).
This patch moved from
[145010](https://github.com/llvm/llvm-project/pull/145010) and based on
idea from this
[comment](https://github.com/llvm/llvm-project/pull/145010#discussion_r2159637210).
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