Qualify Subaru RELEASE AVH guard and ordinary engagement

This commit is contained in:
firestar5683
2026-10-22 22:09:05 -05:00
parent 0171603f6d
commit 7610f33129
2 changed files with 24 additions and 1 deletions
@@ -114,3 +114,26 @@ class TestSubaruAvhDiscovery(unittest.TestCase):
'alt_gear', 'alt_gas', 'engine', 'main_gear'):
with self.subTest(fault=fault):
test_native_refusals(fault)
def test_explicit_release_blocks_avh_and_preserves_stock_aol():
from opendbc.safety.tests.test_subaru_stock_aol import TestSubaruStockAol
original = libsafety_py.libpath
try:
libsafety_py.load(libsafety_py._build_libsafety(release=True))
assert libsafety_py.libsafety.set_safety_hooks(structs.CarParams.SafetyModel.allOutput, 0) != 0
for param in (1169, 1425):
for ae in (0, 32):
test_exact_pair_debug_only_and_status_never_tx(param, ae)
# RELEASE must retain normal engagement and lateral-only permission after
# rejecting the optional DEBUG AVH words, including both Legacy bases.
case = TestSubaruStockAol()
for param in (145, 401):
case.configure(param)
case.arm()
case.safety.aol_set_host_request(3)
assert case.safety.aol_get_permission_mask() == 1
assert case.feed(main=False) == 0
finally:
libsafety_py.load(original)
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "461764647a55c7de9da88172eba75d01ff214e0de95fe9f805940797c7cc63f4", "schema_version": 1}
{"protected_inventory_sha256": "4e3eefcc8319778d0158f10e442920761f14272888ed5d9bcae27b1ff3a3058d", "schema_version": 1}