You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Match Go legacy builtin print/println float exponent formatting by padding %e exponents to three digits for the !go1.26 runtime path.
Add focused test/go coverage that compares baseline Go output with llgo output for builtin print/println, nil interfaces/maps/slices, integers, floats, complex values, bools, strings, spacing, deferred print calls, constant complex printing, and the generic type-switch float print shape from typeparam/typeswitch5.go.
Remove the now-fixed print.go, deferprint.go, ken/cplx0.go, and typeparam/typeswitch5.go GOROOT xfail entries for go1.24/go1.25 on darwin/arm64 and linux/amd64.
goprint.go is intentionally not removed from xfail here. With the exponent format fixed, go1.25 still mismatches because go println(...) output can be truncated before the goroutine finishes; that is a goroutine/NumGoroutine scheduling issue, not a print/float formatting issue.
GOROOT CI is slow/disabled, so this PR keeps durable coverage in test/go. Normal PR CI should run from the fork branch.
Targeted Tests
go test ./test/goroot -count=1 -run TestGoRootRunCases -args -goroot /Users/lijie/sdk/go1.24.11 -go /Users/lijie/sdk/go1.24.11/bin/go -dirs .,ken,typeparam -case '^(print|deferprint)\\.go$|^typeparam/typeswitch5\\.go$|^ken/cplx0\\.go$' -run-timeout 2m
go test ./test/goroot -count=1 -run TestGoRootRunCases -args -goroot /Users/lijie/sdk/go1.25.0 -go /Users/lijie/sdk/go1.25.0/bin/go -dirs .,ken,typeparam -case '^(print|deferprint)\\.go$|^typeparam/typeswitch5\\.go$|^ken/cplx0\\.go$' -run-timeout 2m
go test ./test/goroot -count=1 -run TestGoRootRunCases -args -goroot /Users/lijie/sdk/go1.26.0 -go /Users/lijie/sdk/go1.26.0/bin/go -dirs .,ken,typeparam -case '^(print|deferprint)\\.go$|^typeparam/typeswitch5\\.go$|^ken/cplx0\\.go$' -run-timeout 2m
go test ./test/goroot -count=1 -run TestGoRootRunCases -args -goroot /Users/lijie/sdk/go1.25.0 -go /Users/lijie/sdk/go1.25.0/bin/go -dirs . -case '^goprint\\.go$' -xfail /tmp/llgo-empty-xfail.yaml -run-timeout 2m (expected mismatch; classified out of scope)
go test ./test/go -count=1
go test ./ssa ./cl ./runtime/internal/runtime -count=1 (./ssa and ./cl passed; ./runtime/internal/runtime is not in the main module)
(cd runtime && go test ./internal/runtime ./abi ./internal/test -count=1)
(cd runtime && go test ./internal/clite ./internal/clite/bitcast -count=1)
Root cause: the runtime change intentionally normalizes legacy builtin print/println float and complex output to Go's three-digit exponent form for pre-Go 1.26, but several fixed LLGo expectations still used the previous C %e two-digit exponent form. That broke cl fixture comparisons and the ESP32-C3 float-1664 startup regression check.
Fix: updated the affected fixed expectations (cl/_testgo, cl/_testrt, cl/_testdata, and _demo/embed/test_esp32c3_startup.sh) to the new legacy print format. I also expanded test/go/print_builtin_test.go to cover non-zero positive and negative exponents so this behavior is covered outside the slow goroot suite.
Local tests:
go test ./cl -run 'TestRunAndTestFrom(Testgo|Testrt|Testdata)/(alias|invoke|multiret|struczero|complex|cpkgimp)$' -count=1 -v ✅\n- go test ./test/go -count=1 -v ✅\n- go test ./test -run TestBuiltinPrintLegacyFloatFormat -count=1 -v ✅\n\nPushed commit: 25ff4833525cc536709436d1db85d303a30698cc to cpunion/llgo:codex/goroot-print-coverage. New PR CI is running for this head; I will keep watching and iterate if anything fails.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
%eexponents to three digits for the!go1.26runtime path.test/gocoverage that compares baseline Go output withllgooutput for builtin print/println, nil interfaces/maps/slices, integers, floats, complex values, bools, strings, spacing, deferred print calls, constant complex printing, and the generic type-switch float print shape fromtypeparam/typeswitch5.go.print.go,deferprint.go,ken/cplx0.go, andtypeparam/typeswitch5.goGOROOT xfail entries for go1.24/go1.25 on darwin/arm64 and linux/amd64.goprint.gois intentionally not removed from xfail here. With the exponent format fixed, go1.25 still mismatches becausego println(...)output can be truncated before the goroutine finishes; that is a goroutine/NumGoroutine scheduling issue, not a print/float formatting issue.GOROOT CI is slow/disabled, so this PR keeps durable coverage in
test/go. Normal PR CI should run from the fork branch.Targeted Tests
go test ./test/goroot -count=1 -run TestGoRootRunCases -args -goroot /Users/lijie/sdk/go1.24.11 -go /Users/lijie/sdk/go1.24.11/bin/go -dirs .,ken,typeparam -case '^(print|deferprint)\\.go$|^typeparam/typeswitch5\\.go$|^ken/cplx0\\.go$' -run-timeout 2mgo test ./test/goroot -count=1 -run TestGoRootRunCases -args -goroot /Users/lijie/sdk/go1.25.0 -go /Users/lijie/sdk/go1.25.0/bin/go -dirs .,ken,typeparam -case '^(print|deferprint)\\.go$|^typeparam/typeswitch5\\.go$|^ken/cplx0\\.go$' -run-timeout 2mgo test ./test/goroot -count=1 -run TestGoRootRunCases -args -goroot /Users/lijie/sdk/go1.26.0 -go /Users/lijie/sdk/go1.26.0/bin/go -dirs .,ken,typeparam -case '^(print|deferprint)\\.go$|^typeparam/typeswitch5\\.go$|^ken/cplx0\\.go$' -run-timeout 2mgo test ./test/goroot -count=1 -run TestGoRootRunCases -args -goroot /Users/lijie/sdk/go1.25.0 -go /Users/lijie/sdk/go1.25.0/bin/go -dirs . -case '^goprint\\.go$' -xfail /tmp/llgo-empty-xfail.yaml -run-timeout 2m(expected mismatch; classified out of scope)go test ./test/go -count=1go test ./ssa ./cl ./runtime/internal/runtime -count=1(./ssaand./clpassed;./runtime/internal/runtimeis not in the main module)(cd runtime && go test ./internal/runtime ./abi ./internal/test -count=1)(cd runtime && go test ./internal/clite ./internal/clite/bitcast -count=1)git diff --check