Skip to content

Conversation

@phip1611
Copy link
Member

@phip1611 phip1611 commented Dec 6, 2025

add basic integration test for BlockIo and BlockIo2 protocols

Steps to Undraft

  • wait for the other PRs to be merged to reduce review pressure

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

@phip1611 phip1611 self-assigned this Dec 6, 2025
media_id: u32,
lba: Lba,
token: Option<NonNull<BlockIO2Token>>,
len: usize,
Copy link
Member Author

Choose a reason for hiding this comment

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

ping @Virv12 FYI. Unfortunately, I missed this in the review.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like this change, using a reference introduces a lifetime, implying we are going to use the buffer only until the lifetime is alive, which is wrong.

There has been a similar discussion on DiskIO2.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks a lot for pointing that out to me, I wasn't aware of this anymore!

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for catching that, I had forgotten about that too :)

@phip1611 phip1611 changed the title uefi: add basic integration test for BlockIo and BlockIo2 protocols + fix in BlockIo2 uefi: add basic integration test for BlockIo and BlockIo2 protocols Jan 2, 2026
@phip1611 phip1611 marked this pull request as draft January 2, 2026 12:48
@phip1611 phip1611 requested a review from Virv12 January 2, 2026 13:32
@phip1611
Copy link
Member Author

phip1611 commented Jan 2, 2026

@Virv12 you implemented the blocks i/o 2 protocol in #1841 - I tried to write a very basic integration test for it. The hardest part was to understand how the async interface of the read|write_blocks_ex functions work at all. Could you please take a look as you are more experienced in this specific area than I am?

@phip1611 phip1611 force-pushed the block-io branch 2 times, most recently from 10a0ec8 to 250d209 Compare January 2, 2026 13:40
- improve the ergonomics of the Blocks I/O 2 protocol
- figure out how to use it at all and put that into a very basic test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants