Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion dev/wasmstdlib/full.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ func fullCommand(p profile, goCmd, llgo, goRoot, pkg string) command {
// addresses are known. Most packages do not inspect runtime metadata.
args = append(args, "-pclntab=none")
}
if !p.Reference && p.GOOS == "js" {
switch pkg {
case "test/escape", "test/std/crypto/mldsa", "test/std/go/types":
// These tests need more than the default fixed Fiber-stack size:
// escape's by-value ABI copy slots, ML-DSA's cryptographic
// workspaces and go/types' recursive type-checker frames.
args = append(args, "-goroutine-stack-size=1MB")
}
}
packageArg := "./" + pkg
if pkg == wasmTimerStressPackage {
// The Go command excludes underscore directories from package patterns,
Expand Down Expand Up @@ -213,6 +222,8 @@ func fullSourceExclusion(p profile, pkg string) (string, bool) {
return "tests select Unix or Windows syscall surfaces, neither of which is the js/wasm or wasip1/wasm ABI", true
case "test/windows":
return "Windows-only integration suite", true
case "test/cgo/c11":
return "native C11 cgo tests explicitly exclude wasm", true
case "test/cgo":
return "the Go cgo frontend does not support GOARCH=wasm; C interoperability is covered by dedicated LLGo target tests", true
case "test/std/runtime/cgo":
Expand Down Expand Up @@ -355,7 +366,7 @@ func runFullAt(root, name, reportPath, goCmd, llgo string, shard, shards int, st
e.Status, e.Reason = "separate-suite", "host-side compiler integration suite is executed by the regular Go workflow"
case e.Package == "test/sizereport":
e.Status, e.Reason = "separate-suite", "host-side final-artifact size reporting is executed by the regular Go workflow"
case e.Package == "test/simd" || e.Package == "test/simd/portable":
case e.Package == "test/simd" || e.Package == "test/simd/portable" || e.Package == "test/std/simd":
e.Status, e.Reason = "separate-suite", "experimental SIMD requires GOEXPERIMENT=simd and is executed by the native and W32-WASI SIMD jobs in the regular Go workflow"
case excluded:
e.Status, e.Reason = "not-applicable", exclusionReason
Expand Down
22 changes: 19 additions & 3 deletions dev/wasmstdlib/full_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ func TestFullProfileCommandsKeepLLGoAndReferenceDistinct(t *testing.T) {

func TestFullAuditClassifiesExperimentalSIMDSeparately(t *testing.T) {
root := t.TempDir()
for _, pkg := range []string{"test/simd", "test/simd/portable"} {
for _, pkg := range []string{"test/simd", "test/simd/portable", "test/std/simd"} {
dir := filepath.Join(root, pkg)
if err := os.MkdirAll(dir, 0755); err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -623,7 +623,7 @@ func TestFullAuditClassifiesExperimentalSIMDSeparately(t *testing.T) {
if err := json.Unmarshal(data, &result); err != nil {
t.Fatal(err)
}
if len(result.Packages) != 2 {
if len(result.Packages) != 3 {
t.Fatalf("SIMD disappeared from the inventory: %s", data)
}
for _, entry := range result.Packages {
Expand Down Expand Up @@ -698,7 +698,7 @@ func TestFullSourceExclusionsAreProfileSpecific(t *testing.T) {
t.Fatalf("%s did not classify %s", name, pkg)
}
}
for _, pkg := range []string{"test/cgo", "test/std/runtime/cgo"} {
for _, pkg := range []string{"test/cgo", "test/cgo/c11", "test/std/runtime/cgo"} {
if reason, ok := fullSourceExclusion(p, pkg); !ok || reason == "" {
t.Fatalf("%s did not classify %s", name, pkg)
}
Expand Down Expand Up @@ -789,3 +789,19 @@ func TestFullWitnessUsesOnlySelectedSources(t *testing.T) {
t.Fatal("accepted unselected tests")
}
}

func TestFullLargeStackCommandsAreTargeted(t *testing.T) {
for _, name := range []string{"J32-GoJS", "J32-Emscripten", "J64-Emscripten", "W32-WASI", "GoJS-reference", "GoWASI-reference"} {
p, err := fullProfile(name)
if err != nil {
t.Fatal(err)
}
for _, pkg := range []string{"test/escape", "test/std/crypto/mldsa", "test/std/go/types", "test/std/fmt"} {
cmd := fullCommand(p, "go", "llgo", "/goroot", pkg)
want := !p.Reference && p.GOOS == "js" && pkg != "test/std/fmt"
if got := slices.Contains(cmd.Args, "-goroutine-stack-size=1MB"); got != want {
t.Errorf("%s %s: large stack = %v, want %v: %+v", name, pkg, got, want, cmd)
}
}
}
}
Loading