Commit 3621d3e
authored
wasi-sockets: Align stream tests with current P3 spec (#12600)
* Merge the `Connected`, `Receiving` & `P2Streaming` states into one
* Handle remote shutdowns gracefully. Before it would fail with `ErrorCode::Unknown` because EPIPE is not mapped
* Rewrite P3 TCP stream tests.
Aside from `test_tcp_read_cancellation`, all other tests were ported directly from their P2 counterpart. However, many of those P2 tests were testing semantics that are not relevant in P3. For example, they were testing the interaction between the old `tcp-socket::shutdown` method and its effect of the input/output streams. In P3, `shutdown` is called automatically when the stream is dropped
* `send & `receive` may be called successfully at most once.
* The streams and futures returned by `send` and `receive` should remain operational even after the socket that spawned them has been dropped.
* Clarify the difference between `send` and `send_result`
* Code cleanup
* Windows doesn't use BrokenPipe1 parent b8f882d commit 3621d3e
File tree
5 files changed
+303
-182
lines changed- crates
- test-programs/src/bin
- wasi/src
- p2
- p3
- sockets/host/types
- sockets
5 files changed
+303
-182
lines changed
0 commit comments