[Lldb-commits] [PATCH] D76407: [lldb/testsuite] Remove "healthy process" test from TestProcessCrashInfo.py

Frederic Riss via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 18 21:42:15 PDT 2020


friss created this revision.
friss added reviewers: mib, jingham.
Herald added a project: LLDB.

The crash info annotations are not necessarily indicative of a
crash. Some APIs will set them before doing something risk and
clean them up after, while some others might just leave a breadcrumb
there for the whole dureation of the process.

The latter happens for dyld on iOS. Dependeing on how the process is
launched, it will leave some information it its crash_info annotations
about its configuration.

This makes the test fail because it expects to find an empty crash
info struct when the process is running happily. This patch just
deletes this test, but I'm happy to consider other alternatives.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76407

Files:
  lldb/test/API/functionalities/process_crash_info/TestProcessCrashInfo.py


Index: lldb/test/API/functionalities/process_crash_info/TestProcessCrashInfo.py
===================================================================
--- lldb/test/API/functionalities/process_crash_info/TestProcessCrashInfo.py
+++ lldb/test/API/functionalities/process_crash_info/TestProcessCrashInfo.py
@@ -69,21 +69,3 @@
 
         self.assertIn("pointer being freed was not allocated", stream.GetData())
 
-    def test_on_sane_process(self):
-        """Test that lldb doesn't fetch the extended crash information
-        dictionnary from a 'sane' stopped process."""
-        self.build()
-        target, _, _, _ = lldbutil.run_to_line_breakpoint(self, lldb.SBFileSpec(self.source),
-                                        self.line)
-
-        stream = lldb.SBStream()
-        self.assertTrue(stream)
-
-        process = target.GetProcess()
-        self.assertTrue(process)
-
-        crash_info = process.GetExtendedCrashInformation()
-
-        error = crash_info.GetAsJSON(stream)
-        self.assertFalse(error.Success())
-        self.assertIn("No structured data.", error.GetCString())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76407.251267.patch
Type: text/x-patch
Size: 1103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200319/d8007621/attachment.bin>


More information about the lldb-commits mailing list