Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot pass test_numeric_v6 in not support ipv6 kernels #1496

Closed
ruantu opened this issue Aug 22, 2021 · 4 comments
Closed

Cannot pass test_numeric_v6 in not support ipv6 kernels #1496

ruantu opened this issue Aug 22, 2021 · 4 comments
Labels

Comments

@ruantu
Copy link

ruantu commented Aug 22, 2021

Describe the bug
Cannot pass test_numeric_v6 in not support ipv6 kernels

Expected behavior
All tests passed in not support ipv6 kernels.

Actual Behavior
Message:
resolver_test.c:63: Check nng_aio_alloc(&aio, NULL, NULL) succeeds... ok
resolver_test.c:66: Check nng_aio_result(aio) succeeds... failed
nng_aio_result(aio): expected success, got Address invalid (15)
resolver_test.c:67: Check sa.s_in6.sa_family == NNG_AF_INET6... failed
resolver_test.c:68: Check sa.s_in6.sa_port == nuts_be16(80)... failed
resolver_test.c:69: Check memcmp(sa.s_in6.sa_addr, v6loop, 16) == 0... failed
FAILED: 4 conditions have failed.

Whether to conduct test_numeric_v6 condition should be changed to whether the kernel supports ipv6:
[ -f /proc/net/if_inet6 ] && echo 'IPv6 ready system!' || echo 'No IPv6 support found! Compile the kernel!!'

** Environment Details **

  • v1.3.9
  • not support ipv6 kernels.
@ruantu ruantu changed the title Cannot pass test_numeric_v6 in github ci environment Cannot pass test_numeric_v6 in not support ipv6 kernels Aug 22, 2021
@gdamore
Copy link
Contributor

gdamore commented Aug 23, 2021

It seems like it may depend on the specific host you get deployed to, as I've run IPv6 tests on GitHub Actions numerous times in the past.

@gdamore
Copy link
Contributor

gdamore commented Aug 23, 2021

Oh wait this isn't GitHub perhaps.

I think this is a problem with your environment -- if you don't have IPv6 support then these tests are going to fail. I don't really want to compile tests for every operating system to detect whether that OS or build of the OS or even specific environment supports IPv6.

I might be amenable to disabling the test via an environment variable NNG_NO_IPV6 or something like that.

@gdamore gdamore added the tests label Aug 23, 2021
@drws
Copy link

drws commented Oct 30, 2022

I've just encountered the same issue, came here to report and found this. Please implement the NNG_NO_IPV6 or possibly an automatic test for IPv6 support before building. Another possibility would be to make the v6 test failures only output warnings and not fail building if these don't pass.

@limaunion
Copy link

I also have IPv6 disabled at kernel level
+1 for this feature request

gdamore added a commit that referenced this issue Feb 26, 2024
This also checks if the build system has the definitions for AF_INET6, which might
help in some embedded IPv4 only settings.

The resolver test is enhanced to include a check for IPv6 enabled in the kernel.

IPv6 support is enabled by default, of course.
gdamore added a commit that referenced this issue Feb 26, 2024
This also checks if the build system has the definitions for AF_INET6, which might
help in some embedded IPv4 only settings.

The resolver test is enhanced to include a check for IPv6 enabled in the kernel.

IPv6 support is enabled by default, of course.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants