Skip to content
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

samples: boards: nrf: nrfx_prs: extend regex to test default task #72686

Merged

Conversation

nordic-piks
Copy link
Contributor

Verifies that at least SPIM is initialized properly.

Verifies that at least SPIM is initialized properly.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Copy link
Collaborator

@masz-nordic masz-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this test is validating PRS properly.
First, the regex does not verify TX==RX.
Second, to fully test this functionality you would need to switch back and forth between SPIM and UARTE.
Checking if SPIM has initialized properly does not give much value and may lead to an invalid assumption that PRS is covered in verification.

- "Switched to SPIM"
- "-- Background transfer on \".*\" --"
- "Tx: 4E 6F 72 64 69 63 20 53 65 6D 69 63 6F 6E 64 75 63 74 6F 72 00"
- "Rx:"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect RX to be equal to TX?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only if you have loopback connected. This seems to be optional for this sample. So I did not wanted to enforce that.

@nordic-piks
Copy link
Contributor Author

I don't think this test is validating PRS properly. First, the regex does not verify TX==RX. Second, to fully test this functionality you would need to switch back and forth between SPIM and UARTE. Checking if SPIM has initialized properly does not give much value and may lead to an invalid assumption that PRS is covered in verification.

I agree. However that require more effort to extend this test.
My idea was to extend regex to catch errors which already occurs, so only quick win.
Proper verification of PRS needs to be evaluated separately.

@carlescufi carlescufi added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label May 15, 2024
@carlescufi carlescufi merged commit 243f114 into zephyrproject-rtos:main May 15, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Samples Samples platform: nRF Nordic nRFx Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants