Skip to content

net/http: skip the CrossOriginProtection server test without TCP - #720

Merged
tamnd merged 1 commit into
mainfrom
csrf-notcp
Oct 27, 2026
Merged

tamnd merged 1 commit into
mainfrom
csrf-notcp

Conversation

@tamnd

@tamnd tamnd commented Oct 27, 2026

Copy link
Copy Markdown
Owner

The problem

On #717, the windows-msvc and windows-mingw jobs fail in http_csrf_test, which came in with #711. The msvc log shows:

--- FAIL: TestCrossOriginProtectionServer (0.00s)
panic: httptest: failed to listen on a port: listen tcp6 [::1]:0: function not implemented

The mingw log has the same two lines. burrow has no TCP on Windows yet, since that needs the readiness poll FD, and every other test that starts an httptest server skips there through a need_tcp helper. This one didn't.

The fix

tests/http_csrf_test.c gets the same HAVE_TCP check and need_tcp helper as http_form_test.c, and TestCrossOriginProtectionServer calls it first, before it allocates anything.

Checks

The file passes the syntax check with -Wall -Wextra and clang-format. Nothing was run, because none of the servers has 5G free, so CI's Windows jobs are the check.

Windows has no TCP yet, so httptest panics on listen there.
@tamnd tamnd added port Porting a standard library package, or part of one area: runtime Scheduler, goroutines, channels, select, defer, panic, netpoller labels Oct 27, 2026
@tamnd
tamnd merged commit d45651a into main Oct 27, 2026
0 of 44 checks passed
@tamnd
tamnd deleted the csrf-notcp branch October 27, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Scheduler, goroutines, channels, select, defer, panic, netpoller port Porting a standard library package, or part of one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant