Skip to content

[lldb] Fixed the TestCompletion test running on a remote target #92281

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 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions lldb/test/API/functionalities/completion/TestCompletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,20 @@ def test_process_unload(self):
self, "// Break here", lldb.SBFileSpec("main.cpp")
)
err = lldb.SBError()
self.process().LoadImage(
lldb.SBFileSpec(self.getBuildArtifact("libshared.so")), err
)
if lldb.remote_platform:
self.process().LoadImage(
lldb.SBFileSpec(self.getBuildArtifact("libshared.so")),
lldb.SBFileSpec(
lldbutil.append_to_process_working_directory(self, "libshared.so"),
False,
),
err,
)
else:
self.process().LoadImage(
lldb.SBFileSpec(self.getBuildArtifact("libshared.so")),
err,
)
Copy link
Member

Choose a reason for hiding this comment

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

I think this can be simplified to:

err = lldb.SBError()
local_spec = lldb.SBFileSpec(self.getBuildArtifact("libshared.so"))
remote_spec = lldb.SBFileSpec(lldbutil.append_to_process_working_directory(self, "libshared.so"), false) if lldb.remote_platform else lldb.SBFileSpec()
self.process().LoadImage(local_spec, remote_spec)

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Unfortunately, this ends up modifying the source tree. I'm going to revert this back to the intermediate version.

self.assertSuccess(err)

self.complete_from_to("process unload ", "process unload 0")
Expand Down
Loading