diff options
author | Ben Pfaff <blp@ovn.org> | 2017-11-13 16:57:48 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-11-14 10:00:24 -0800 |
commit | 1f3c6b2d2399be47e63e3e5b65c2dc7efaa09905 (patch) | |
tree | 22487b8591082abac072b081662ef310217b7ef5 /tests | |
parent | b0bf5ef2925c18af4008501aa0717a7752cc5062 (diff) | |
download | openvswitch-1f3c6b2d2399be47e63e3e5b65c2dc7efaa09905.tar.gz |
tests: Try harder to figure out whether IPv6 is supported.
Until now, the tests have tried to create an IPv6 socket to figure out
whether the system under test supports IPv6. Recently we've seen test
failures on Travis which appear to be because, although the system supports
IPv6, test programs are not allowed to connect or bind IPv6 addresses.
This commit refines the test for IPv6 to also try to bind the IPv6
localhost address, which should convert the test failures to "skip"s.
Acked-by: William Tu <u9012063@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Tested-at: https://travis-ci.org/gvrose8192/ovs-experimental
Reported-at: https://github.com/travis-ci/travis-ci/issues/8711
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/atlocal.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/atlocal.in b/tests/atlocal.in index 95f98f4dc..bdf5bd0ca 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -108,7 +108,12 @@ FreeBSD|NetBSD) esac # Check whether to run IPv6 tests. -if perl -e 'use Socket; socket(FH, PF_INET6, SOCK_STREAM, 0) || exit 1;'; then +if perl -e ' + use Socket qw(PF_INET6 SOCK_STREAM pack_sockaddr_in6 IN6ADDR_LOOPBACK); + + socket(S, PF_INET6, SOCK_STREAM, 0) || exit 1; + bind(S, pack_sockaddr_in6(0, IN6ADDR_LOOPBACK)) || exit 1; +'; then HAVE_IPV6=yes else HAVE_IPV6=no |