mirror of
https://github.com/MariaDB/server.git
synced 2025-07-23 08:45:18 +03:00
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
48 lines
1.5 KiB
CMake
48 lines
1.5 KiB
CMake
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; version 2 of the License.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
|
|
|
|
|
|
IF (WIN32)
|
|
ADD_EXECUTABLE(my_safe_process safe_process_win.cc)
|
|
ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc)
|
|
TARGET_LINK_LIBRARIES(my_safe_kill dbghelp psapi)
|
|
ELSE()
|
|
ADD_EXECUTABLE(my_safe_process safe_process.cc)
|
|
ENDIF()
|
|
|
|
IF(WITH_WSREP)
|
|
ADD_EXECUTABLE(wsrep_check_version wsrep_check_version.c)
|
|
TARGET_LINK_LIBRARIES(wsrep_check_version ${LIBDL})
|
|
ENDIF()
|
|
|
|
IF(NOT INSTALL_MYSQLTESTDIR)
|
|
RETURN()
|
|
ENDIF()
|
|
|
|
SET(INSTALL_ARGS
|
|
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess"
|
|
COMPONENT Test
|
|
)
|
|
|
|
INSTALL(TARGETS my_safe_process ${INSTALL_ARGS})
|
|
IF(WITH_WSREP)
|
|
INSTALL(TARGETS wsrep_check_version ${INSTALL_ARGS})
|
|
ENDIF()
|
|
IF (WIN32)
|
|
INSTALL(TARGETS my_safe_kill ${INSTALL_ARGS})
|
|
ENDIF()
|
|
|
|
INSTALL(FILES Base.pm ${INSTALL_ARGS})
|