zos: fix udp ipv6 test cases
* Use the correct interface name "LOOPBACK6". * Interpret EADDRNOTAVAIL as multicast not being supported. PR-URL: https://github.com/libuv/libuv/pull/1839 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
parent
8149ac7d7a
commit
d5870c71ea
@ -567,10 +567,6 @@ static int uv__udp_set_membership6(uv_udp_t* handle,
|
||||
optname,
|
||||
&mreq,
|
||||
sizeof(mreq))) {
|
||||
#if defined(__MVS__)
|
||||
if (errno == ENXIO)
|
||||
return UV_ENODEV;
|
||||
#endif
|
||||
return UV__ERR(errno);
|
||||
}
|
||||
|
||||
|
||||
@ -74,9 +74,19 @@ TEST_IMPL(udp_multicast_interface6) {
|
||||
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
r = uv_udp_set_multicast_interface(&server, "::1%lo0");
|
||||
#elif defined(__MVS__)
|
||||
r = uv_udp_set_multicast_interface(&server, "::1%LOOPBACK6");
|
||||
#else
|
||||
r = uv_udp_set_multicast_interface(&server, NULL);
|
||||
#endif
|
||||
|
||||
#if defined(__MVS__)
|
||||
if (r == UV_EADDRNOTAVAIL) {
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
RETURN_SKIP("No ipv6 multicast route");
|
||||
}
|
||||
#endif
|
||||
|
||||
ASSERT(r == 0);
|
||||
|
||||
/* server sends "PING" */
|
||||
|
||||
@ -121,14 +121,20 @@ TEST_IMPL(udp_multicast_join6) {
|
||||
/* join the multicast channel */
|
||||
#if defined(__APPLE__) || \
|
||||
defined(_AIX) || \
|
||||
defined(__MVS__) || \
|
||||
defined(__FreeBSD_kernel__) || \
|
||||
defined(__NetBSD__)
|
||||
r = uv_udp_set_membership(&client, "ff02::1", "::1%lo0", UV_JOIN_GROUP);
|
||||
#elif defined(__MVS__)
|
||||
r = uv_udp_set_membership(&client, "ff02::1", "::1%LOOPBACK6", UV_JOIN_GROUP);
|
||||
#else
|
||||
r = uv_udp_set_membership(&client, "ff02::1", NULL, UV_JOIN_GROUP);
|
||||
#endif
|
||||
|
||||
#if defined(__MVS__)
|
||||
if (r == UV_EADDRNOTAVAIL) {
|
||||
#else
|
||||
if (r == UV_ENODEV) {
|
||||
#endif
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
RETURN_SKIP("No ipv6 multicast route");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user