From c5c2184538411c8cf7abc4e536fbe7af8b0307f5 Mon Sep 17 00:00:00 2001 From: Chris O'Hara Date: Mon, 8 May 2023 17:07:18 +1000 Subject: runtime: implement wasip1 netpoll Implements netpoll using WASI's poll_oneoff system call. This enables non-blocking I/O support for wasip1. Change-Id: Ie395fa49d651c8b8262d485e2847dd65b0a10bc6 Reviewed-on: https://go-review.googlesource.com/c/go/+/493357 Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov TryBot-Result: Gopher Robot Reviewed-by: Matthew Dempsky Reviewed-by: Johan Brandhorst-Satzkorn Reviewed-by: Julien Fabre Auto-Submit: Johan Brandhorst-Satzkorn Run-TryBot: Ian Lance Taylor --- src/cmd/dist/test.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/cmd/dist/test.go') diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 3384149391..f16bf32bbf 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -574,7 +574,8 @@ func (t *tester) registerTests() { // registerStdTestSpecially tracks import paths in the standard library // whose test registration happens in a special way. registerStdTestSpecially := map[string]bool{ - "cmd/internal/testdir": true, // Registered at the bottom with sharding. + "runtime/internal/wasitest": true, // Registered at the bottom as a host test. + "cmd/internal/testdir": true, // Registered at the bottom with sharding. } // Fast path to avoid the ~1 second of `go list std cmd` when @@ -786,6 +787,16 @@ func (t *tester) registerTests() { t.registerCgoTests(cgoHeading) } + if goos == "wasip1" { + t.registerTest("wasip1 host tests", + &goTest{ + variant: "host", + pkg: "runtime/internal/wasitest", + timeout: 1 * time.Minute, + runOnHost: true, + }) + } + if goos != "android" && !t.iOS() { // Only start multiple test dir shards on builders, // where they get distributed to multiple machines. -- cgit v1.2.3-54-g00ecf