Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasi: add more test cases to poll_oneoff, cleanup impl #1612

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

evacchi
Copy link
Contributor

@evacchi evacchi commented Aug 4, 2023

follow up to #1606. Cleanup for some logic in poll_oneoff and add more test cases+fix nonblocking flags in sockets.

@@ -192,7 +199,6 @@ func Test_pollOneoff_Stdin(t *testing.T) {
mem: concat(
clockNsSub(20*1000*1000),
fdReadSub,
singleton('?'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these really aren't necessary as mem is pre-touched with '?' anyway.

@@ -90,6 +90,16 @@ func syscallConnControl(conn syscall.Conn, fn func(fd uintptr) (int, sys.Errno))
return
}

func _pollSock(conn syscall.Conn, flag sys.Pflag, timeoutMillis int32) (bool, sys.Errno) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this utility may be also useful if we expose File.Poll() in sockets too

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Copy link
Contributor

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

good work. thanks!

@evacchi evacchi merged commit edb7bc2 into main Aug 5, 2023
59 checks passed
@evacchi evacchi deleted the poll-misc-fixes branch August 5, 2023 13:22
jerbob92 pushed a commit to jerbob92/wazero that referenced this pull request Aug 9, 2023
)

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Signed-off-by: Jeroen Bobbeldijk <jeroen@klippa.com>
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