[Lldb-commits] [lldb] [LLDB][Minidump] Add Multiplatform test to ensure determinism (PR #108602)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 13 09:38:23 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 661382f2c07ba464caa0ad0fb8c64c1c3b20e9a4...60b48f98ffa70dbf633f1b9bf935479dbfce59d4 lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- TestProcessSaveCoreMinidump.py 2024-09-13 16:29:46.000000 +0000
+++ TestProcessSaveCoreMinidump.py 2024-09-13 16:37:56.432599 +0000
@@ -533,11 +533,15 @@
process = target.LaunchSimple(
None, None, self.get_process_working_directory()
)
self.assertState(process.GetState(), lldb.eStateStopped)
- core_styles = [lldb.eSaveCoreStackOnly, lldb.eSaveCoreDirtyOnly, lldb.eSaveCoreFull]
+ core_styles = [
+ lldb.eSaveCoreStackOnly,
+ lldb.eSaveCoreDirtyOnly,
+ lldb.eSaveCoreFull,
+ ]
for style in core_styles:
spec_one = lldb.SBFileSpec(self.getBuildArtifact("core.one.dmp"))
spec_two = lldb.SBFileSpec(self.getBuildArtifact("core.two.dmp"))
options = lldb.SBSaveCoreOptions()
options.SetOutputFile(spec_one)
@@ -549,13 +553,15 @@
error = process.SaveCore(options)
self.assertTrue(error.Success())
file_one = None
file_two = None
- with open(spec_one.GetFileName(), mode='rb') as file: # b is important -> binary
+ with open(
+ spec_one.GetFileName(), mode="rb"
+ ) as file: # b is important -> binary
file_one = file.read()
- with open(spec_two.GetFileName(), mode='rb') as file:
+ with open(spec_two.GetFileName(), mode="rb") as file:
file_two = file.read()
self.assertEqual(file_one, file_two)
self.assertTrue(os.unlink(spec_one.GetFileName()))
self.assertTrue(os.unlink(spec_two.GetFileName()))
``````````
</details>
https://github.com/llvm/llvm-project/pull/108602
More information about the lldb-commits
mailing list