test: skip tests when ipv6 is not available (#4151)

This commit is contained in:
Santiago Gimeno 2023-09-26 21:55:32 +02:00 committed by GitHub
parent c811169f91
commit d277f71333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.