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

via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 24 07:16:17 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/226177.diff


1 Files Affected:

- (modified) lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py (+3-1) 


``````````diff
diff --git a/lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py b/lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py
index 83250f17006661..14000a1cd137f3 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

``````````

</details>


https://github.com/llvm/llvm-project/pull/226177


More information about the lldb-commits mailing list