1
0
mirror of https://github.com/libuv/libuv synced 2025-03-28 21:13:16 +00:00

test: fix connect_unspecified

So it passes on boxes without ipv6 support.

Fixes: https://github.com/libuv/libuv/issues/1766
PR-URL: https://github.com/libuv/libuv/pull/1767
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Santiago Gimeno 2018-03-05 22:30:33 +01:00
parent db918361eb
commit 36671bf32c
No known key found for this signature in database
GPG Key ID: F28C3C8DA33C03BE

View File

@ -48,12 +48,14 @@ TEST_IMPL(connect_unspecified) {
(const struct sockaddr*) &addr4,
connect_4) == 0);
ASSERT(uv_tcp_init(loop, &socket6) == 0);
ASSERT(uv_ip6_addr("::", TEST_PORT, &addr6) == 0);
ASSERT(uv_tcp_connect(&connect6,
&socket6,
(const struct sockaddr*) &addr6,
connect_6) == 0);
if (can_ipv6()) {
ASSERT(uv_tcp_init(loop, &socket6) == 0);
ASSERT(uv_ip6_addr("::", TEST_PORT, &addr6) == 0);
ASSERT(uv_tcp_connect(&connect6,
&socket6,
(const struct sockaddr*) &addr6,
connect_6) == 0);
}
ASSERT(uv_run(loop, UV_RUN_DEFAULT) == 0);