diff --git a/opendbc_repo/opendbc/safety/tests/test_subaru_avh_startup.py b/opendbc_repo/opendbc/safety/tests/test_subaru_avh_startup.py index 873895ca8e..8902e71e99 100644 --- a/opendbc_repo/opendbc/safety/tests/test_subaru_avh_startup.py +++ b/opendbc_repo/opendbc/safety/tests/test_subaru_avh_startup.py @@ -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) diff --git a/prebuilt.json b/prebuilt.json index 79705824b0..50824ff927 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "461764647a55c7de9da88172eba75d01ff214e0de95fe9f805940797c7cc63f4", "schema_version": 1} +{"protected_inventory_sha256": "4e3eefcc8319778d0158f10e442920761f14272888ed5d9bcae27b1ff3a3058d", "schema_version": 1}