[Lldb-commits] [lldb] [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (PR #92413)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Thu May 16 08:18:54 PDT 2024


https://github.com/slydiman created https://github.com/llvm/llvm-project/pull/92413

Install `_exe_to_attach` to a remote target if necessary.

>From d88cc6d992e1f753066aa5dccaa510d8a0a35b94 Mon Sep 17 00:00:00 2001
From: Dmitry Vasilyev <dvassiliev at accesssoftek.com>
Date: Thu, 16 May 2024 19:18:21 +0400
Subject: [PATCH] [lldb] Fixed the test TestGdbRemoteAttachWait running on a
 remote target

Install `_exe_to_attach` to a remote target if necessary.
---
 .../lldb-server/attach-wait/TestGdbRemoteAttachWait.py   | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lldb/test/API/tools/lldb-server/attach-wait/TestGdbRemoteAttachWait.py b/lldb/test/API/tools/lldb-server/attach-wait/TestGdbRemoteAttachWait.py
index f4c31fe2f5c07..a8333210a72b1 100644
--- a/lldb/test/API/tools/lldb-server/attach-wait/TestGdbRemoteAttachWait.py
+++ b/lldb/test/API/tools/lldb-server/attach-wait/TestGdbRemoteAttachWait.py
@@ -52,6 +52,9 @@ def test_attach_with_vAttachWait(self):
         server = self.connect_to_debug_monitor()
         self.do_handshake()
 
+        if self._run_args:
+            self._run_args[0] = lldbutil.install_to_target(self, self._run_args[0])
+
         # Launch the first inferior (we shouldn't attach to this one).
         self._launch_and_wait_for_init()
 
@@ -101,6 +104,9 @@ def test_launch_before_attach_with_vAttachOrWait(self):
         server = self.connect_to_debug_monitor()
         self.do_handshake()
 
+        if self._run_args:
+            self._run_args[0] = lldbutil.install_to_target(self, self._run_args[0])
+
         inferior = self._launch_and_wait_for_init()
 
         # Add attach packets.
@@ -141,6 +147,9 @@ def test_launch_after_attach_with_vAttachOrWait(self):
         server = self.connect_to_debug_monitor()
         self.do_handshake()
 
+        if self._run_args:
+            self._run_args[0] = lldbutil.install_to_target(self, self._run_args[0])
+
         self.test_sequence.add_log_lines([self._attach_packet("vAttachOrWait")], True)
         # Run the stream until attachWait.
         context = self.expect_gdbremote_sequence()



More information about the lldb-commits mailing list