[Lldb-commits] [lldb] [lldb] Fix TestGdbRemoteForkNonStop.py test (PR #131293)
Georgiy Samoylov via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 19 06:00:08 PDT 2025
https://github.com/sga-sc updated https://github.com/llvm/llvm-project/pull/131293
>From 09aa2a57cdc4be801589141390c02d0f1991cf45 Mon Sep 17 00:00:00 2001
From: Georgiy Samoylov <g.samoylov at syntacore.com>
Date: Wed, 19 Mar 2025 15:50:00 +0300
Subject: [PATCH 1/2] [lldb] Rewrote with lldbutil function
---
.../tools/lldb-server/TestGdbRemoteForkNonStop.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
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",
>From 77f27179c14defcaa4e5aab02dd197d3fcf82e18 Mon Sep 17 00:00:00 2001
From: Georgiy Samoylov <g.samoylov at syntacore.com>
Date: Wed, 19 Mar 2025 15:58:49 +0300
Subject: [PATCH 2/2] [lldb] Fixed typo
---
lldb/packages/Python/lldbsuite/test/lldbtest.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 590024ef77119..b3397648ad619 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -2022,7 +2022,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
More information about the lldb-commits
mailing list