Skip to content

[Based on #2098] runtime,test: complete Go 1.26 standard-library coverage#2134

Open
cpunion wants to merge 7 commits into
xgo-dev:mainfrom
cpunion:codex/go126-stdlib-coverage
Open

[Based on #2098] runtime,test: complete Go 1.26 standard-library coverage#2134
cpunion wants to merge 7 commits into
xgo-dev:mainfrom
cpunion:codex/go126-stdlib-coverage

Conversation

@cpunion

@cpunion cpunion commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Depends on #2098

Problem

The Go 1.26 upgrade added packages and exported APIs that were not all represented by test/std. The coverage job only checked packages that already had a test directory, so a missing public package was invisible. Executable-only tests also did not prove that standard-library code initialized and ran correctly from c-shared and c-archive C consumers.

Fix

  • require a test/std package for every public package reported by Go 1.26.5 (176/176);
  • keep the existing exported-identifier checker unchanged;
  • add functional tests for missing packages and newly exposed APIs, including HPKE, ML-KEM helpers, runtime/cgo.Handle, runtime/debug, plugin failure behavior, and testing/synctest;
  • add the minimal Go 1.26 runtime bridges exposed by those tests without duplicating runtime,cl: add Go-compatible sampled memory profiling #2027's memory-profile work;
  • teach llgo test -c to produce runnable c-shared and c-archive test libraries;
  • run every test/std package as an executable on Linux and macOS, and through real C shared/static consumers on Ubuntu.

The tests call APIs and assert behavior; exported-symbol completeness remains a separate compile-time invariant.

This PR has an independent diff of +1156/-25 across 36 files.

Validation

  • macOS arm64 / Go 1.26.5: changed runtime/debug tests pass with real LLGo.
  • Ubuntu arm64 / Go 1.26.5 / LLVM 19.1.7: runtime/debug passes as an executable, c-shared, and c-archive in an 8 GiB, 2 CPU, no-swap container.
  • Public package coverage remains 176/176.
  • Focused internal/build tests pass.

Follow-up to #2088 and #2108.

@cpunion
cpunion force-pushed the codex/go126-stdlib-coverage branch from 29fc165 to ceee7f1 Compare July 20, 2026 08:56
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cpunion cpunion added go1.26 Go 1.26 compatibility and support go-test-compat Go standard-library and GOROOT test compatibility labels Jul 20, 2026
@cpunion
cpunion force-pushed the codex/go126-stdlib-coverage branch 2 times, most recently from af86ec8 to 087adb7 Compare July 23, 2026 10:50
cpunion added 7 commits July 24, 2026 11:23
Provide the synctest, Darwin CPU, Linux gettimeofday, and all-thread syscall hooks required by Go 1.26 standard-library code in c-shared and c-archive builds. Extend the export demo so C consumers link and execute fmt, goroutine, syscall, funcinfo, and explicit DWARF paths in both library modes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go1.26 Go 1.26 compatibility and support go-test-compat Go standard-library and GOROOT test compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant