This commit is contained in:
firestar5683
2026-07-06 22:32:54 -05:00
parent 33508d42ef
commit a08fe79cef
8 changed files with 190 additions and 7 deletions
+24
View File
@@ -0,0 +1,24 @@
from openpilot.system import tombstoned
def test_report_tombstone_apport_ignores_hal3_direct_widthfix(tmp_path, monkeypatch):
crash = tmp_path / "_data_agnos-compat_bin_hal3_direct_widthfix.0.crash"
crash.write_text("\n".join([
"ProblemType: Crash",
"ExecutablePath: /data/agnos-compat/bin/hal3_direct_widthfix",
"Signal: 11",
"CoreDump: base64",
]))
sentry_calls = []
monkeypatch.setattr(tombstoned.sentry, "report_tombstone", lambda *args: sentry_calls.append(args))
def fail_retrace(fn):
raise AssertionError(f"ignored tombstones should not be retraced: {fn}")
monkeypatch.setattr(tombstoned, "get_apport_stacktrace", fail_retrace)
tombstoned.report_tombstone_apport(str(crash))
assert sentry_calls == []
assert not crash.exists()