Skip to content

test/goroot: synchronize native run expectations - #2264

Open
cpunion wants to merge 4 commits into
xgo-dev:mainfrom
cpunion:codex/goroot-stale-finalizer-xfails-20260801
Open

test/goroot: synchronize native run expectations#2264
cpunion wants to merge 4 commits into
xgo-dev:mainfrom
cpunion:codex/goroot-stale-finalizer-xfails-20260801

Conversation

@cpunion

@cpunion cpunion commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove 75 native run and runoutput xfail entries that pass on latest main
  • reclassify existing expectations that pass or fail across fresh native runs as flakes, so an XPASS does not fail the matrix
  • add the missing Linux xfails and macOS host skips exposed by the full matrix; these record existing compiler/runtime limitations without implementing them here
  • align the dedicated GOROOT workflow resource guards with GitHub-hosted runners: disable the unsuitable fixed free-swap floor on macOS and allow up to 5 GiB process-group RSS

The tested baseline is 2310ff87f1cfa57dda5d4736f98b34ee679bca6d, which is still the latest main. Scope is limited to test/goroot/xfail.yaml and .github/workflows/goroot.yml; there are no compiler/runtime, wasm, DWARF, shard-count, or timeout changes.

Removed stale entries

Darwin arm64

38 Go 1.24/1.25 entries across 19 cases, including finalizer, indexing, nil, conversion, fixedbugs, channel, and ordered-map cases.

Linux amd64

  • 24 versioned entries across append.go, recover3.go, switch.go, tinyfin.go, and five fixedbugs cases
  • 13 entries across index0.go, nil.go, and seven fixedbugs cases that were also verified across all three Go versions

Full-matrix findings

The first 16-job native run on commit 84d44952b covered macOS and Ubuntu, Go 1.24.11 and Go 1.26.5, with four shards. No failing subtest matched an xfail removed by this PR for the same platform and Go version.

Its failures came from existing XPASS entries, missing platform expectations, two macOS thread-limit cases, a macOS low-swap cascade, and Linux fixedbugs/bug449.go peaking at about 4.11 GiB RSS. This update classifies those outcomes directly. Deterministic implementation failures remain xfailed; pass-or-fail outcomes are flakes.

Initial run: https://github.com/cpunion/llgo/actions/runs/30736831931

Updated run for commit 5032172ba: https://github.com/cpunion/llgo/actions/runs/30739767737

Validation

Removed cases

  • Darwin arm64: Go 1.24.11 19/19 and Go 1.25.7 19/19 applicable cases passed
  • Linux amd64 first group: Go 1.24.11 7/7, Go 1.25.7 8/8, Go 1.26.5 9/9 passed
  • Linux amd64 second group: 9/9 passed on each of Go 1.24.11, Go 1.25.7, and Go 1.26.5
  • Linux runs used an absent xfail file, so expectations could not mask failures

Configuration and runner

  • go test ./test/goroot -run "^Test" -skip "^TestGoRootRunCases$" -count=1
  • YAML parsing, duplicate-entry check, and xfail/flake overlap check across the supported native matrix
  • git diff --check

@cpunion

cpunion commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

The regular pull-request workflows do not run test/goroot. I dispatched the dedicated GOROOT matrix for this exact head (84d44952b):

https://github.com/cpunion/llgo/actions/runs/30736831931

It covers macOS and Ubuntu with Go 1.24.11 and Go 1.26.5, split across four shards. Go 1.25.7 is not part of the workflow matrix; its Darwin arm64 and Linux amd64 cases were run manually before opening this PR.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: retire stale native run xfails

This PR deletes 368 lines from test/goroot/xfail.yaml, removing native run/runoutput expected-failure entries so those goroot cases are now asserted to pass. I verified the mechanics of the deletion:

  • The file still parses as valid YAML (309 entries remain).
  • No duplicate (version, platform, directive, case) entries remain.
  • Every removed (case, platform) pair is fully removed — no partial-version leftovers.
  • The host_skips / timeouts / flakes / xfails sections are all still well-formed; no orphaned reason: lines.

The change is structurally clean and low-risk. Two points worth confirming before merge:

