soooo....?
1) could someone enable ipv6 on our test bot? It's essential to test such api as ipv6 is more and more common (although this specific test is no big deal as it's resolving ipv6 localhost) 2) does the bind() test fail? If so I'd like to commit it so it works everywhere. On Tue, Dec 13, 2016 at 1:42 PM, Gustavo Sverzut Barbieri <[email protected]> wrote: > On Tue, Dec 13, 2016 at 12:10 PM, Stefan Schmidt <[email protected]> > wrote: >> hello. >> >> On 13/12/16 12:33, Gustavo Sverzut Barbieri wrote: >>> On Tue, Dec 13, 2016 at 9:28 AM, Stefan Schmidt <[email protected]> >>> wrote: >>>> Hello. >>>> >>>> On 13/12/16 12:25, Tom Hacohen wrote: >>>>> On 13/12/16 10:26, Stefan Schmidt wrote: >>>>>> Hello. >>>>>> >>>>>> On 13/12/16 02:15, Gustavo Sverzut Barbieri wrote: >>>>>>> Stefan, >>>>>>> >>>>>>> Could you check the environment where the test runs? In the log >>>>>>> https://build.enlightenment.org/job/nightly_efl_gcc_x86_64/ws/src/test-suite.log >>>>>>> I see: >>>>>>> >>>>>>> WARNING: your system miss '::1 localhost' or '::1 localhost6' in >>>>>>> /etc/hosts >>>>>>> 98%: Checks: 54, Failures: 1, Errors: 0 >>>>>>> tests/ecore_con/ecore_con_test_efl_net_ip_address.c:1149:F:Efl_Net_Ip_Address:ecore_test_efl_net_ip_address_ipv6_resolve_ok:0: >>>>>>> Expected error=0 (success), got 1073741834 (Couldn't resolve host >>>>>>> name) resolving=[::1] >>>>>>> >>>>>>> maybe the machine is not IPv6-enabled? or nswitch.conf disables >>>>>>> something? >>>>>> >>>>>> Not IPv6 enabled. No entry for ::1 in /etc/hosts and no inet6 address or >>>>>> such shown with ip a. Beber (cc'ed) is handling the systems. He would >>>>>> know why he has IPv6 disabled on them. >>>>>> >>>>>> While I agree that we should have IPv6 everywhere our tests should still >>>>>> work on systems without or do you disagree? I would expect it falls back >>>>>> to IPv4. Something we also need to keep in mind are systems without >>>>>> internet or even without network. But that is a generic problem for the >>>>>> test suite and not really related to your ecore_con revamp. >>>>> >>>>> I think that we are at this point in life that there's no excuse to not >>>>> having IPv6. We shouldn't handle this case in our test suite, but >>>>> instead encourage people to start using it, or at the very least, >>>>> prepare their systems. >>>> >>>> I fully agree (even have native IPv6 here) but we need to be defensive >>>> what we expect to be available in our test suite. >>> >>> well... both are easy to handle... just need to know a reliable way to >>> check for AF_INET6 support... >>> >>> maybe this would do: >>> >>> Eina_Bool ipv6_check(void) { >>> int fd = socket(AF_INET6, SOCK_STREAM, 0); >>> if (fd != -1) close(fd); >>> return fd != -1; >>> } >>> >>> could someone check this in an IPv6 disabled machine? >> >> Not enough: >> >> stefan@workmachine efl (master) $ cat ipv6.c >> #include <stdio.h> >> #include <unistd.h> >> #include <sys/types.h> >> #include <sys/socket.h> >> >> void main(void) { >> int sd = socket(AF_INET6, SOCK_STREAM, 0); >> printf("AF_INET6 socket return: %i\n", sd); >> if (sd != -1) close(sd); >> } >> stefan@workmachine efl (master) $ gcc ipv6.c -o ipv6 >> stefan@workmachine efl (master) $ ./ipv6 >> AF_INET6 socket return: 3 >> >> On the affected slave I get the same: >> 0 06:02:15 stefan@e5-build-gentoo-x86_64-1 ~ $ ./ipv6 >> AF_INET6 socket return: 3 >> >> The INET6 address family for sockets is still available even if no IPv6 >> is configured. > > what if you bind to an ephemeral port? > > #include <sys/socket.h> > #include <netinet/in.h> > #include <stdio.h> > #include <Eina.h> > > static Eina_Bool > _ipv6_enabled_check(void) > { > int fd, r; > struct sockaddr_in6 a = { > .sin6_family = AF_INET6, > .sin6_addr = IN6ADDR_LOOPBACK_INIT, > }; > > fd = socket(AF_INET6, SOCK_STREAM, 0); > if (fd == -1) return EINA_FALSE; > > r = bind(fd, (struct sockaddr *)&a, sizeof(a)); > close(fd); > return r != -1; > } > > int main(void) { > printf("IPv6 supported: %d\n", _ipv6_enabled_check()); > return 0; > } > > > > -- > Gustavo Sverzut Barbieri > -------------------------------------- > Mobile: +55 (16) 99354-9890 -- Gustavo Sverzut Barbieri -------------------------------------- Mobile: +55 (16) 99354-9890 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
