-
Notifications
You must be signed in to change notification settings - Fork 259
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
Conversation
9dc3fba
to
4e2f0b3
Compare
@@ -192,7 +199,6 @@ func Test_pollOneoff_Stdin(t *testing.T) { | |||
mem: concat( | |||
clockNsSub(20*1000*1000), | |||
fdReadSub, | |||
singleton('?'), |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 <[email protected]>
4e2f0b3
to
e17b921
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good work. thanks!
) Signed-off-by: Edoardo Vacchi <[email protected]> Signed-off-by: Jeroen Bobbeldijk <[email protected]>
follow up to #1606. Cleanup for some logic in
poll_oneoff
and add more test cases+fix nonblocking flags in sockets.