Skip to content

Commit ec9546d

Browse files
authored
[lldb] Fix TestGdbRemoteForkNonStop.py test (#131293)
During lldb testing on remote targets TestGdbRemoteForkNonStop.py freezes because in this test we try to create file on remote machine using absolute file path from local machine. This patch fixes this error
1 parent c457c88 commit ec9546d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lldb/packages/Python/lldbsuite/test/lldbtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,7 @@ def get_process_working_directory(self):
20242024
"""Get the working directory that should be used when launching processes for local or remote processes."""
20252025
if lldb.remote_platform:
20262026
# Remote tests set the platform working directory up in
2027-
# TestBase.setUp()
2027+
# Base.setUp()
20282028
return lldb.remote_platform.GetWorkingDirectory()
20292029
else:
20302030
# local tests change directory into each test subdirectory

lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from lldbsuite.test.decorators import *
22
from lldbsuite.test.lldbtest import *
3-
3+
from lldbsuite.test.lldbutil import append_to_process_working_directory
44
from fork_testbase import GdbRemoteForkTestBase
55

66

@@ -156,8 +156,8 @@ def get_all_output_via_vStdio(self, output_test):
156156

157157
@add_test_categories(["fork"])
158158
def test_c_both_nonstop(self):
159-
lock1 = self.getBuildArtifact("lock1")
160-
lock2 = self.getBuildArtifact("lock2")
159+
lock1 = lldbutil.append_to_process_working_directory(self, "lock1")
160+
lock2 = lldbutil.append_to_process_working_directory(self, "lock2")
161161
parent_pid, parent_tid, child_pid, child_tid = self.start_fork_test(
162162
[
163163
"fork",
@@ -194,8 +194,8 @@ def test_c_both_nonstop(self):
194194

195195
@add_test_categories(["fork"])
196196
def test_vCont_both_nonstop(self):
197-
lock1 = self.getBuildArtifact("lock1")
198-
lock2 = self.getBuildArtifact("lock2")
197+
lock1 = lldbutil.append_to_process_working_directory(self, "lock1")
198+
lock2 = lldbutil.append_to_process_working_directory(self, "lock2")
199199
parent_pid, parent_tid, child_pid, child_tid = self.start_fork_test(
200200
[
201201
"fork",
@@ -227,8 +227,8 @@ def test_vCont_both_nonstop(self):
227227
self.assertIn("PID: {}".format(int(child_pid, 16)).encode(), output)
228228

229229
def vCont_both_nonstop_test(self, vCont_packet):
230-
lock1 = self.getBuildArtifact("lock1")
231-
lock2 = self.getBuildArtifact("lock2")
230+
lock1 = lldbutil.append_to_process_working_directory(self, "lock1")
231+
lock2 = lldbutil.append_to_process_working_directory(self, "lock2")
232232
parent_pid, parent_tid, child_pid, child_tid = self.start_fork_test(
233233
[
234234
"fork",

0 commit comments

Comments
 (0)