sockets: Add tests for tcp/{connect, listen, send,receive}#208
Open
saulecabrera wants to merge 4 commits intoWebAssembly:mainfrom
Open
sockets: Add tests for tcp/{connect, listen, send,receive}#208saulecabrera wants to merge 4 commits intoWebAssembly:mainfrom
saulecabrera wants to merge 4 commits intoWebAssembly:mainfrom
Conversation
This commit covers the `connect` functionality. The following cases:
* `timeout`
* `connection-{reset, aborted, unreachable}`
are tricky to similuate without the networking counterpart in the
host; I'm intentionally leaving these out from this patch and will be
included in follow-ups.
This commit also introduces a shared `sockets` module, to ease the
development of other sockets-related tests
https://github.com/WebAssembly/wasi-testsuite/pull/205/changes will be
rebased on top of this chnage once it lands.
Builds on top of: WebAssembly#206
9f54653 to
fbbeae3
Compare
Contributor
Author
|
cc @wingo I've decided to group all the other PRs into this one, to make easier to review (and update), every change is clearly separated into its own commit anyway. So I'll go ahead and close the others. |
saulecabrera
commented
Jan 22, 2026
| ); | ||
| assert_eq!(next.get_keep_alive_count(), sock.get_keep_alive_count()); | ||
| assert_eq!(next.get_hop_limit(), sock.get_hop_limit()); | ||
| // TODO: In wasmtime, these values are different, even though according to the |
Contributor
Author
There was a problem hiding this comment.
I'll have to investigate a bit more prior to creating an issue upstream. See spec: https://github.com/WebAssembly/WASI/blob/main/proposals/sockets/wit-0.3.0-draft/types.wit#L239
This was referenced Jan 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See individual commits for details.