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())


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())
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to