Skip to content

test798: force IPv4 to avoid cross-runner port aliasing - #22318

Closed
GrahamCampbell wants to merge 1 commit into
curl:masterfrom
GrahamCampbell:test798-ipv4
Closed

test798: force IPv4 to avoid cross-runner port aliasing#22318
GrahamCampbell wants to merge 1 commit into
curl:masterfrom
GrahamCampbell:test798-ipv4

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Contributor

test798 is the only test fetching http://localhost:%HTTPPORT without -4, since it needs the hostname for its folded domain=localhost cookie. curl tries ::1 first, but the test HTTP server is IPv4-only. On the BSDs, IPv4 and IPv6 have separate ephemeral port namespaces, so with every test server binding port 0, another parallel runner's IPv6-bound server can hold the same numeric port. curl then connects to the wrong runner's server, which cannot open its own log/N/test798 and closes without a response, giving exit 52 and an empty server.input.

This PR fixes this flake by adding -4 matches what tests 389 and 392 already do. Linux is immune because wildcard IPv6 binds occupy the IPv4 port too. Seen in https://github.com/curl/curl/actions/runs/29229170329/job/86749470571.

@vszakats vszakats closed this in 94fab2d Jul 15, 2026
@vszakats

Copy link
Copy Markdown
Member

Merged, thanks!

@GrahamCampbell
GrahamCampbell deleted the test798-ipv4 branch July 15, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants