diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-02-26 15:28:07 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-26 15:28:07 +0100 |
commit | 0dc23679c867629ded5f9534d2ab6e8edf238aa0 (patch) | |
tree | 9cf966507fa2ef0fd17932b600d051df5f7bd2e5 /mysql-test/suite.pm | |
parent | 6efa5efa7dd112b6ac2efdd84235a13cca51c4d4 (diff) | |
parent | 0b9a0a3517ca2b75655f3af5c372cf333d3d5fe2 (diff) | |
download | mariadb-git-0dc23679c867629ded5f9534d2ab6e8edf238aa0.tar.gz |
10.0-base merge
Diffstat (limited to 'mysql-test/suite.pm')
-rw-r--r-- | mysql-test/suite.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index 7f676b7ccfd..6b1d3b7158b 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -43,10 +43,14 @@ sub skip_combinations { unless $::mysqld_variables{'innodb'} eq "ON"; # disable tests that use ipv6, if unsupported - use Socket; - $skip{'include/check_ipv6.inc'} = 'No IPv6' - unless socket SOCK, PF_INET6, SOCK_STREAM, getprotobyname('tcp'); - close SOCK; + sub ipv6_ok() { + use Socket; + return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp'); + # eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation + eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) }; + return $! != 101; + } + $skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok(); %skip; } |