summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
diff options
context:
space:
mode:
authorAntonio Afonso <antonio.afonso@gmail.com>2019-07-29 18:12:55 +0000
committerAntonio Afonso <antonio.afonso@gmail.com>2019-07-29 18:12:55 +0000
commitfce596160abf9d6b6793f602d3a432fb9d6c459e (patch)
tree81d82916cc584b63b00730def587e96b72b41709 /lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
parent5bf16ec02b82c0e2502308c0ba36810b303ead0f (diff)
downloadbcm5719-llvm-fce596160abf9d6b6793f602d3a432fb9d6c459e.tar.gz
bcm5719-llvm-fce596160abf9d6b6793f602d3a432fb9d6c459e.zip
Test load unloading of modules with libraries-svr4
Summary: This doubles the 3 tests running right now on linux by also executing each test with libraries-svr4 enabled. Not sure if there's a better way to do this as I had to copy/paste all the decorators as well... Reviewers: labath, clayborg, xiaobai Reviewed By: labath Subscribers: srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65129 llvm-svn: 367247
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
index cc633dcc14b..c3d12666df7 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
@@ -93,6 +93,13 @@ class LoadUnloadTestCase(TestBase):
"Unable copy 'libloadunload_d.so' to '%s'.\n>>> %s" %
(wd, err.GetCString()))
+ def setSvr4Support(self, enabled):
+ self.runCmd(
+ "settings set plugin.process.gdb-remote.use-libraries-svr4 {enabled}".format(
+ enabled="true" if enabled else "false"
+ )
+ )
+
# libloadunload_d.so does not appear in the image list because executable
# dependencies are resolved relative to the debuggers PWD. Bug?
@expectedFailureAll(oslist=["linux"])
@@ -224,6 +231,20 @@ class LoadUnloadTestCase(TestBase):
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently
def test_lldb_process_load_and_unload_commands(self):
+ self.setSvr4Support(False)
+ self.run_lldb_process_load_and_unload_commands()
+
+ @expectedFailureAll(
+ bugnumber="llvm.org/pr25805",
+ hostoslist=["windows"],
+ triple='.*-android')
+ @skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
+ @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently
+ def test_lldb_process_load_and_unload_commands_with_svr4(self):
+ self.setSvr4Support(True)
+ self.run_lldb_process_load_and_unload_commands()
+
+ def run_lldb_process_load_and_unload_commands(self):
"""Test that lldb process load/unload command work correctly."""
self.copy_shlibs_to_remote()
@@ -295,6 +316,15 @@ class LoadUnloadTestCase(TestBase):
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
def test_load_unload(self):
+ self.setSvr4Support(False)
+ self.run_load_unload()
+
+ @skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
+ def test_load_unload_with_svr4(self):
+ self.setSvr4Support(True)
+ self.run_load_unload()
+
+ def run_load_unload(self):
"""Test breakpoint by name works correctly with dlopen'ing."""
self.copy_shlibs_to_remote()
@@ -335,6 +365,16 @@ class LoadUnloadTestCase(TestBase):
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently
def test_step_over_load(self):
+ self.setSvr4Support(False)
+ self.run_step_over_load()
+
+ @skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
+ @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently
+ def test_step_over_load_with_svr4(self):
+ self.setSvr4Support(True)
+ self.run_step_over_load()
+
+ def run_step_over_load(self):
"""Test stepping over code that loads a shared library works correctly."""
self.copy_shlibs_to_remote()
OpenPOWER on IntegriCloud