Author: labath Date: Thu Oct 26 12:08:34 2017 New Revision: 316688 URL: http://llvm.org/viewvc/llvm-project?rev=316688&view=rev Log: Fix TestMinidump for r316673
The test was asserting that we can only find one frame in the minidump. Now that we have the default unwind plan from the ABI plugin, we are able to find 5 more frames using the frame pointer chaining. Correct the expectation in the test. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py?rev=316688&r1=316687&r2=316688&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py Thu Oct 26 12:08:34 2017 @@ -49,14 +49,14 @@ class MiniDumpTestCase(TestBase): self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp") self.assertEqual(self.process.GetNumThreads(), 1) thread = self.process.GetThreadAtIndex(0) - # The crash is in main, so there should be one frame on the stack. - self.assertEqual(thread.GetNumFrames(), 1) - frame = thread.GetFrameAtIndex(0) - self.assertTrue(frame.IsValid()) - pc = frame.GetPC() - eip = frame.FindRegister("pc") - self.assertTrue(eip.IsValid()) - self.assertEqual(pc, eip.GetValueAsUnsigned()) + + pc_list = [ 0x00164d14, 0x00167c79, 0x00167e6d, 0x7510336a, 0x77759882, 0x77759855] + + self.assertEqual(thread.GetNumFrames(), len(pc_list)) + for i in range(len(pc_list)): + frame = thread.GetFrameAtIndex(i) + self.assertTrue(frame.IsValid()) + self.assertEqual(frame.GetPC(), pc_list[i]) @skipUnlessWindows # Minidump saving works only on windows def test_deeper_stack_in_mini_dump(self): _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits