[Lldb-commits] [lldb] [lldb][Windows] Compare real paths in TestReplaceDLL (PR #226177)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 24 07:15:27 PDT 2026


https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/226177

lldb reports a module's canonical path, which differs from the build artifact path when the build tree is reached through a subst drive (`S:\...` vs `C:\S\...`). Compare real paths instead.

Fixes `windows/launch/replace-dll/TestReplaceDLL.py` in swiftlang CI where we use subst drives.

>From 62b9d4a0243264627ab051ba8e4f06704c870709 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Thu, 24 Sep 2026 15:14:22 +0100
Subject: [PATCH] [lldb][Windows] Compare real paths in TestReplaceDLL

---
 lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py b/lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py
index 83250f1700666..14000a1cd137f 100644
--- a/lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py
+++ b/lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py
@@ -47,7 +47,9 @@ def test(self):
 
         module = next((m for m in target.modules if "foo" in m.file.basename), None)
         self.assertIsNotNone(module)
-        self.assertEqual(module.file.fullpath, foo)
+        # lldb reports the canonical path, which differs from the build
+        # artifact path when the build tree is reached through a subst drive.
+        self.assertEqual(os.path.realpath(module.file.fullpath), os.path.realpath(foo))
 
         target.RemoveModule(module)
         del module



More information about the lldb-commits mailing list