summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/thread/create_after_attach
diff options
context:
space:
mode:
authorMichał Górny <mgorny@moritz.systems>2021-02-22 23:39:39 +0100
committerMichał Górny <mgorny@moritz.systems>2021-03-01 16:23:36 +0100
commit15f067f1c79fac34910eaf50f612854eb1d58bb5 (patch)
tree05db7469bbb600244589113b25a56b307f99a8f7 /lldb/test/API/functionalities/thread/create_after_attach
parentc41372c8a1db8fa0bfda25daeca1f5f4f5145439 (diff)
[lldb] [test] Workaround symlink-related test failures
Use realpath() when spawning the executable create_after_attach to workaround a FreeBSD plugin (and possibly others) problem. If the executable is started via a path containing a symlink, it is added to the module list twice -- via the real and apparent path. This in turn cases the requested breakpoint to resolve twice. Use realpath() for main program path in lldb-vscode breakpoint tests to workaround a similar problem. If the passed path does not match the realpath, lldb-vscode does not report the breakpoints as verified and causes tests to fail. Since the underlying problems are non-trivial to fix and the purpose of these tests is not to reproduce symlink problems, let's apply trivial workarounds to make them pass. Differential Revision: https://reviews.llvm.org/D97230
Diffstat (limited to 'lldb/test/API/functionalities/thread/create_after_attach')
-rw-r--r--lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py b/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
index cba6712a8021..e9c85d5025a8 100644
--- a/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
+++ b/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
@@ -25,7 +25,6 @@ class CreateAfterAttachTestCase(TestBase):
# Occasionally hangs on Windows, may be same as other issues.
@skipIfWindows
@skipIfiOSSimulator
- @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr48376")
@expectedFailureNetBSD
def test_create_after_attach(self):
"""Test thread creation after process attach."""
@@ -33,7 +32,8 @@ class CreateAfterAttachTestCase(TestBase):
exe = self.getBuildArtifact("a.out")
# Spawn a new process
- popen = self.spawnSubprocess(exe)
+ # use realpath to workaround llvm.org/pr48376
+ popen = self.spawnSubprocess(os.path.realpath(exe))
pid = popen.pid
# Attach to the spawned process