1. finprofiled.go removal — verify the hang is actually fixed (CI-time risk).
Among the removed entries are the darwin/arm64 finprofiled.go xfails (go1.24 + go1.25) whose reason was "LLGo finalizer profiling run hangs beyond the 1m timeout." There is no timeouts: override remaining for this case, so it now runs under the default run-timeout of 1 minute (runner_test.go:49). If the hang has not genuinely been resolved by other work, this case will now consume the full 1m and then hard-fail on every affected darwin/arm64 run — converting a fast expected-failure into a slow hard failure. Please confirm finprofiled.go now completes well under the timeout.

2. This removal is only safe if every removed case now passes.
Per runner_test.go:350, a case still listed as an xfail that succeeds triggers t.Fatalf("unexpected success for xfail case"), but there is no reverse guard: a removed case that still fails will surface as a hard CI failure. This is inherently CI-verified, not statically knowable — I'm flagging it so the removals are validated against a green goroot run on all affected platforms (darwin/arm64 and linux/amd64, go1.24/1.25/1.26) before merge.

Security and documentation reviews found no issues (the test/goroot/README.md references to xfail.yaml are generic and remain accurate).

Comment thread test/goroot/xfail.yaml
directive: run
case: tinyfin.go
reason: go1.25 goroot run failure on linux/amd64

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: this deletion leaves a stray blank line here — it is now the only blank line in the entire xfails sequence, so the two surrounding groups read as a formatting gap. Since you're already editing this exact region, dropping the blank line would keep the sequence uniformly formatted. Cosmetic / non-blocking (YAML ignores it).

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

65676dde21e4 | workflow run | long-term charts

Program measurements

Platform Workload File size vs main Build vs main Run vs main
Linux cprintf 18544 B +0.0% 295.554 ms -11.2% (better) 1.251 ms -5.9% (better)
Linux fmtprintf 2217608 B +0.0% 3.111 s -6.2% (better) 2.468 ms -1.2% (better)
Linux println 71504 B +0.0% 301.206 ms -2.5% (better) 1.541 ms -13.5% (better)
macOS cprintf 84672 B +0.0% 591.107 ms +56.0% (worse) 4.582 ms +46.4% (worse)
macOS fmtprintf 2361520 B +0.0% 6.405 s +140.7% (worse) 30.577 ms +55.7% (worse)
macOS println 125712 B +0.0% 621.805 ms +89.0% (worse) 6.644 ms +79.6% (worse)
Core language and compiler benchmarks
Platform Benchmark ns/op vs main
Linux BenchmarkLookupPCRandom 13.440 ns/op +0.8% (worse)
Linux BenchmarkMergeCompilerFlags 151.700 ns/op +0.1% (worse)
Linux BenchmarkMergeLinkerFlags 95.140 ns/op +0.7% (worse)
Linux BenchmarkChannelBuffered 34.330 ns/op +1.0% (worse)
Linux BenchmarkChannelHandoff 27134 ns/op -9.5% (better)
Linux BenchmarkDefer 44.700 ns/op +0.8% (worse)
Linux BenchmarkDirectCall 1.557 ns/op +0.0%
Linux BenchmarkGlobalRead 1.871 ns/op +0.1% (worse)
Linux BenchmarkGlobalWrite 2.491 ns/op +0.0% (worse)
Linux BenchmarkGoroutine 31519 ns/op -3.1% (better)
Linux BenchmarkInterfaceCall 8.099 ns/op +0.1% (worse)
Linux BenchmarkRuntimeGetG 1.879 ns/op +0.4% (worse)
macOS BenchmarkLookupPCRandom 17.480 ns/op +52.1% (worse)
macOS BenchmarkMergeCompilerFlags 254.400 ns/op +100.0% (worse)
macOS BenchmarkMergeLinkerFlags 157.500 ns/op +118.4% (worse)
macOS BenchmarkChannelBuffered 27.530 ns/op +20.6% (worse)
macOS BenchmarkChannelHandoff 9119 ns/op +27.1% (worse)
macOS BenchmarkDefer 30.030 ns/op +10.6% (worse)
macOS BenchmarkDirectCall 1.071 ns/op +5.4% (worse)
macOS BenchmarkGlobalRead 1.208 ns/op +18.4% (worse)
macOS BenchmarkGlobalWrite 1.146 ns/op +9.6% (worse)
macOS BenchmarkGoroutine 55587 ns/op +128.9% (worse)
macOS BenchmarkInterfaceCall 4.557 ns/op +3.7% (worse)
macOS BenchmarkRuntimeGetG 2.523 ns/op +23.8% (worse)

