Fixing new Minidump plugin tests
authorDimitar Vlahovski <dvlahovski@google.com>
Wed, 5 Oct 2016 14:35:30 +0000 (14:35 +0000)
committerDimitar Vlahovski <dvlahovski@google.com>
Wed, 5 Oct 2016 14:35:30 +0000 (14:35 +0000)
llvm-svn: 283321

lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64 [new file with mode: 0755]
lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed [new file with mode: 0755]

index a8e0f94..cebcd36 100644 (file)
@@ -18,22 +18,20 @@ class MiniDumpNewTestCase(TestBase):
 
     NO_DEBUG_INFO_TESTCASE = True
 
-    @expectedFailureAll
-    def test_process_info_in_mini_dump(self):
+    def test_process_info_in_minidump(self):
         """Test that lldb can read the process information from the Minidump."""
         # target create -c linux-x86_64.dmp
-        self.dbg.CreateTarget("")
+        self.dbg.CreateTarget(None)
         self.target = self.dbg.GetSelectedTarget()
         self.process = self.target.LoadCore("linux-x86_64.dmp")
         self.assertTrue(self.process, PROCESS_IS_VALID)
         self.assertEqual(self.process.GetNumThreads(), 1)
         self.assertEqual(self.process.GetProcessID(), 16001)
 
-    @expectedFailureAll
-    def test_thread_info_in_mini_dump(self):
+    def test_thread_info_in_minidump(self):
         """Test that lldb can read the thread information from the Minidump."""
         # target create -c linux-x86_64.dmp
-        self.dbg.CreateTarget("")
+        self.dbg.CreateTarget(None)
         self.target = self.dbg.GetSelectedTarget()
         self.process = self.target.LoadCore("linux-x86_64.dmp")
         # This process crashed due to a segmentation fault in its
@@ -44,11 +42,10 @@ class MiniDumpNewTestCase(TestBase):
         stop_description = thread.GetStopDescription(256)
         self.assertTrue("SIGSEGV" in stop_description)
 
-    @expectedFailureAll
-    def test_stack_info_in_mini_dump(self):
+    def test_stack_info_in_minidump(self):
         """Test that we can see a trivial stack in a breakpad-generated Minidump."""
-        # target create -c linux-x86_64.dmp
-        self.dbg.CreateTarget("")
+        # target create linux-x86_64 -c linux-x86_64.dmp
+        self.dbg.CreateTarget("linux-x86_64")
         self.target = self.dbg.GetSelectedTarget()
         self.process = self.target.LoadCore("linux-x86_64.dmp")
         self.assertEqual(self.process.GetNumThreads(), 1)
@@ -65,11 +62,10 @@ class MiniDumpNewTestCase(TestBase):
         self.assertTrue(eip.IsValid())
         self.assertEqual(pc, eip.GetValueAsUnsigned())
 
-    @expectedFailureAll
     def test_snapshot_minidump(self):
         """Test that if we load a snapshot minidump file (meaning the process did not crash) there is no stop reason."""
         # target create -c linux-x86_64_not_crashed.dmp
-        self.dbg.CreateTarget("")
+        self.dbg.CreateTarget(None)
         self.target = self.dbg.GetSelectedTarget()
         self.process = self.target.LoadCore("linux-x86_64_not_crashed.dmp")
         self.assertEqual(self.process.GetNumThreads(), 1)
@@ -78,11 +74,11 @@ class MiniDumpNewTestCase(TestBase):
         stop_description = thread.GetStopDescription(256)
         self.assertEqual(stop_description, None)
 
-    @expectedFailureAll
-    def test_deeper_stack_in_mini_dump(self):
+    def test_deeper_stack_in_minidump(self):
         """Test that we can examine a more interesting stack in a Minidump."""
         # Launch with the Minidump, and inspect the stack.
-        target = self.dbg.CreateTarget(None)
+        # target create linux-x86_64_not_crashed -c linux-x86_64_not_crashed.dmp
+        target = self.dbg.CreateTarget("linux-x86_64_not_crashed")
         process = target.LoadCore("linux-x86_64_not_crashed.dmp")
         thread = process.GetThreadAtIndex(0)
 
@@ -94,11 +90,11 @@ class MiniDumpNewTestCase(TestBase):
             function_name = frame.GetFunctionName()
             self.assertTrue(name in function_name)
 
-    @expectedFailureAll
-    def test_local_variables_in_mini_dump(self):
+    def test_local_variables_in_minidump(self):
         """Test that we can examine local variables in a Minidump."""
         # Launch with the Minidump, and inspect a local variable.
-        target = self.dbg.CreateTarget(None)
+        # target create linux-x86_64_not_crashed -c linux-x86_64_not_crashed.dmp
+        target = self.dbg.CreateTarget("linux-x86_64_not_crashed")
         process = target.LoadCore("linux-x86_64_not_crashed.dmp")
         thread = process.GetThreadAtIndex(0)
         frame = thread.GetFrameAtIndex(1)
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64 b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64
new file mode 100755 (executable)
index 0000000..bd63cd9
Binary files /dev/null and b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64 differ
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed
new file mode 100755 (executable)
index 0000000..e204cf0
Binary files /dev/null and b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed differ