fix broken error handling in allow for udp#2748
Merged
Merged
Conversation
brghena
reviewed
Aug 10, 2021
brghena
approved these changes
Aug 10, 2021
lschuermann
approved these changes
Aug 10, 2021
bradjc
approved these changes
Aug 10, 2021
ppannuto
approved these changes
Aug 10, 2021
ppannuto
left a comment
Member
There was a problem hiding this comment.
bors r+
This interface definitely has some issues, but this is good for an immediate bugfix.
Contributor
sirchnik
pushed a commit
to sirchnik/tock
that referenced
this pull request
May 12, 2026
2748: fix broken error handling in allow for udp r=ppannuto a=hudson-ayers ### Pull Request Overview This pull request fixes incorrect error handling in the body of `allow_readwrite()` for the UDP driver. This mistake seems quite easy to make as a result of having two implementations of `From` for `Error` -> `ErrorCode` and `Error` -> `Result<(), ErrorCode>`. I plan to submit a followup PR that checks other drivers for this issue and restructures the interface somehow to make mistakes like this one more difficult, but this is a band-aid to allow us to finish release testing. ### Testing Strategy This pull request was tested by running the UDP virtualization test apps that force allow failures and confirm they fail. ### TODO or Help Wanted N/A ### Documentation Updated - [x] No updates are required. ### Formatting - [ ] Ran `make prepush`. Co-authored-by: Hudson Ayers <hayers@stanford.edu>
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.
Pull Request Overview
This pull request fixes incorrect error handling in the body of
allow_readwrite()for the UDP driver. This mistake seems quite easy to make as a result of having two implementations ofFromforError->ErrorCodeandError->Result<(), ErrorCode>. I plan to submit a followup PR that checks other drivers for this issue and restructures the interface somehow to make mistakes like this one more difficult, but this is a band-aid to allow us to finish release testing.Testing Strategy
This pull request was tested by running the UDP virtualization test apps that force allow failures and confirm they fail.
TODO or Help Wanted
N/A
Documentation Updated
Formatting
make prepush.