diff options
author | Anel Husakovic <anel@mariadb.org> | 2020-04-13 15:47:02 +0200 |
---|---|---|
committer | Anel Husakovic <anel@mariadb.org> | 2020-04-13 15:54:35 +0200 |
commit | 384fc7b8f3e37ffb8a84f34b16aea64f54c33b6a (patch) | |
tree | 32fbc05f01ca476ffb20264f3c8ac2634eb68a10 | |
parent | 0b7a79c6b0d460c522f42f12cc73a1c79ae4e9a8 (diff) | |
download | mariadb-git-bb-10.1-anel-ipv6.tar.gz |
Fix failure for ipv6 not enabledbb-10.1-anel-ipv6
In case of ipv6 not enabled tests like `main.ipv6, rpl.rpl_ipv6` failed on
aarch buildbot.
Fix it by following commits 70dcb46e98e6 and 0bae1957dd124f8382a for `10.2` and
apply them to `10.1`.
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 2 | ||||
-rw-r--r-- | mysql-test/suite.pm | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 677dd58f99b..a33b2424c62 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -281,7 +281,7 @@ my $current_config_name; # The currently running config file template our @opt_experimentals; our $experimental_test_cases= []; -my $baseport; +our $baseport; # $opt_build_thread may later be set from $opt_port_base my $opt_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto"; my $opt_port_base= $ENV{'MTR_PORT_BASE'} || "auto"; diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index f90679e6f1f..3db419bae84 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -62,9 +62,10 @@ sub skip_combinations { 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 $@ eq ""; + eval { bind $sock, sockaddr_in6($::baseport, Socket::IN6ADDR_LOOPBACK) }; + return $@ eq "" && $! eq "" } $skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok(); |