go/build — validation proof

Go’s own go/build test suite, converted to C# by go2cs, built against the converted standard library, run under the Go-semantics test host, and compared verdict for verdict against a clean go test -json baseline of the same sources. This page is generated by the converter from that comparison — it is the evidence behind the go/build row in Validated Test Packages.

Validated 2026-08-29 · converter ebb486dbc

57 matched · 1 disclosed — Go 1.23.12, windows/amd64, converted package src/core/go/build.

Verdicts

Test go test go2cs
TestAllTags pass pass
TestAllTagsNonSourceFile pass pass
TestCgoImportsIgnored pass pass
TestDependencies pass pass
TestDirectives pass pass
TestDotSlashImport pass pass
TestEmptyFolderImport pass pass
TestEmptyImport pass pass
TestExpandSrcDir pass pass
TestFindImports pass pass
TestGoodOSArch pass pass
TestGoodOSArchFile pass pass
TestImportCmd pass pass
TestImportDirNotExist pass pass
TestImportDirNotExist/GO111MODULE=off pass pass
TestImportDirNotExist/GO111MODULE=on pass pass
TestImportPackageOutsideModule pass pass
TestImportVendor pass pass
TestImportVendorFailure pass pass
TestImportVendorParentFailure pass pass
TestIsAllowed pass pass
TestIssue23594 pass pass
TestIssue56509 pass pass
TestLocalDirectory pass fail (disclosed)
TestMatch pass pass
TestMatchFile pass pass
TestMissingImportErrorRepetition pass pass
TestMultiplePackageImport pass pass
TestReadComments pass pass
TestReadEmbed pass pass
TestReadFailuresIgnored pass pass
TestReadGoInfo pass pass
TestShellSafety pass pass
TestShouldBuild pass pass
TestShouldBuild/AfterPackage pass pass
TestShouldBuild/And pass pass
TestShouldBuild/And2 pass pass
TestShouldBuild/BinaryOnly pass pass
TestShouldBuild/BinaryOnly2 pass pass
TestShouldBuild/Cgo pass pass
TestShouldBuild/Cgo2 pass pass
TestShouldBuild/Comment1 pass pass
TestShouldBuild/Comment2 pass pass
TestShouldBuild/Comment3 pass pass
TestShouldBuild/Comment4 pass pass
TestShouldBuild/Comment5 pass pass
TestShouldBuild/MissingBuild2 pass pass
TestShouldBuild/Or pass pass
TestShouldBuild/Or2 pass pass
TestShouldBuild/TooClose pass pass
TestShouldBuild/TooClose2 pass pass
TestShouldBuild/TooCloseNo pass pass
TestShouldBuild/TooCloseNo2 pass pass
TestShouldBuild/ValidGoBuild pass pass
TestShouldBuild/Yes pass pass
TestShouldBuild/Yes2 pass pass
TestStdlibLowercase pass pass
TestVendorPackages pass pass

Disclosed divergences

A disclosed divergence is a specific Go assertion the managed CLR provably cannot satisfy — not a skipped test and not a tolerance. Each one is pinned by exact failure signature in the package’s hand-owned go2cs_test_disclosures.json; a disclosed test that fails any other way is still a hard mismatch.

Test Class Pinned reason
TestLocalDirectory host-identity the assert requires the process’s CURRENT DIRECTORY to sit under the GOROOT the process REPORTS: it calls os.Getwd() and hands the result to ImportDir, then demands the answer be the GOROOT-relative import path “go/build”. Go’s own go test satisfies it for free by running the test binary with cwd = GOROOT/src/go/build; the converted host runs every suite in a sandbox run-directory (src/core/testing, CreateRunDirectory) so a test may write without touching the real tree, and ImportDir finds that directory under no known root and answers “.” — which is the honest result for a path outside GOROOT and GOPATH, not a conversion defect. go/build itself converts and compiles with ZERO errors and 57 of its 58 tests match. The sandbox’s ancestry view (PackageAncestry) deliberately does NOT repoint GOROOT at itself, and that choice is what this disclosure pays for: reads THROUGH a junction resolve to real content, but a directory WALK does not descend into one, so repointing GOROOT would regress two already-validated packages that walk it — compress/gzip’s issue14937 test and path/filepath (measured against Go 1.23.1: a *.gz count under a junction-mirrored root finds 0 where the real tree has 4, and a walk of src/unicode reports 1 entry against the real 19). PackageAncestry’s own documentation names this test as the one shape the ancestry cannot serve, ‘which is why that package is censused rather than closed’. Same root as internal/coverage/cfile’s TestIssue59563TruncatedCoverPkgAll, which the same cwd-vs-reported-GOROOT identity breaks in a different place: there the toolchain reads the staged src/go.mod as an ordinary module named std and emits std/-prefixed package paths, where this one gets no root at all and emits “.”. One cause, two manifestations. Retires only if the host can place cwd under the reported GOROOT without repointing GOROOT at a junction view — e.g. a per-test opt-in that runs a READ-ONLY test in the real package directory. That is a larger mechanism than one row, and ‘this test only reads’ is not something the host can detect, so it is not proposed here.

Excluded declarations

Declarations filtered from both sides of the comparison, and therefore not claimed above: Benchmark, Fuzz and Example declarations the converted host does not execute, plus any test requiring a capability the managed runtime does not provide — a testing member the host has not implemented, or a platform behavior it provably cannot reproduce. Each is named with the capability it needs.