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>
This commit is contained in:
Tim King 2024-09-11 15:01:53 -07:00
Родитель 515711824d
Коммит 42a6477e4e
2 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -17,6 +17,7 @@ import (
"os/exec"
"path/filepath"
"reflect"
"runtime"
"sort"
"strings"
"testing"
@ -773,7 +774,7 @@ var indirect = R[int].M
// 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 @@ func TestTypeparamTest(t *testing.T) {
}
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.

2
go/ssa/testdata/src/runtime/runtime.go поставляемый
Просмотреть файл

@ -3,3 +3,5 @@ package runtime
func GC()
func SetFinalizer(obj, finalizer any)
func Caller(skip int) (pc uintptr, file string, line int, ok bool)