[Based on #2098] runtime,test: complete Go 1.26 standard-library coverage#2134
Open
cpunion wants to merge 21 commits into
Open
[Based on #2098] runtime,test: complete Go 1.26 standard-library coverage#2134cpunion wants to merge 21 commits into
cpunion wants to merge 21 commits into
Conversation
Store each immutable Func as one atomic pointer and validate the queried PC from the Func itself. This prevents concurrent cache replacement from combining a PC and function from different writers. Apply the same publication rule to the prebuilt function cache and stress multiple PCs during concurrent first use.
Give each package-backed locality block an owner-local TLS cache so hot accesses are O(1) regardless of the number of touched packages. Keep the block list only for GC reachability and teardown. Require locality variables to be unexported and reject go:linkname aliases. Add codegen, lifecycle, and 2/4/8-package performance coverage.
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.
cpunion
force-pushed
the
codex/go126-stdlib-coverage
branch
from
July 20, 2026 08:56
29fc165 to
ceee7f1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
12 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 fromc-sharedandc-archiveC consumers.Fix
test/stdpackage for every public package reported by exact Go 1.26.5 (176/176)runtimeretains its existing exception and is covered by real runtime testsruntime/cgo.Handle, runtime/debug operations, plugin failure behavior, andtesting/synctestllgo test -cto produce runnablec-sharedandc-archivetest librariestest/stdpackage as an executable on the existing Linux/macOS Go 1.26.5 matrix, and additionally run every package through real C shared/static consumers on UbuntuThe new tests call APIs and assert results; they do not use
_ = pkg.Symbolas a substitute for behavior coverage. Exported-symbol completeness remains a separate compile-time invariant.Dependencies
This PR is based on #2098, which is based on #2090 and #2079. After those merge, the effective changes for this PR are the four commits after
f8e826038.Local validation
test/stdpackages pass as executables,c-shared, andc-archive176/176; all exported identifiers pass the unchanged checker (except the intentionalruntimeexclusion)cmd/internal/test: 72.8% statement coverageinternal/build: 73.7% statement coveragegit diff --checkand Go formatting passFollow-up to #2088 and #2108.