Skip to content

[lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target #92413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 17, 2024

Conversation

slydiman
Copy link
Contributor

Install _exe_to_attach to a remote target if necessary.

Install `_exe_to_attach` to a remote target if necessary.
@slydiman slydiman requested a review from JDevlieghere as a code owner May 16, 2024 15:18
@llvmbot llvmbot added the lldb label May 16, 2024
@slydiman slydiman requested review from DavidSpickett and labath May 16, 2024 15:19
@llvmbot
Copy link
Member

llvmbot commented May 16, 2024

@llvm/pr-subscribers-lldb

Author: Dmitry Vasilyev (slydiman)

Changes

Install _exe_to_attach to a remote target if necessary.


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

1 Files Affected:

  • (modified) lldb/test/API/tools/lldb-server/attach-wait/TestGdbRemoteAttachWait.py (+9)
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()

@@ -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])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do this inside _set_up_inferior, before assigning to _run_args

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the patch. Thanks.

@slydiman slydiman requested a review from labath May 17, 2024 12:27
Copy link
Collaborator

@labath labath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@slydiman slydiman merged commit d38ea8c into llvm:main May 17, 2024
4 checks passed
qiaojbao pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Jun 5, 2024
…731b835aa

Local branch amd-gfx 2b2731b Merged main:30d0850e0f780b17a37522e6503c98ebe197c5fa into amd-gfx:c4099e191a09
Remote branch main d38ea8c [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (llvm#92413)
@slydiman slydiman deleted the fix-lldb-test-TestGdbRemoteAttachWait branch July 25, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants