summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py13
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/relative_module_name.yaml17
2 files changed, 29 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
index 8a69d1cadb6..b0e9f1dff22 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
@@ -34,7 +34,7 @@ class MiniDumpUUIDTestCase(TestBase):
self.assertEqual(verify_uuid, uuid)
def get_minidump_modules(self, yaml_file):
- minidump_path = self.getBuildArtifact(yaml_file + ".dmp")
+ minidump_path = self.getBuildArtifact(os.path.basename(yaml_file) + ".dmp")
self.yaml2obj(yaml_file, minidump_path)
self.target = self.dbg.CreateTarget(None)
self.process = self.target.LoadCore(minidump_path)
@@ -166,3 +166,14 @@ class MiniDumpUUIDTestCase(TestBase):
self.verify_module(modules[0],
"/invalid/path/on/current/system/libuuidmismatch.so",
"7295E17C-6668-9E05-CBB5-DEE5003865D5")
+
+ def test_relative_module_name(self):
+ old_cwd = os.getcwd()
+ self.addTearDownHook(lambda: os.chdir(old_cwd))
+ os.chdir(self.getBuildDir())
+ name = "file-with-a-name-unlikely-to-exist-in-the-current-directory.so"
+ open(name, "a").close()
+ modules = self.get_minidump_modules(
+ self.getSourcePath("relative_module_name.yaml"))
+ self.assertEqual(1, len(modules))
+ self.verify_module(modules[0], name, None)
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/relative_module_name.yaml b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/relative_module_name.yaml
new file mode 100644
index 00000000000..23f2b490280
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/relative_module_name.yaml
@@ -0,0 +1,17 @@
+--- !minidump
+Streams:
+ - Type: SystemInfo
+ Processor Arch: AMD64
+ Platform ID: Linux
+ CSD Version: '15E216'
+ CPU:
+ Vendor ID: GenuineIntel
+ Version Info: 0x00000000
+ Feature Info: 0x00000000
+ - Type: ModuleList
+ Modules:
+ - Base of Image: 0x0000000000001000
+ Size of Image: 0x00001000
+ Module Name: 'file-with-a-name-unlikely-to-exist-in-the-current-directory.so'
+ CodeView Record: ''
+...
OpenPOWER on IntegriCloud