Repository navigation
volvo: add safety tests + docs on running them - #10
Open
joeywritesc wants to merge 4 commits into
Open
joeywritesc wants to merge 4 commits into
joeywritesc wants to merge 4 commits into
Conversation
Ported from cschmittiey/opendbc main (56b1b58).
Both use the volvo safety mode with a different safetyParam and share TX_MSGS.
Ported from cschmittiey/opendbc 9efaf9d. Comment-only: the TX allowlist already pins each address to one bus, so these branches can't be reached. Brings volvo.h to 100% line coverage so opendbc/safety/tests/test.sh passes.
There was a problem hiding this comment.
Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- include a route or your device' dongle ID if relevant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Brings ellie's Volvo safety tests into master-cma-dev5 and documents how to run them.
test_volvo.py(ellie, from cschmittiey/opendbc main): CMA + SPA tests for gas/brake/cruise disengage, standstill from main-bus SPEED, TX bus allowlist, relay malfunction, fwd blacklist, and consistency of the speed scale / gas thresholds between volvo.h, carstate.py and the test.common.py: skip CMA<->SPA intest_tx_hook_on_wrong_safety_mode, like Toyota/Ford/Subaru (same safety mode, shared TX msgs).volvo.h: GCOV_EXCL markers around the unreachable wrong-bus branches involvo_tx_hook(ellie). Comment-only, no behavior change.opendbc/car/volvo/README.md: setup, how to run the tests, gotchas.Verification
opendbc/safety/tests/test.shon master-cma-dev5 fails the coverage gate (volvo.h at 0%).test.shpasses with 100% coverage, full safety suite OK.Not covered yet: LCA_5 angle limits and RX counter/checksum checks.
Alternative for
volvo.h: delete the redundant wrong-bus checks instead of excluding them from coverage. Happy to switch if you prefer.