diff options
Diffstat (limited to 'deps/uv/test/test-tcp-bind6-error.c')
-rw-r--r-- | deps/uv/test/test-tcp-bind6-error.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/uv/test/test-tcp-bind6-error.c b/deps/uv/test/test-tcp-bind6-error.c index 1d65f3de3e..b762bcb3d1 100644 --- a/deps/uv/test/test-tcp-bind6-error.c +++ b/deps/uv/test/test-tcp-bind6-error.c @@ -39,6 +39,9 @@ TEST_IMPL(tcp_bind6_error_addrinuse) { uv_tcp_t server1, server2; int r; + if (!can_ipv6()) + RETURN_SKIP("IPv6 not supported"); + ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server1); @@ -73,6 +76,9 @@ TEST_IMPL(tcp_bind6_error_addrnotavail) { uv_tcp_t server; int r; + if (!can_ipv6()) + RETURN_SKIP("IPv6 not supported"); + ASSERT(0 == uv_ip6_addr("4:4:4:4:4:4:4:4", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); @@ -98,6 +104,9 @@ TEST_IMPL(tcp_bind6_error_fault) { uv_tcp_t server; int r; + if (!can_ipv6()) + RETURN_SKIP("IPv6 not supported"); + garbage_addr = (struct sockaddr_in6*) &garbage; r = uv_tcp_init(uv_default_loop(), &server); @@ -123,6 +132,9 @@ TEST_IMPL(tcp_bind6_error_inval) { uv_tcp_t server; int r; + if (!can_ipv6()) + RETURN_SKIP("IPv6 not supported"); + ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr1)); ASSERT(0 == uv_ip6_addr("::", TEST_PORT_2, &addr2)); @@ -149,6 +161,9 @@ TEST_IMPL(tcp_bind6_localhost_ok) { uv_tcp_t server; int r; + if (!can_ipv6()) + RETURN_SKIP("IPv6 not supported"); + ASSERT(0 == uv_ip6_addr("::1", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); |