20/104 Test #20: testmod_network ....................***Failed 0.01 sec
ICONV TESTS
====================
/root/Projekte/libelektra/src/plugins/network/testmod_network.c:27: error in test_addr: could not check ipv4 addr
/root/Projekte/libelektra/src/plugins/network/testmod_network.c:34: error in test_addr: could not check ipv4 addr
/root/Projekte/libelektra/src/plugins/network/testmod_network.c:41: error in test_addr: could not check ipv4 addr
/root/Projekte/libelektra/src/plugins/network/testmod_network.c:48: error in test_addr: could not check ipv4 addr
test_backendhelpers RESULTS: 8 test(s) done. 4 error(s).
Yep. FreeBSD 10.3 too.
I removed the check to a specific errno and also add ipv4/ipv6 tests in de91ab37427e17e2597e8d120296dae2fab2555a
Can you rerun it?
20/106 Test #20: testmod_network ....................***Failed 0.02 sec
ICONV TESTS
====================
/home/mpranj/workspace/libelektra/src/plugins/network/testmod_network.c:27: error in test_addr: could not check ipv4 addr
/home/mpranj/workspace/libelektra/src/plugins/network/testmod_network.c:41: error in test_addr: could not check ipv4 addr
/home/mpranj/workspace/libelektra/src/plugins/network/testmod_network.c:62: error in test_addr: could not check ipv6 addr
/home/mpranj/workspace/libelektra/src/plugins/network/testmod_network.c:76: error in test_addr: could not do addr check (without specifying ipv4/ipv6)
/home/mpranj/workspace/libelektra/src/plugins/network/testmod_network.c:82: error in test_addr: could not do addr check (without specifying ipv4/ipv6)
test_backendhelpers RESULTS: 14 test(s) done. 5 error(s).
Thank you. Seems like the getaddrinfo behaves differently in any case (ipv4, ipv6 and unspecified). So it might be a problem of the not set service or because of the inconsistency in ai_socktype and ai_protocol (at least https://en.wikipedia.org/wiki/Getaddrinfo warns about different behaviour there).
This might be fixed now. Could you please retest?
If it is not, we can simply deactivate this plugin for OpenBSD/NetBSD as now also the ipaddr plugin with the same functionality is available.
This might be fixed now. Could you please retest?
The problem still exists on OpenBSD 6.3.
EDIT: at commit 8f9d3903b9f1d890d192bd238f734d31690aee02
Thank you for the update! Do you get exactly the same failing test cases? Can you repost them please?
The best way to resolve it is to simply exclude the plugin for OpenBSD (as said ipaddr is a fully-fledged replacement). Does https://cmake.org/cmake/help/v3.0/variable/CMAKE_SYSTEM_NAME.html contain OpenBSD? Then the exclusion should be trivial.
Can you repost them please?
75/158 Test #75: testmod_network ..........................***Failed 0.02 sec
NETWORK TESTS
===============
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of ipv4 address <E2><80><9C>192.168.0.1<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of ipv4 address <E2><80><9C>192.168.1.1<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of ipv4 address <E2><80><9C>0.0.0.0<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of ipv6 address <E2><80><9C>2001:0db8:85a3:0000:0000:8a2e:0370:7334<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of ipv6 address <E2><80><9C>2001:0db8:85a3:0:0:8a2e:0370:7334<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of ipv6 address <E2><80><9C>2001:0db8:85a3::8a2e:0370:7334
<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of ipv6 address <E2><80><9C>::1<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of ipv6 address <E2><80><9C>2001::7334<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of ipv6 address <E2><80><9C>::ffff:192.0.2.128<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of ipv6 address <E2><80><9C>::<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of IP address <E2><80><9C>::1<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of IP address <E2><80><9C>192.168.0.1<E2><80><9D> returned -1 instead of 1
/root/libelektra/src/plugins/network/../ipaddr/test_ipaddr.h:24: error in testIP: validation of IP address <E2><80><9C>42.42.42.42<E2><80><9D> returned -1 instead of 1
Does https://cmake.org/cmake/help/v3.0/variable/CMAKE_SYSTEM_NAME.html contain OpenBSD?
openbsd63# uname -s
OpenBSD
Yes, it contains "OpenBSD". I verfied it with a short CMakeLists.txt file.
Thank you! So it should be an easy fix now! Hopefully we can do it for the next release.
Same errors for alpine:3.7
getaddrinfo should not pass an empty string as service when it should not resolve the service. instead a NULL pointer should be passed.
service sets the port in each returned address structure. If this argument is a service name
(see services(5)), it is translated to the corresponding port number. This argument can also be
specified as a decimal number, which is simply converted to binary. If service is NULL, then the port
number of the returned socket addresses will be left uninitialized. If AI_NUMERICSERV is specified in
hints.ai_flags and service is not NULL, then service must point to a string containing a numeric port
number. This flag is used to inhibit the invocation of a name resolution service in cases where it is known
not to be required.
Either node or service, but not both, may be NULL.
@petermax2 can you check if #2079 fixes the issue on OpenBSD as well?
It is now merged in master.
@petermax2 Can you please close the issue if the bug is now also fixed in OpenBSD?
Confirmed build and passing testmod_network for commit 8bca0f0d3d7d6d729e39bf37351dbc7626c37e25 under OpenBSD 6.3.
Test project /root/libelektra/build
Start 75: testmod_network
1/1 Test #75: testmod_network .................. Passed 0.01 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 0.03 sec
Is the problem fixed for Alpine Linux as well?
Is the problem fixed for Alpine Linux as well?
It was too early in the morning for me without coffe to realize what you wrote above
Can you please close the issue if the bug is now also fixed in OpenBSD?
Done :smile:
Most helpful comment
It was too early in the morning for me without coffe to realize what you wrote above
Done :smile: