From 5976f30821483361c19ac3b2ad927f5fb8de2e48 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 19 Apr 2018 09:38:42 +0000 Subject: Attempt to fix TestMiniDump on windows It was failing because the modules names were coming out as C:\Windows\System32/MSVCP120D.dll (last separator is a forward slash) on windows. There are two issues at play here: - the first problem is that the paths in minidump were being parsed as a host path. This meant that on posix systems the whole path was interpreted as a file name. - on windows the path was split into a directory-filename pair correctly, but then when it was reconsituted, the last separator ended up being a forward slash because SBFileSpec.fullpath was joining them with '/' unconditionally. I fix the first issue by parsing the minidump paths according to the path syntax of the host which produced the dump, which should make the test behavior on posix&windows identical. The last path will still be a forward slash because of the second issue. We should probably fix the "fullpath" property to do something smarter in the future. llvm-svn: 330314 --- .../test/functionalities/postmortem/minidump/TestMiniDump.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lldb/packages/Python/lldbsuite') diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py index cc677e6dcde..7b24d5b01fb 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py @@ -49,12 +49,12 @@ class MiniDumpTestCase(TestBase): self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp") self.assertTrue(self.process, PROCESS_IS_VALID) expected_modules = [ - r"C:\Windows\System32\MSVCP120D.dll", - r"C:\Windows\SysWOW64\kernel32.dll", - r"C:\Users\amccarth\Documents\Visual Studio 2013\Projects\fizzbuzz\Debug\fizzbuzz.exe", - r"C:\Windows\System32\MSVCR120D.dll", - r"C:\Windows\SysWOW64\KERNELBASE.dll", - r"C:\Windows\SysWOW64\ntdll.dll", + r"C:\Windows\System32/MSVCP120D.dll", + r"C:\Windows\SysWOW64/kernel32.dll", + r"C:\Users\amccarth\Documents\Visual Studio 2013\Projects\fizzbuzz\Debug/fizzbuzz.exe", + r"C:\Windows\System32/MSVCR120D.dll", + r"C:\Windows\SysWOW64/KERNELBASE.dll", + r"C:\Windows\SysWOW64/ntdll.dll", ] self.assertEqual(self.target.GetNumModules(), len(expected_modules)) for module, expected in zip(self.target.modules, expected_modules): -- cgit v1.2.3