badeend requested wasmtime-wasi-reviewers for a review on PR #12600.
badeend opened PR #12600 from badeend:tcp-streams-once to bytecodealliance:main:
Aside from
test_tcp_read_cancellation, all other P3 TCP stream tests were transliterated from their P2 counterpart. Some of those ex-P2 tests were testing the interaction between the oldtcp-socket::shutdownmethod and its effect of the input/output streams. In P3,shutdownis called automatically when the stream is dropped, so that test code is not really relevant in P3.This PR:
- Rewrites/renames/removes some existing tests.
- Adds
test_tcp_send_drops_stream_when_remote_shutdown: TheSendStreamConsumerdid not handleEPIPEcorrectly yet.- Adds
test_tcp_stream_lifetimesto test the new behavior from https://github.com/WebAssembly/WASI/pull/870- Adds
test_tcp_receive_once&test_tcp_send_once. Becausetcp-socket::send/receivemay be called successfully at most once.
- To make this work, I've refactored the
Connected,Receiving&P2Streamingstates into one.
badeend requested wasmtime-core-reviewers for a review on PR #12600.
badeend requested alexcrichton for a review on PR #12600.
github-actions[bot] added the label wasi on PR #12600.
alexcrichton submitted PR review.
alexcrichton added PR #12600 wasi-sockets: Align stream tests with current P3 spec to the merge queue.
github-merge-queue[bot] removed PR #12600 wasi-sockets: Align stream tests with current P3 spec from the merge queue.
badeend updated PR #12600.
badeend commented on PR #12600:
@alexcrichton Could you try again?
alexcrichton has enabled auto merge for PR #12600.
alexcrichton added PR #12600 wasi-sockets: Align stream tests with current P3 spec to the merge queue.
alexcrichton merged PR #12600.
alexcrichton removed PR #12600 wasi-sockets: Align stream tests with current P3 spec from the merge queue.
Last updated: Feb 24 2026 at 04:36 UTC