[Lldb-commits] [lldb] ec9546d - [lldb] Fix TestGdbRemoteForkNonStop.py test (#131293)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 24 01:33:11 PDT 2025
Author: Georgiy Samoylov
Date: 2025-03-24T09:33:08+01:00
New Revision: ec9546d1699457169da5d6456d4080c52f6972f9
URL: https://github.com/llvm/llvm-project/commit/ec9546d1699457169da5d6456d4080c52f6972f9
DIFF: https://github.com/llvm/llvm-project/commit/ec9546d1699457169da5d6456d4080c52f6972f9.diff
LOG: [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
Added:
Modified:
lldb/packages/Python/lldbsuite/test/lldbtest.py
lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 570c36b5f9622..f117aea001e27 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -2024,7 +2024,7 @@ def get_process_working_directory(self):
"""Get the working directory that should be used when launching processes for local or remote processes."""
if lldb.remote_platform:
# Remote tests set the platform working directory up in
- # TestBase.setUp()
+ # Base.setUp()
return lldb.remote_platform.GetWorkingDirectory()
else:
# local tests change directory into each test subdirectory
diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
index 090d4e1bcac95..beb0ecf1b3484 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
@@ -1,6 +1,6 @@
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-
+from lldbsuite.test.lldbutil import append_to_process_working_directory
from fork_testbase import GdbRemoteForkTestBase
@@ -156,8 +156,8 @@ def get_all_output_via_vStdio(self, output_test):
@add_test_categories(["fork"])
def test_c_both_nonstop(self):
- lock1 = self.getBuildArtifact("lock1")
- lock2 = self.getBuildArtifact("lock2")
+ lock1 = lldbutil.append_to_process_working_directory(self, "lock1")
+ lock2 = lldbutil.append_to_process_working_directory(self, "lock2")
parent_pid, parent_tid, child_pid, child_tid = self.start_fork_test(
[
"fork",
@@ -194,8 +194,8 @@ def test_c_both_nonstop(self):
@add_test_categories(["fork"])
def test_vCont_both_nonstop(self):
- lock1 = self.getBuildArtifact("lock1")
- lock2 = self.getBuildArtifact("lock2")
+ lock1 = lldbutil.append_to_process_working_directory(self, "lock1")
+ lock2 = lldbutil.append_to_process_working_directory(self, "lock2")
parent_pid, parent_tid, child_pid, child_tid = self.start_fork_test(
[
"fork",
@@ -227,8 +227,8 @@ def test_vCont_both_nonstop(self):
self.assertIn("PID: {}".format(int(child_pid, 16)).encode(), output)
def vCont_both_nonstop_test(self, vCont_packet):
- lock1 = self.getBuildArtifact("lock1")
- lock2 = self.getBuildArtifact("lock2")
+ lock1 = lldbutil.append_to_process_working_directory(self, "lock1")
+ lock2 = lldbutil.append_to_process_working_directory(self, "lock2")
parent_pid, parent_tid, child_pid, child_tid = self.start_fork_test(
[
"fork",
More information about the lldb-commits
mailing list