sys/isrpipe: unit tests, doc, and fix init#21344
Merged
Enoch247 merged 5 commits intoRIOT-OS:masterfrom Apr 10, 2025
Merged
Conversation
crasbe
reviewed
Apr 1, 2025
crasbe
reviewed
Apr 2, 2025
crasbe
reviewed
Apr 2, 2025
Contributor
|
Now the test works successfully on my |
crasbe
reviewed
Apr 2, 2025
Contributor
|
You can squash the fixup and resolve the conversations. Also you can remove the |
Contributor
Author
|
I believe this ready to merge, pending an approval. |
8 tasks
crasbe
reviewed
Apr 6, 2025
crasbe
approved these changes
Apr 6, 2025
Contributor
crasbe
left a comment
There was a problem hiding this comment.
Tested and working on native and a nucleo-g071rb I have laying around. Please address the comment above before merging.
Contributor
Author
|
I rebased to take advantage of #21367. |
benpicco
reviewed
Apr 7, 2025
benpicco
reviewed
Apr 7, 2025
This patch adds unit tests for the isrpipe module.
The mutex used to sync the reader and writer of the pipe is initialized as unlocked. This results in a bit of wasted CPU cycles the first time a read blocks. This patch inits the mutex in a locked state so that the first blocking read blocks immediately.
This patch makes the requirement on buffer size more prominent. Additionally, it adds the missing argument to the doxygen block of the static initializer. Finally, it chanes the argument name passed to the static intializer to decouble the API from the implmentation details.
This patch documents what happens when a timeout occurs when isrpipe_read_all_timeout() has been called.
This patch makes the requirement on buffer size more prominent. Additionally, it adds the missing argument to the doxygen block of the static initializer.
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.
Contribution description
This PR originally started out as a fix to isrpipe's init of it's mutex, but it grew into adding unit tests and improving its doc as well. I also improved some doc for
tsrb. I can break that into a separate PR if you desire.Testing procedure
make -C tests/unittests/ tests-isrpipe testIssues/PRs references
None known