Skip to content

tests, ci: fail instead of skip when IPv6 is expected - #2

Open
david-yu wants to merge 2 commits into
upstream-masterfrom
ipv6/01-test-require-ipv6
Open

david-yu wants to merge 2 commits into
upstream-masterfrom
ipv6/01-test-require-ipv6

Conversation

@david-yu

@david-yu david-yu commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Part 1 of 10 of the IPv6 series, split out of #1 and rebased on current scylladb/seastar master. Based on upstream-master (current scylladb/seastar master), so the diff here is only this PR's 2 commits.

Why

IPv6 tests skip when engine().net().supports_ipv6() is false. That probe opens a datagram channel on ::1 and swallows every exception, so anything that breaks IPv6 socket setup turns the IPv6 tests into skips and the run stays green. A green run therefore says nothing about whether an IPv6 test ran. Every later PR in this stack adds IPv6 tests, so this one goes first.

What

  • tests: fail instead of skip when SEASTAR_TEST_REQUIRE_IPV6 is set (7ec32b2b1) — tests/unit/ipv6_support.hh with ipv6_available_or_skip(): skip by default, fail when SEASTAR_TEST_REQUIRE_IPV6 is set. Used by the gates master already has: ipv6_test, and the dual-stack gate socket_test gained with 731ac075f.
  • ci: fail the Test job when an IPv6 test skips (5350eed5a) — sets the variable for test.yaml's Test step.

Does GHA run the IPv6 tests?

Yes. The Test job's ubuntu:26.04 container has IPv6 on loopback (supports_ipv6() binds ::1), and loopback is all the IPv6 unit tests use. This PR's Test run sets SEASTAR_TEST_REQUIRE_IPV6 and passes on every job that runs the unit tests (x86 and arm; GCC and Clang; debug, dev, release and sanitize; epoll, linux-aio and io_uring), so none of their IPv6 cases skipped. Every later PR in the stack passes the same way.

Testing

On the core-aws VM (Ubuntu 24.04, GCC 14, C++23, RelWithDebInfo, GnuTLS and OpenSSL in one tree), this PR's head builds and passes dns, ipv6, socket, rpc, httpd, httpd_openssl, tls, tls_openssl, network_interface, websocket and unix_domain with SEASTAR_TEST_REQUIRE_IPV6=1, so none of their IPv6 cases skipped.

Stack

  1. tests, ci: fail instead of skip when IPv6 is expected #2 tests, ci: fail instead of skip when IPv6 is expected ← this PR
  2. dns: reach nameservers over IPv6 #3 dns: reach nameservers over IPv6
  3. dns: literals for any family, c-ares error text, link-local nameservers #4 dns: literals for any family, c-ares error text, link-local nameservers
  4. net, http, rpc: dual-stack listeners (IPV6_V6ONLY, IPv4-mapped peers) #5 net, http, rpc: dual-stack listeners (IPV6_V6ONLY, IPv4-mapped peers)
  5. net: IPv6 zones and strict literal parsing #6 net: IPv6 zones and strict literal parsing
  6. tls: do not send IP literals in the SNI extension #7 tls: do not send IP literals in the SNI extension
  7. tls: verify server_name on OpenSSL, opt-in #8 tls: verify server_name on OpenSSL, opt-in
  8. net: ipv6_addr equality and hash, ipv4_addr(socket_address) throws instead of terminating #9 net: ipv6_addr equality and hash, ipv4_addr(socket_address) throws instead of terminating
  9. net: listen on an unspecified address binds any family #10 net: listen on an unspecified address binds any family
  10. http: build the Host header from an address in authority form #11 http: build the Host header from an address in authority form

IPv6 tests gate on engine().net().supports_ipv6() and skip with a log
line when it is false. The probe behind it constructs a datagram channel
on ::1 and swallows every exception, so anything that breaks IPv6 socket
setup (since 731ac07 that includes the IPV6_RECVPKTINFO setsockopt in
the channel constructor) makes every IPv6 test pass without running.

Add tests/unit/ipv6_support.hh with ipv6_available_or_skip(): the same
skip by default, a failure when SEASTAR_TEST_REQUIRE_IPV6 is set in the
environment, for CI and containers that are known to have IPv6. Use it
for the existing gates in ipv6_test and socket_test.
The test container has IPv6 on loopback, which is all the IPv6 unit
tests use, so each of them can run in CI. Set SEASTAR_TEST_REQUIRE_IPV6
for the Test step so one that stops running fails the job instead of
passing with a skip message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant