        for msg in can.can:
          if msg.src >= 128:
            continue
          to_send = package_can_msg([msg.address, 0, msg.dat, msg.src])
          safety.safety_rx_hook(to_send)
        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()
 
</s> remove       checks['gasPressed'] += CS.gasPressed != safety.get_gas_pressed_prev()
      checks['brakePressed'] += CS.brakePressed != safety.get_brake_pressed_prev()
 </s> add       checks['gasPressed'] += CS.gasPressed != self.safety.get_gas_pressed_prev()
      checks['brakePressed'] += CS.brakePressed != self.safety.get_brake_pressed_prev() </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 = 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 
        ret = self.safety.safety_rx_hook(to_send)
        self.assertEqual(1, ret, f"safety rx failed ({ret=}): {to_send}")
        for msg in can.can:
          if msg.src >= 128:
            continue
          to_send = package_can_msg([msg.address, 0, msg.dat, msg.src])
        ret = self.safety.safety_rx_hook(to_send)
        self.assertEqual(1, ret, f"safety rx failed ({ret=}): {to_send}")
        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()
keep keep keep keep replace keep keep keep keep keep
 test car models: verify panda and carState's ACC main on match (#22979) 
selfdrive/test/test_models.py