net/http/cgi — validation proof
Go’s own net/http/cgi 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 net/http/cgi row in
Validated Test Packages.
Validated 2026-10-25 · converter b5fc1294d
39 matched · 1 disclosed — Go 1.26.10, windows/amd64, converted package
src/core/net/http/cgi.
Measured at Release (tiered JIT off), oracle go version go1.26.10 windows/amd64.
Verdicts
| Test | go test |
go2cs |
|---|---|---|
Test500WithEmptyHeaders |
pass | pass |
Test500WithNoContentType |
pass | pass |
Test500WithNoHeaders |
pass | pass |
TestCGIBasicGet |
pass | pass |
TestCGIBasicGetAbsPath |
pass | pass |
TestCGIBasicPost |
pass | pass |
TestCGIEnvIPv6 |
pass | pass |
TestCGIPostChunked |
pass | pass |
TestChildContentType |
pass | pass |
TestChildContentType/html |
pass | pass |
TestChildContentType/jpg |
pass | pass |
TestChildContentType/no_body |
pass | pass |
TestChildContentType/text |
pass | pass |
TestChildOnlyHeaders |
pass | pass |
TestCopyError |
pass | fail (disclosed) |
TestDir |
pass | pass |
TestDropProxyHeader |
pass | pass |
TestDupHeaders |
pass | pass |
TestEnvOverride |
pass | pass |
TestHandlerStderr |
pass | pass |
TestHostingOurselves |
pass | pass |
TestIncludedServerProtocol |
pass | pass |
TestInternalRedirect |
pass | pass |
TestKillChildAfterCopyError |
pass | pass |
TestNilRequestBody |
pass | pass |
TestPathInfo |
pass | pass |
TestPathInfoDirRoot |
pass | pass |
TestPathInfoNoRoot |
pass | pass |
TestRedirect |
pass | pass |
TestRemoveLeadingDuplicates |
pass | pass |
TestRequest |
pass | pass |
TestRequestWithTLS |
pass | pass |
TestRequestWithoutHost |
pass | pass |
TestRequestWithoutRemotePort |
pass | pass |
TestRequestWithoutRequestURI |
pass | pass |
TestResponse |
pass | pass |
TestResponse/html |
pass | pass |
TestResponse/jpg |
pass | pass |
TestResponse/no_body |
pass | pass |
TestResponse/text |
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 |
|---|---|---|
TestCopyError |
runtime-capability |
the test’s own instrument is a full-process goroutine dump: handlerRunning() calls runtime.Stack(buf, true) and regexp-matches net/http/cgi\.\(\*Handler\)\.ServeHTTP in it, i.e. it asks the runtime to render ANOTHER goroutine’s frames and then greps them. That facility is defined over the replaced runtime’s own internals – Go walks every g’s saved stack through its scheduler; the CLR has no supported way to walk another thread’s stack, so runtime.Stack’s all parameter degrades by documented design to the calling thread’s own trace (src/core/runtime/managed_impl.cs: “all=true reports only the calling thread – the CLR has no supported way to walk another thread’s stack”). The probe is therefore false for a handler running on any other thread, and the first assert – the pre-conn.Close liveness check pinned here – fails before the test reaches the behavior it was written to measure. A truthful managed rendering of a foreign thread’s Go frames does not exist at any cost, and synthesizing a plausible ServeHTTP frame into the dump would pass this regexp while proving nothing about whether any handler is running, which is fabrication rather than implementation; the row is pinned as failing for that reason. The behavior actually under test – Handler.ServeHTTP detecting a copy error and killing the CGI child rather than blocking forever on exec.Cmd.Wait – is proven independently, on the same run, by the passing sibling TestKillChildAfterCopyError (integration_test.go:93), which drives the identical path through a limitWriter that errors at 50 KiB and asserts the truncated output: the converted host.go logged Go’s own line, cgi: copy error: past write limit, and the test passed. What is lost here is the instrument, not the behavior. On windows/amd64 the package has 39 comparable verdicts, 38 matching, this row the only divergence, with Go’s side clean. |