Repository navigation
test: Fix IPv6 check on BSD systems - #22103
Merged
Merged
Conversation
theStack
approved these changes
May 30, 2021
theStack
left a comment
Contributor
There was a problem hiding this comment.
Nice find, thanks for improving the test framework for *BSD users!
I can confirm that the fix also works on OpenBSD 6.9. 🚀
master branch:
$ python3
Python 3.8.8 (default, Apr 19 2021, 10:23:47)
[Clang 10.0.1 ] on openbsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> from test.functional.test_framework.netutil import test_ipv6_local
>>> test_ipv6_local()
False
>>>
PR branch:
$ python3
Python 3.8.8 (default, Apr 19 2021, 10:23:47)
[Clang 10.0.1 ] on openbsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> from test.functional.test_framework.netutil import test_ipv6_local
>>> test_ipv6_local()
True
>>>
ACK 2be3572
Member
|
ACK 2be3572 - nice improvement. I checked that with this change ipv6 related tests in
Note that bitcoin/test/functional/rpc_bind.py Lines 68 to 70 in 619e930 |
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jul 1, 2021
2be3572 test: Fix IPv6 check on BSD systems (nthumann) Pull request description: I noticed that `test_ipv6_local()` always returns `False` on macOS or FreeBSD, even though IPv6 is working perfectly fine. This causes `test/functional/rpc_bind.py --ipv6` and `test/functional/feature_proxy.py` to skip their run. Apparently, there's a check if the port number is `0` (see [here](https://github.com/freebsd/freebsd-src/blob/64881da478071431a2d9e62613997a5772c56cdf/sys/netinet6/udp6_usrreq.c#L248) or [here](https://github.com/apple/darwin-xnu/blob/8f02f2a044b9bb1ad951987ef5bab20ec9486310/bsd/netinet6/udp6_usrreq.c#L282)), while Linux has no problem with this. This is fixed by specifying any other port number than `0`, e.g. `1`. Still, because of `SOCK_DGRAM`, no actual connection is made. ACKs for top commit: fanquake: ACK 2be3572 - nice improvement. I checked that with this change ipv6 related tests in `feature_proxy.py` are being run. theStack: ACK 2be3572 Tree-SHA512: 8417c2d3cf71050529f3fa409a03872040fe5d249eae4172f276e62156e505a20d375b963712a186c9ad7967d8a497b5900d327c74a9693f68c33063871d4691
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jul 15, 2021
2be3572 test: Fix IPv6 check on BSD systems (nthumann) Pull request description: I noticed that `test_ipv6_local()` always returns `False` on macOS or FreeBSD, even though IPv6 is working perfectly fine. This causes `test/functional/rpc_bind.py --ipv6` and `test/functional/feature_proxy.py` to skip their run. Apparently, there's a check if the port number is `0` (see [here](https://github.com/freebsd/freebsd-src/blob/64881da478071431a2d9e62613997a5772c56cdf/sys/netinet6/udp6_usrreq.c#L248) or [here](https://github.com/apple/darwin-xnu/blob/8f02f2a044b9bb1ad951987ef5bab20ec9486310/bsd/netinet6/udp6_usrreq.c#L282)), while Linux has no problem with this. This is fixed by specifying any other port number than `0`, e.g. `1`. Still, because of `SOCK_DGRAM`, no actual connection is made. ACKs for top commit: fanquake: ACK 2be3572 - nice improvement. I checked that with this change ipv6 related tests in `feature_proxy.py` are being run. theStack: ACK 2be3572 Tree-SHA512: 8417c2d3cf71050529f3fa409a03872040fe5d249eae4172f276e62156e505a20d375b963712a186c9ad7967d8a497b5900d327c74a9693f68c33063871d4691
gwillen
pushed a commit
to ElementsProject/elements
that referenced
this pull request
Jun 1, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that
test_ipv6_local()always returnsFalseon macOS or FreeBSD, even though IPv6 is working perfectly fine. This causestest/functional/rpc_bind.py --ipv6andtest/functional/feature_proxy.pyto skip their run.Apparently, there's a check if the port number is
0(see here or here), while Linux has no problem with this.This is fixed by specifying any other port number than
0, e.g.1. Still, because ofSOCK_DGRAM, no actual connection is made.