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:
John Barboza 2018-05-14 07:14:16 -07:00 committed by Santiago Gimeno
parent 8149ac7d7a
commit d5870c71ea
No known key found for this signature in database
GPG Key ID: F28C3C8DA33C03BE
3 changed files with 17 additions and 5 deletions

View File

@ -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);
}

View File

@ -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" */

View File

@ -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");
}