[PATCH] D65129: Test load unloading of modules with libraries-svr4

António Afonso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 11:14:08 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL367247: Test load unloading of modules with libraries-svr4 (authored by aadsm, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D65129?vs=211242&id=212202#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65129/new/

https://reviews.llvm.org/D65129

Files:
  lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py


Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
@@ -93,6 +93,13 @@
                         "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 @@
     @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 @@
 
     @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 @@
     @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()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65129.212202.patch
Type: text/x-patch
Size: 3259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190729/4a4f396e/attachment.bin>


More information about the llvm-commits mailing list