        self.skipTest("no need to check panda safety for dashcamOnly")
      if self.car_model in ignore_carstate_check:
        self.skipTest("see comments in test_models.py")
  
      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)
  
      checks = defaultdict(lambda: 0)
      CC = car.CarControl.new_message()
      for can in self.can_msgs:
        for msg in can.can:
          if msg.src >= 128:
 
</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       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()
        self.skipTest("no need to check panda safety for dashcamOnly")
      if self.car_model in ignore_carstate_check:
        self.skipTest("see comments in test_models.py")
  




      checks = defaultdict(lambda: 0)
      CC = car.CarControl.new_message()
      for can in self.can_msgs:
        for msg in can.can:
          if msg.src >= 128:
keep keep keep keep replace replace 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