Skip to content

Add some more stream/future WAST tests for partial/zero reads/writes - #721

Merged
lukewagner merged 1 commit into
mainfrom
add-more-tests
Sep 15, 2026
Merged

lukewagner merged 1 commit into
mainfrom
add-more-tests

Conversation

@lukewagner

Copy link
Copy Markdown
Member

Independently of the DROPPED changes in flight in the other PR, this PR adds more tests for futures, repeated partial stream reads/writes, and zero-length read/writes. Everything passes in Wasmtime with the exception of the last (rather corner) case in test/async/zero-length.wast (named zero-write-after-cancelled-write). In this test, a zero-length read is notified by a non-zero-length write, but then that write is cancelled (successfully), and a new zero-length write is issued which in theory should return BLOCKED because there is no longer a pending read (even though the original zero-length read's notification has not yet been delivered). This is symmetric to what happens in zero-write-after-full-read (which passes on Wasmtime, and just replaces the zero-length buffer with a non-zero-length buffer) so my impression is that the zero-length case is a bug, but lmkwyt @dicej @alexcrichton.

@dicej dicej left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'll work on fixing the failure in Wasmtime.

@lukewagner
lukewagner merged commit 531ee4b into main Sep 15, 2026
2 checks passed
@lukewagner
lukewagner deleted the add-more-tests branch September 15, 2026 15:37
chenyan2002 pushed a commit to chenyan2002/wasmtime that referenced this pull request Sep 15, 2026
…ce#14340)

This fixes the test failure described in
WebAssembly/component-model#721, where a zero-length
write following a cancelled non-zero-length write should return `BLOCKED` but
was instead returning `COMPLETED`.
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.

2 participants