]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: run wasip1 tests with wazero
authorChris O'Hara <cohara87@gmail.com>
Wed, 14 Jun 2023 02:16:38 +0000 (12:16 +1000)
committerGopher Robot <gobot@golang.org>
Thu, 29 Jun 2023 15:35:27 +0000 (15:35 +0000)
The latest wazero release supports non-blocking I/O and pre-opened
sockets. Unmask the relevant wasip1 tests so that there are multiple
WebAssembly runtimes exercising these code paths.

Change-Id: I8506ab35186f98fde2cd3ce84634d5fcb7b053f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/503595
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
src/runtime/internal/wasitest/nonblock_test.go
src/runtime/internal/wasitest/tcpecho_test.go

index 8fb2860e4ba28105d4dde48db70d70dfbf5ff44e..3072b96ed81343133c6ab86e1225315577e00742 100644 (file)
@@ -37,8 +37,6 @@ func TestNonblock(t *testing.T) {
        }
 
        switch os.Getenv("GOWASIRUNTIME") {
-       case "wazero", "":
-               t.Skip("wazero does not support non-blocking I/O")
        case "wasmer":
                t.Skip("wasmer does not support non-blocking I/O")
        }
index 506e6fe40accfe31c77467013660ed2bb73b7d8f..c56af2cc85d4a80cee96ad13db9dd6c908af8e9e 100644 (file)
@@ -44,6 +44,8 @@ func TestTCPEcho(t *testing.T) {
        subProcess.Env = append(os.Environ(), "GOOS=wasip1", "GOARCH=wasm")
 
        switch os.Getenv("GOWASIRUNTIME") {
+       case "wazero", "":
+               subProcess.Env = append(subProcess.Env, "GOWASIRUNTIMEARGS=--listen="+host)
        case "wasmtime":
                subProcess.Env = append(subProcess.Env, "GOWASIRUNTIMEARGS=--tcplisten="+host)
        default: