[Lldb-commits] [PATCH] D74295: [lldb] [testsuite] TestGdbRemoteLibrariesSvr4Support: Fix symlinked builddir

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Feb 9 04:50:47 PST 2020


jankratochvil created this revision.
jankratochvil added reviewers: aadsm, labath.
jankratochvil added a project: LLDB.
jankratochvil added a comment.

That testcase has been created by D62502 <https://reviews.llvm.org/D62502>.


When I have symlinked builddir on Fedora 31 x86_64 I get:

  FAIL: test_libraries_svr4_libs_present (TestGdbRemoteLibrariesSvr4Support.TestGdbRemoteLibrariesSvr4Support)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/decorators.py", line 140, in wrapper
      func(*args, **kwargs)
    File "/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/decorators.py", line 110, in wrapper
      func(*args, **kwargs)
    File "/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py", line 133, in test_libraries_svr4_libs_present
      self.libraries_svr4_libs_present()
    File "/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py", line 106, in libraries_svr4_libs_present
      self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
  AssertionError: '/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/lldb-test-build.noindex/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.test_libraries_svr4_libs_present/libsvr4lib_a.so' not found in ['/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/linux-vdso.so.1', '/quad/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/lldb-test-build.noindex/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.test_libraries_svr4_libs_present/libsvr4lib_a.so', '/quad/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/lldb-test-build.noindex/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.test_libraries_svr4_libs_present/libsvr4lib_b".so', '/usr/lib64/libdl-2.30.so', '/usr/lib64/libstdc++.so.6.0.27', '/usr/lib64/libm-2.30.so', '/usr/lib64/libgcc_s-9-20190827.so.1', '/usr/lib64/libc-2.30.so', '/usr/lib64/ld-2.30.so']
  Config=x86_64-/quad/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/bin/clang-11
  ----------------------------------------------------------------------

I think the fix is trivial, right?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74295

Files:
  lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py


Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
+++ lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
@@ -103,7 +103,7 @@
             name = child.attrib.get("name")
             libraries_svr4_names.append(os.path.realpath(name))
         for lib in self.get_expected_libs():
-            self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
+            self.assertIn(os.path.realpath(self.getBuildDir() + "/" + lib), libraries_svr4_names)
 
     @llgs_test
     @skipUnlessPlatform(["linux", "android", "netbsd"])


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74295.243443.patch
Type: text/x-patch
Size: 832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200209/cca81d28/attachment.bin>


More information about the lldb-commits mailing list