1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix failure for ipv6 not enabled

In case of ipv6 not enabled tests like `main.ipv6, rpl.rpl_ipv6` failed on
aarch buildbot.
Fix it by following commits 70dcb46e98 and 0bae1957dd for
`10.2`.
This commit is contained in:
Anel Husakovic
2020-04-13 15:47:02 +02:00
parent 29cdd50822
commit bc1be39972
2 changed files with 4 additions and 3 deletions

View File

@ -269,7 +269,7 @@ my $current_config_name; # The currently running config file template
our @opt_experimentals; our @opt_experimentals;
our $experimental_test_cases= []; our $experimental_test_cases= [];
my $baseport; our $baseport;
# $opt_build_thread may later be set from $opt_port_base # $opt_build_thread may later be set from $opt_port_base
my $opt_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto"; my $opt_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto";
my $opt_port_base= $ENV{'MTR_PORT_BASE'} || "auto"; my $opt_port_base= $ENV{'MTR_PORT_BASE'} || "auto";

View File

@ -33,9 +33,10 @@ sub skip_combinations {
sub ipv6_ok() { sub ipv6_ok() {
use Socket; use Socket;
return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp'); 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{}, if there's no Socket::sockaddr_in6 at all, old Perl installation
eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) }; eval { bind $sock, sockaddr_in6($::baseport, Socket::IN6ADDR_LOOPBACK) };
return $@ eq ""; return $@ eq "" && $! eq ""
} }
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok(); $skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();