mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-24 01:33:46 +08:00
fixes
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user