Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed test cases and bootstrap - trunk #1505

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions storage/innobase/xtrabackup/test/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,25 @@ function ssl_version() {
100|101) ;;
102) unset sslv; sslv="102.$OS" ;;
*)
if ! test -r "${1}"; then
>&2 echo "tarball for your openssl version (${sslv}) is not available"
exit 1
fi
>&2 echo "tarball for your openssl version (${sslv}) is not available"
exit 1
;;
esac
echo ${sslv}
}

function glibc_version() {
glibc=$(ldd --version | head -1 | awk '{print $NF}')
case ${glibc} in
2.12|2.17|2.27|2.28|2.31|2.34|2.35) ;;
*)
>&2 echo "tarball for your glibc version (${glibc}) is not available"
exit 1
;;
esac
echo ${glibc}
}

shell_quote_string() {
echo "$1" | sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
}
Expand Down Expand Up @@ -114,13 +124,15 @@ main () {
short_version=$(echo ${VERSION} | awk -F "." '{ print $3 }' | cut -d '-' -f1)
if [[ ${PXB_TYPE} == "Debug" ]] || [[ ${PXB_TYPE} == "debug" ]]; then
SUFFIX="-debug"
else
SUFFIX="-minimal"
fi
if [[ ${short_version} -lt "20" ]]; then
tarball="Percona-Server-${VERSION}-Linux.${arch}.ssl$(ssl_version).tar.gz"
elif [[ ${short_version} -ge "20" && ${short_version} -lt "22" ]]; then
tarball="Percona-Server-${VERSION}-Linux.${arch}.glibc2.12${SUFFIX}.tar.gz"
elif [[ ${short_version} -ge "22" ]]; then
tarball="Percona-Server-${VERSION}-Linux.${arch}.glibc2.17${SUFFIX}.tar.gz"
tarball="Percona-Server-${VERSION}-Linux.${arch}.glibc$(glibc_version)${SUFFIX}.tar.gz"
fi
;;
*)
Expand Down Expand Up @@ -165,7 +177,7 @@ main () {

TYPE="xtradb80"
PXB_TYPE="release"
VERSION="8.0.18-9"
VERSION="8.0.34-26"
DESTDIR="./server"
parse_arguments PICK-ARGS-FROM-ARGV "$@"
main
8 changes: 4 additions & 4 deletions storage/innobase/xtrabackup/test/inc/keyring_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ function test_do()
vlog "-- transition_key: ${transition_key} --"
vlog "-- keyring_type: ${keyring_type} --"
if [[ "$transition_key" = "generate" ]] ; then
backup_options="--generate-transition-key"
backup_options="--generate-transition-key --xtrabackup-plugin-dir=${plugin_dir}"
prepare_options="--xtrabackup-plugin-dir=${plugin_dir} ${keyring_args}"
copyback_options="--xtrabackup-plugin-dir=${plugin_dir} ${keyring_args}"
elif [[ "$transition_key" = "none" ]] ; then
backup_options=
backup_options="--xtrabackup-plugin-dir=${plugin_dir}"
prepare_options="--xtrabackup-plugin-dir=${plugin_dir} ${keyring_args}"
copyback_options="--xtrabackup-plugin-dir=${plugin_dir} ${keyring_args}"
else
backup_options="--transition-key=$transition_key"
backup_options="--transition-key=$transition_key --xtrabackup-plugin-dir=${plugin_dir}"
prepare_options="--transition-key=$transition_key"
copyback_options="--transition-key=$transition_key --xtrabackup-plugin-dir=${plugin_dir} ${keyring_args}"
fi
Expand All @@ -36,7 +36,7 @@ function test_do()
run_cmd $MYSQL $MYSQL_ARGS test -e "SELECT @@server_uuid"

# PXB-1540: XB removes and recreate keyring file of 0 size
xtrabackup --backup --target-dir=$topdir/backup0
xtrabackup --backup --target-dir=$topdir/backup0 $backup_options

rm -rf $topdir/backup0

Expand Down
6 changes: 4 additions & 2 deletions storage/innobase/xtrabackup/test/inc/xbcloud_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ secure-file-priv=$TEST_VAR_ROOT
is_galera && skip_test "skipping"

function is_xbcloud_credentials_set() {
[ "${XBCLOUD_CREDENTIALS:-unset}" == "unset" ] && \
skip_test "Requires XBCLOUD_CREDENTIALS"
if [ -z ${XBCLOUD_CREDENTIALS+x} ];
then
skip_test "Requires XBCLOUD_CREDENTIALS"
fi
}

now=$(date +%s)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

require_server_version_higher_than 5.7.10

is_xtradb || skip_test "Keyring vault requires Percona Server"

vlog setup keyring_file
. inc/keyring_file.sh

Expand Down