[Lldb-commits] [lldb] [lldb-dap] Fix TestDap_attach.py flakiness (PR #137278)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 24 21:04:13 PDT 2025
================
@@ -612,7 +612,16 @@ def request_attach(
if gdbRemoteHostname is not None:
args_dict["gdb-remote-hostname"] = gdbRemoteHostname
command_dict = {"command": "attach", "type": "request", "arguments": args_dict}
- return self.send_recv(command_dict)
+ response = self.send_recv(command_dict)
+
+ if response["success"]:
+ # Wait for a 'process' and 'initialized' event in any order
+ first_event = self.wait_for_event(filter=["process", "initialized"])
+ second_event = (
+ "initialized" if first_event["event"] == "process" else "process"
+ )
+ self.wait_for_event(filter=[second_event])
----------------
jeffreytan81 wrote:
Can you make this into a helper method to avoid duplication code?
https://github.com/llvm/llvm-project/pull/137278
More information about the lldb-commits
mailing list