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
tests: drivers: can: timing: rework the CAN controller driver timing tests #70224
Merged
henrikbrixandersen
merged 11 commits into
zephyrproject-rtos:main
from
vestas-wind-systems:can_test_timing_rework
Mar 19, 2024
Merged
tests: drivers: can: timing: rework the CAN controller driver timing tests #70224
henrikbrixandersen
merged 11 commits into
zephyrproject-rtos:main
from
vestas-wind-systems:can_test_timing_rework
Mar 19, 2024
Conversation
This file contains 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
Move the test for setting the minimum/maximum supported timing parameters from the CAN timing tests to the CAN API tests as these are validating basic API behavior. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Move the tests for setting a too high bitrate from the CAN timing tests to the CAN API tests as these are validating basic API behavior. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
… suite Move the tests for using invalid sample points from the CAN timing tests to the CAN API tests as these are validating basic API behavior. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove now unused support for specifying invalid timing test configurations. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove tests for additional sample points as this does not provide any real value. The purpose of this test suite is to see if the selected CAN clock allows meeting the standard bitrates and sample points used by Zephyr. Any tweaking needed for a specific board or system design is left up to the user and not something that can be covered by testing a few additional sample point locations. Change a few comments and remove an unneeded conditional while here. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add tests for all CAN bitrates recommended by CAN in Automation (CiA). The newly added bitrate tests are guarded by new, local Kconfig option (CONFIG_TEST_ALL_BITRATES) to avoid breaking existing board tests. Some boards may need adjustments to their CAN core clock in order to pass the newly added tests. Once a board is confirmed to meet these additional checks, this Kconfig can be enabled for that board to avoid future regressions. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Some CAN controllers may be unable to meet all bitrates due to timing restrictions, but assert that at least one of the tested bitrates was supported. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Use the CAN clock and configuration ranges recommended by CAN in Automation (CiA). Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Use the CAN clock and configuration ranges recommended by CAN in Automation (CiA). Adjust the CAN shell test, which makes use of the fake CAN controller driver, to match the new timing limits. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Enable testing of all CiA recommended bitrates on the following simulated/emulated boards: - native_sim - native_sim_64 - native_posix - native_posix_64 - qemu_x86 - qemu_x86_64 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Enable testing of all CiA recommended bitrates on the following boards: - stm32h735g_disco Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
martinjaeger
approved these changes
Mar 17, 2024
str4t0m
approved these changes
Mar 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good!
I don't have access to all CiA documents referenced, but seems all reasonable.
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.
CONFIG_TEST_ALL_BITRATES
) to avoid breaking existing board tests. Some boards may need adjustments to their CAN core clock in order to pass the newly added tests. Once a board is confirmed to meet these additional checks, this Kconfig can be enabled for that board to avoid future regressions.can_loopback.c
andcan_fake.c
drivers.native_sim
native_sim_64
native_posix
native_posix_64
qemu_x86
qemu_x86_64
stm32h735g_disco
Note: This PR is best reviewed commit-by-commit.