Compared only with the latest matching platform in the main series.

@cpunion

cpunion commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

Interim analysis of the manually dispatched GOROOT matrix:

  • The dedicated workflow is not green on the current main baseline. It treats existing XPASS entries as failures and the macOS resource guard can turn low swap into a large cascade of failed subtests.
  • Across the 14 jobs completed so far, no failing subtest matches an xfail removed by this PR for the same platform and Go version.
  • Existing XPASS examples include goprint.go, init1.go, recover2.go, deferfin.go, zerodivide.go, and Linux fixedbugs/issue5493.go (the latter remains xfailed on Linux; this PR only removes its verified Darwin entries).
  • Other failures are existing cases covered by pending work or platform limits, including convert5.go, issue31546.go, issue52072.go, issue72063.go, nilptr2.go, caller-info cases, thread creation failures, and timeouts.
  • Two macOS shards are still running. I will use their final per-case results as well; this analysis does not justify reverting any removal in the PR so far.

Full run: https://github.com/cpunion/llgo/actions/runs/30736831931

@cpunion cpunion changed the title test/goroot: retire stale native run xfails test/goroot: synchronize native run expectations Aug 2, 2026
@cpunion

cpunion commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the full-matrix failures in 5032172ba.

For the review concern specifically, finprofiled.go completed well below the 1-minute limit in every native lane of the first full run:

  • macOS Go 1.24.11: 11.35s
  • macOS Go 1.26.5: 14.81s
  • Ubuntu Go 1.24.11: 15.62s
  • Ubuntu Go 1.26.5: 16.29s

The removed xfails were not responsible for any failure in that run. The red jobs were existing XPASS entries, missing Linux expectations, host thread limits, and resource-guard thresholds. The update moves nondeterministic pass/fail cases to flakes, preserves deterministic failures as xfails, adds two exact host skips, disables the fixed swap-free floor only on macOS, and raises the per-process-group RSS ceiling to 5 GiB for the observed 4.11 GiB bug449.go build. Shards and timeouts are unchanged.

A new macOS/Ubuntu × Go 1.24/1.26 × 4-shard validation is running here: https://github.com/cpunion/llgo/actions/runs/30739767737

@cpunion

cpunion commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

Additional check while the updated full matrix is queued: the two macOS shards that had been masked by the old swap-resource cascade contained 18 remaining xfail cases. I reran all of them locally with the same toolchain generations and the updated resource settings:

  • macOS arm64 Go 1.24.11: 6/6 remained expected failures
  • macOS arm64 Go 1.26.5: 12/12 remained expected failures

This closes the only coverage gap left by the first run; no additional stale XPASS or unclassified failure was found.

@cpunion

cpunion commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Merged current main and resolved the xfail.yaml conflict semantically in 51b9e27e6:

  • kept all 122 compiler/toolchain-specific cases in the new notapplicable.yaml, with the canonical not applicable: ...; ...; supporting ... is not an LLGo compatibility goal reasons from main
  • did not reintroduce any of those cases into xfails
  • applied the PR removals/additions on top of the current main expectations; the resulting xfail / not_applicable overlap is zero

I also checked the completed dedicated matrix run after the earlier update. Its five red jobs were not caused by a removed xfail: four were fixedbugs/bug449.go hitting the hosted-runner resource guard/build timeout, and one was Go 1.24 macOS fixedbugs/issue16016.go exhausting the OS-thread limit. Follow-up 65676dde2 classifies those exact lanes as host skips. A current-main local probe showed bug449.go crossing both 6 GiB and 10 GiB hard RSS limits within about 20 seconds, so raising the workflow-wide limit was not safe; the workflow now retains the default 4 GiB guard and the obsolete Go 1.26 macOS timeout entry was removed.

Local validation:

  • go test ./test/goroot -run "^Test" -skip "^TestGoRootRunCases$" -count=1
  • focused Go 1.24.11 and Go 1.26.5 runs for bug449.go and issue16016.go, both passing through the intended host-skip classification
  • no duplicate host_skips, flakes, or xfails; all expectation classes remain disjoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant