[Lldb-commits] [lldb] [lldb] Fixed the test TestQuoting (PR #91886)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Sun May 12 07:10:10 PDT 2024


https://github.com/slydiman created https://github.com/llvm/llvm-project/pull/91886

os.path.join() uses the path separator of the host OS by default. outfile_arg will be incorrect in case of Windows host and Linux target. Use lldbutil.append_to_process_working_directory() instead.

>From f6135c1b825afd9fe733b845dfd12ffe3c162840 Mon Sep 17 00:00:00 2001
From: Dmitry Vasilyev <dvassiliev at accesssoftek.com>
Date: Sun, 12 May 2024 18:08:50 +0400
Subject: [PATCH] [lldb] Fixed the test TestQuoting

os.path.join() uses the path separator of the host OS by default. outfile_arg will be incorrect in case of Windows host and Linux target. Use lldbutil.append_to_process_working_directory() instead.
---
 lldb/test/API/commands/settings/quoting/TestQuoting.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/test/API/commands/settings/quoting/TestQuoting.py b/lldb/test/API/commands/settings/quoting/TestQuoting.py
index 393f4be3c8242..d6246a5309c5d 100644
--- a/lldb/test/API/commands/settings/quoting/TestQuoting.py
+++ b/lldb/test/API/commands/settings/quoting/TestQuoting.py
@@ -51,8 +51,8 @@ def expect_args(self, args_in, args_out):
         outfile = self.getBuildArtifact(filename)
 
         if lldb.remote_platform:
-            outfile_arg = os.path.join(
-                lldb.remote_platform.GetWorkingDirectory(), filename
+            outfile_arg = lldbutil.append_to_process_working_directory(
+                self, filename
             )
         else:
             outfile_arg = outfile



More information about the lldb-commits mailing list