-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
safety: coverage report #1696
safety: coverage report #1696
Conversation
This also doesn't catch #1695 because we have a test that checks that the driver torque meas struct is reset, it just doesn't check the actual values, which I'm adding a generic test for in that PR. |
Nice! This isn't expected to catch everything; it's just a minimum bar and sanity check for our unit test coverage. I want to merge this, fix any missing coverage, then make CI fail if coverage is <100%. |
This reverts commit 6991c17.
Example output on safety related files: Looks like we need, but will do in follow up PR:
Overall coverage rate:
lines......: 85.3% (1926 of 2258 lines)
functions..: 75.0% (165 of 220 functions)
Some files have less than 100% coverage:
File '/home/batman/openpilot/panda/board/safety/safety_body.h' Lines executed:0.00% of 17
File '/home/batman/openpilot/panda/board/safety/safety_elm327.h' Lines executed:0.00% of 20
File '/home/batman/openpilot/panda/board/safety/safety_volkswagen_pq.h' Lines executed:99.03% of 103
File '/home/batman/openpilot/panda/board/safety/safety_volkswagen_mqb.h' Lines executed:98.41% of 126
File '/home/batman/openpilot/panda/board/safety/safety_hyundai.h' Lines executed:98.63% of 146
File '/home/batman/openpilot/panda/board/safety/safety_hyundai_common.h' Lines executed:95.74% of 47
File '/home/batman/openpilot/panda/board/safety/safety_ford.h' Lines executed:98.05% of 154
File '/home/batman/openpilot/panda/board/safety/safety_gm.h' Lines executed:98.92% of 93
File '/home/batman/openpilot/panda/board/safety/safety_honda.h' Lines executed:96.83% of 189
File '/home/batman/openpilot/panda/board/safety/safety_defaults.h' Lines executed:0.00% of 26 |
A lot is already hit because of tests like
test_spam_can_buses
andtest_tx_hook_on_wrong_safety_mode
One legitamate catch is this address we don't test for relay malfunctions because the tests only support one (#1545):
But it's mostly defaults: