This is an archive of the discontinued LLVM Phabricator instance.

testsuite: Fix TestCompDirSymLink and TestSourceManager on Linux with symlinked build dir
ClosedPublic

Authored by jankratochvil on Feb 20 2019, 11:06 AM.

Details

Summary

Getting failure when building in a directory which is symlinked elsewhere:

Failing Tests (1):
    lldb-Suite :: functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
    lldb-Suite :: source-manager/TestSourceManager.py
runCmd: file /home/jkratoch/redhat/llvm-monorepo-clangassert/lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/CompDirSymLink
output: Current executable set to '/home/jkratoch/redhat/llvm-monorepo-clangassert/lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/CompDirSymLink' (x86_64).
runCmd: settings set plugin.symbol-file.dwarf.comp-dir-symlink-paths /proc/self/cwd
output: None
runCmd: breakpoint set -f "/home/jkratoch/redhat/llvm-monorepo-clangassert/lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/relative.cpp" -l 11
output: Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.

It is because /proc/self/cwd (used above for plugin.symbol-file.dwarf.comp-dir-symlink-paths) points to an already resolved directory:

(cd /tmp;mkdir real;ln -s real symlink;cd symlink;ls -l /proc/self/cwd)
lrwxrwxrwx 1 jkratoch jkratoch 0 Feb 20 19:55 /proc/self/cwd -> /tmp/real/

TestSourceManager is similar.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

jankratochvil created this revision.Feb 20 2019, 11:06 AM
jankratochvil retitled this revision from testsuite: Fix TestCompDirSymLink on Linux with symlinked build dir to testsuite: Fix TestCompDirSymLink and TestSourceManager on Linux with symlinked build dir.
jankratochvil edited the summary of this revision. (Show Details)
labath accepted this revision.Feb 21 2019, 12:40 AM
This revision is now accepted and ready to land.Feb 21 2019, 12:40 AM
This revision was automatically updated to reflect the committed changes.