[Lldb-commits] [PATCH] D68618: test fix: TestLoadUsingPaths should use realpath

Lawrence D'Anna via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 7 18:06:35 PDT 2019


lawrence_danna created this revision.
lawrence_danna added reviewers: JDevlieghere, jasonmolenda, labath.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

TestLoadUsingPaths will fail if the build directory has
symlinks in its path, because the real paths reported by
the debugger won't match the symlink-laden paths it's expecting.

This can be solved just by using os.path.realpath on the base
path for the test.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68618

Files:
  lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py


Index: lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py
+++ lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py
@@ -33,7 +33,7 @@
             ext = 'dylib'
         self.lib_name = 'libloadunload.' + ext
 
-        self.wd = self.getBuildDir()
+        self.wd = os.path.realpath(self.getBuildDir())
         self.hidden_dir = os.path.join(self.wd, 'hidden')
         self.hidden_lib = os.path.join(self.hidden_dir, self.lib_name)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68618.223714.patch
Type: text/x-patch
Size: 678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191008/99068da1/attachment.bin>


More information about the lldb-commits mailing list