        CS = self.CI.update(CC, (can.as_builder().to_bytes(),))
  
        # TODO: check steering state
        # check that openpilot and panda safety agree on the car's state
        checks['gasPressed'] += CS.gasPressed != safety.get_gas_pressed_prev()
        checks['brakePressed'] += CS.brakePressed != safety.get_brake_pressed_prev()
        if self.CP.pcmCruise:
          checks['controlsAllowed'] += not CS.cruiseState.enabled and safety.get_controls_allowed()
  
      # TODO: reduce tolerance to 0
      failed_checks = {k: v for k, v in checks.items() if v > 25}
 
</s> remove         checks['controlsAllowed'] += not CS.cruiseState.enabled and safety.get_controls_allowed()
 </s> add         checks['controlsAllowed'] += not CS.cruiseState.enabled and self.safety.get_controls_allowed()

      # TODO: extend this to all cars
      if self.CP.carName == "honda":
        checks['mainOn'] += CS.cruiseState.available != self.safety.get_acc_main_on() </s> remove         safety.safety_rx_hook(to_send)
 </s> add         ret = self.safety.safety_rx_hook(to_send)
        self.assertEqual(1, ret, f"safety rx failed ({ret=}): {to_send}") </s> remove     safety = libpandasafety_py.libpandasafety
    set_status = safety.set_safety_hooks(self.CP.safetyConfigs[0].safetyModel.raw, self.CP.safetyConfigs[0].safetyParam)
    self.assertEqual(0, set_status)

 </s> add 
      checks['gasPressed'] += CS.gasPressed != self.safety.get_gas_pressed_prev()
      checks['brakePressed'] += CS.brakePressed != self.safety.get_brake_pressed_prev()
        CS = self.CI.update(CC, (can.as_builder().to_bytes(),))
  
        # TODO: check steering state
        # check that openpilot and panda safety agree on the car's state
      checks['gasPressed'] += CS.gasPressed != self.safety.get_gas_pressed_prev()
      checks['brakePressed'] += CS.brakePressed != self.safety.get_brake_pressed_prev()
      checks['gasPressed'] += CS.gasPressed != self.safety.get_gas_pressed_prev()
      checks['brakePressed'] += CS.brakePressed != self.safety.get_brake_pressed_prev()
        if self.CP.pcmCruise:
          checks['controlsAllowed'] += not CS.cruiseState.enabled and safety.get_controls_allowed()
  
      # TODO: reduce tolerance to 0
      failed_checks = {k: v for k, v in checks.items() if v > 25}
keep keep keep keep replace replace keep keep keep keep keep
 test car models: verify panda and carState's ACC main on match (#22979) 
selfdrive/test/test_models.py