From d277f71333fc7a35bd253913422988ceead104f7 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Tue, 26 Sep 2023 21:55:32 +0200 Subject: [PATCH] test: skip tests when ipv6 is not available (#4151) --- test/test-tcp-connect6-error.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test-tcp-connect6-error.c b/test/test-tcp-connect6-error.c index 075670ce..70faf323 100644 --- a/test/test-tcp-connect6-error.c +++ b/test/test-tcp-connect6-error.c @@ -49,6 +49,9 @@ TEST_IMPL(tcp_connect6_error_fault) { int r; uv_connect_t req; + if (!can_ipv6()) + RETURN_SKIP("IPv6 not supported"); + garbage_addr = (const struct sockaddr_in6*) &garbage; r = uv_tcp_init(uv_default_loop(), &server); @@ -76,6 +79,9 @@ TEST_IMPL(tcp_connect6_link_local) { uv_connect_t req; uv_tcp_t server; + if (!can_ipv6()) + RETURN_SKIP("IPv6 not supported"); + #if defined(__QEMU__) /* qemu's sockaddr_in6 translation is broken pre-qemu 8.0.0 * when host endianness != guest endiannes.