go/ssa: disable TestTypeparamTest/chan.go on wasm
Also enables TestTypeparamTest/issue58513.go, which was
disabled for ssa/interp.
Fixes golang/go#64726
Change-Id: I7966fd09e6ec8de662a99f21086f6a5c34d86ab9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/612398
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/go/ssa/builder_test.go b/go/ssa/builder_test.go
index f6fae50..921fe51 100644
--- a/go/ssa/builder_test.go
+++ b/go/ssa/builder_test.go
@@ -17,6 +17,7 @@
"os/exec"
"path/filepath"
"reflect"
+ "runtime"
"sort"
"strings"
"testing"
@@ -773,7 +774,7 @@
// TestTypeparamTest builds SSA over compilable examples in $GOROOT/test/typeparam/*.go.
func TestTypeparamTest(t *testing.T) {
- // Tests use a fake goroot to stub out standard libraries with delcarations in
+ // Tests use a fake goroot to stub out standard libraries with declarations in
// testdata/src. Decreases runtime from ~80s to ~1s.
dir := filepath.Join(build.Default.GOROOT, "test", "typeparam")
@@ -785,8 +786,8 @@
}
for _, entry := range list {
- if entry.Name() == "issue58513.go" {
- continue // uses runtime.Caller; unimplemented by go/ssa/interp
+ if entry.Name() == "chans.go" && runtime.GOARCH == "wasm" {
+ continue // https://go.dev/issues/64726 runtime: found bad pointer
}
if entry.IsDir() || !strings.HasSuffix(entry.Name(), ".go") {
continue // Consider standalone go files.
diff --git a/go/ssa/testdata/src/runtime/runtime.go b/go/ssa/testdata/src/runtime/runtime.go
index 9feed5c..0363c85 100644
--- a/go/ssa/testdata/src/runtime/runtime.go
+++ b/go/ssa/testdata/src/runtime/runtime.go
@@ -3,3 +3,5 @@
func GC()
func SetFinalizer(obj, finalizer any)
+
+func Caller(skip int) (pc uintptr, file string, line int, ok bool)