summaryrefslogtreecommitdiff
path: root/mysql-test/suite.pm
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2019-07-16 12:48:04 +0200
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2019-07-17 12:57:38 +0200
commitf5390eea9a9fa307876c4f78cd876edb91b8194c (patch)
tree57df2796e67905b1ab9ec7aa8ca3edad19d8cf54 /mysql-test/suite.pm
parentee3ef790ca69be6fab28e6c21e1977f7abb7c8f6 (diff)
downloadmariadb-git-f5390eea9a9fa307876c4f78cd876edb91b8194c.tar.gz
MDEV-18565: Galera mtr-suite fails if galera library is not installed
Currently, running mtr with an incorrect (for example, new or obsolete) version of wsrep_provider (for example, with the 26 version of libgalera_smm.so) leads to the failure of tests in several suites with vague error diagnostics. As for the galera_3nodes suite, the mtr also does not effectively check all the prerequisites after merge with MDEV-18426 fixes. For example, tests that using mariabackup do not check for presence of ss and socat/nc. This is due to improper handling of relative paths in mtr scripts. In addition, some tests in different suites can be run without setting the environment variables such as MTR_GALERA_TFMT, XBSTREAM, and so on. To eliminate all these issues, this patch makes the following changes: 1. Added auxiliary wsrep_mtr_check utility (which located in the mysql-test/lib/My/SafeProcess subdirectory), which compares the versions of the wsrep API that used by the server and by the wsrep provider library, and it does this comparison safely, without accessing the API if the versions do not match. 2. All checks related to the presence of mariabackup and utilities that necessary for its operation transferred from the local directories of different mtr suites (from the suite.pm files) to the main suite.pm file. This not only reduces the amount of code and eliminates duplication of identical code fragments, but also avoids problems due to the inability of mtr to consider relative paths to include files when checking skip combinations. 3. Setting the values of auxiliary environment variables that are necessary for Galera, SST scripts and mariabackup (to work properly) is moved to the main mysql-test-run.pl script, so as not to duplicate this code in different suites, and to avoid partial corrections of the same errors for different suites (while other suites remain uncorrected). 4. Fixed duplication of the have_file_key_management.inc and have_filekeymanagement.inc files between different suites, these checks are also transferred to the top level. 5. Added garbd presence check and garbd path variable. https://jira.mariadb.org/browse/MDEV-18565
Diffstat (limited to 'mysql-test/suite.pm')
-rw-r--r--mysql-test/suite.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index 5b3ccc711de..cf030dc8827 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -47,6 +47,21 @@ sub skip_combinations {
$skip{'main/plugin_loaderr.test'} = 'needs compiled-in innodb'
unless $::mysqld_variables{'innodb'} eq "ON";
+ $skip{'include/have_mariabackup.inc'} = 'Need mariabackup'
+ unless ::have_mariabackup();
+
+ $skip{'include/have_mariabackup.inc'} = 'Need ss'
+ unless ::which("ss");
+
+ $skip{'include/have_mariabackup.inc'} = 'Need socat or nc'
+ unless $ENV{MTR_GALERA_TFMT};
+
+ $skip{'include/have_garbd.inc'} = 'Need garbd'
+ unless ::have_garbd();
+
+ $skip{'include/have_file_key_management.inc'} = 'Needs file_key_management plugin'
+ unless $ENV{FILE_KEY_MANAGEMENT_SO};
+
# disable tests that use ipv6, if unsupported
sub ipv6_ok() {
use Socket;