Skip to content

fix broken error handling in allow for udp#2748

Merged
bors[bot] merged 1 commit into
tock:masterfrom
hudson-ayers:fix-udp-allow-check
Aug 10, 2021
Merged

fix broken error handling in allow for udp#2748
bors[bot] merged 1 commit into
tock:masterfrom
hudson-ayers:fix-udp-allow-check

Conversation

@hudson-ayers

Copy link
Copy Markdown
Contributor

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

  • No updates are required.

Formatting

  • Ran make prepush.

@hudson-ayers hudson-ayers mentioned this pull request Aug 10, 2021
23 tasks
@hudson-ayers hudson-ayers added bug P-Upkeep This a relatively minor change, or one that is limited in scope, and requires less scrutiny. release-blocker Issue or PR that must be resolved before the next release tock-2.0 Issues and PRs related to Tock version 2.0. labels Aug 10, 2021
Comment thread capsules/src/net/udp/driver.rs

@ppannuto ppannuto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

bors r+

This interface definitely has some issues, but this is good for an immediate bugfix.

@bors

bors Bot commented Aug 10, 2021

Copy link
Copy Markdown
Contributor

@bors bors Bot merged commit 8aa6a86 into tock:master Aug 10, 2021
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug P-Upkeep This a relatively minor change, or one that is limited in scope, and requires less scrutiny. release-blocker Issue or PR that must be resolved before the next release tock-2.0 Issues and PRs related to Tock version 2.0.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants