Skip to content

Commit

Permalink
cleanup: mtr suite.pm ssl checks
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Jul 2, 2019
1 parent 4bad6aa commit 4bfb19d
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions mysql-test/suite.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ sub skip_combinations {
$skip{'include/maybe_debug.combinations'} = $skip{'include/maybe_debug.combinations'} =
[ defined $::mysqld_variables{'debug-dbug'} ? 'release' : 'debug' ]; [ defined $::mysqld_variables{'debug-dbug'} ? 'release' : 'debug' ];


$skip{'include/have_debug.inc'} = 'Requires debug build'
unless defined $::mysqld_variables{'debug-dbug'};

# and for the wrong word size # and for the wrong word size
# check for exact values, in case the default changes to be small everywhere # check for exact values, in case the default changes to be small everywhere
my $longsysvar= $::mysqld_variables{'max-binlog-stmt-cache-size'}; my $longsysvar= $::mysqld_variables{'max-binlog-stmt-cache-size'};
Expand All @@ -36,13 +39,6 @@ sub skip_combinations {
$skip{'include/not_embedded.inc'} = 'Not run for embedded server' $skip{'include/not_embedded.inc'} = 'Not run for embedded server'
if $::opt_embedded_server; if $::opt_embedded_server;


$skip{'include/have_debug.inc'} = 'Requires debug build'
unless defined $::mysqld_variables{'debug-dbug'};

$skip{'include/have_ssl_communication.inc'} =
$skip{'include/have_ssl_crypto_functs.inc'} = 'Requires SSL'
unless defined $::mysqld_variables{'ssl-ca'};

$skip{'include/have_example_plugin.inc'} = 'Need example plugin' $skip{'include/have_example_plugin.inc'} = 'Need example plugin'
unless $ENV{HA_EXAMPLE_SO}; unless $ENV{HA_EXAMPLE_SO};


Expand All @@ -62,22 +58,21 @@ sub skip_combinations {
} }
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok(); $skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();


$skip{'main/openssl_6975.test'} = 'no or wrong openssl version' # SSL is complicated
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/ my $ssl_lib= $::mysqld_variables{'version-ssl-library'};
and $1 ge "1.0.1d" and $1 lt "1.1.1"; my $openssl_ver= $ssl_lib =~ /OpenSSL (\S+)/ ? $1 : "";


sub x509v3_ok() { $skip{'include/have_ssl_communication.inc'} =
return ($::mysqld_variables{'version-ssl-library'} =~ /WolfSSL/) || $skip{'include/have_ssl_crypto_functs.inc'} = 'Requires SSL' unless $ssl_lib;
($::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
and $1 ge "1.0.2"); $skip{'main/openssl_6975.test'} = 'no or wrong openssl version'
} unless $openssl_ver ge "1.0.1d" and $openssl_ver lt "1.1.1";


$skip{'main/ssl_7937.combinations'} = [ 'x509v3' ] $skip{'main/ssl_7937.combinations'} = [ 'x509v3' ]
unless x509v3_ok(); unless $ssl_lib =~ /WolfSSL/ or $openssl_ver ge "1.0.2";


$skip{'main/ssl_verify_ip.test'} = 'x509v3 support required' $skip{'main/ssl_verify_ip.test'} = 'x509v3 support required'
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/ unless $openssl_ver ge "1.0.2";
and $1 ge "1.0.2";


%skip; %skip;
} }
Expand Down

0 comments on commit 4bfb19d

Please sign in to comment.