-
Notifications
You must be signed in to change notification settings - Fork 7.4k
tests: drivers: spi: spi_loopback: skip tests if invalid config #90321
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
base: main
Are you sure you want to change the base?
tests: drivers: spi: spi_loopback: skip tests if invalid config #90321
Conversation
The spi_loopback_transceive() helper currently only prints a message if a configuration is invalid, continuing the test case as if it succeeded. This results in the test case using the helper trying to validate the result from a spi transaction that was skipped. Fix this by explicitly skipping the test using the ztest framework's ztest_test_skip() function, which skips the entire test case. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
|
So, when I made this PR originally for this tests, I had done skips instead, but there was some kind of Ztest bug that was making a skip cause the test to fail so we decided not to use the skips. I don't know if it got fixed, FYI @djiatsaf-st and @yperess |
ok, will wait to hear back, but |
no , it wasn't a platform bug, it was something with ztest, the test case would skip on the ST parts, and then the whole test suite would fail despite no individual test case failing, so we decided to just make the test pass instead of skip so the PR could merge |
|
@JarmouniA so, seems it is fixed now? We can use |
It appears so, @djiatsaf-st can confirm. |
The
spi_loopback_transceive()
helper currently only prints a message if a configuration is invalid, continuing the test case as if it succeeded. This results in the test case using the helper trying to validate the result from a spi transaction that was skipped.Fix this by explicitly skipping the test using the ztest framework's ztest_test_skip() function, which skips the entire test case.
Before this patch:
After this patch
fixes: #90318