From 82a6365993a3c6650c39a1bca3ec3ccba827b763 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:07:29 +0200 Subject: Adding debian version 1:10.5.12-1. Signed-off-by: Daniel Baumann --- debian/tests/control | 11 +++++ debian/tests/smoke | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++ debian/tests/upstream | 68 +++++++++++++++++++++++++++++++ 3 files changed, 188 insertions(+) create mode 100644 debian/tests/control create mode 100644 debian/tests/smoke create mode 100644 debian/tests/upstream (limited to 'debian/tests') diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 00000000..16e091cf --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,11 @@ +Tests: smoke +# RocksDB is not built for all archs. Rather than duplicating the condition +# for its existence (see the list in debian/control), install it if available +# and check in the test if it's functional when it should be. +# The plugin package also already depends on the other one. +Depends: mariadb-plugin-rocksdb | mariadb-server-10.5 +Restrictions: allow-stderr needs-root isolation-container + +Tests: upstream +Depends: mariadb-test, eatmydata +Restrictions: allow-stderr breaks-testbed diff --git a/debian/tests/smoke b/debian/tests/smoke new file mode 100644 index 00000000..4469205c --- /dev/null +++ b/debian/tests/smoke @@ -0,0 +1,109 @@ +#!/bin/sh +# dep8 smoke test for mysql-server +# Author: Robie Basak +# +# This test should be declared in debian/tests/control with a dependency +# on the package that provides a configured MariaDB server (eg. +# mariadb-server-10.5). +# +# This test should be declared in debian/tests/control with the +# following restrictions: +# +# needs-root (to be able to log into the database) +# allow-stderr +# +# This test: +# +# 1) Creates a test database and test user as the root user. +# +# 2) Creates a test table and checks it appears to operate normally +# using the test user and test database. +# +# 3) Checks compression support for InnoDB & RocksDB engine. + +echo "Running test 'smoke'" +set -ex + +# Start the daemon if it was not running. For example in Docker testing +# environments there might not be any systemd et al and the service needs to +# be started manually. +if ! which systemctl +then + if ! /etc/init.d/mariadb status + then + echo "Did not find systemctl and daemon was not running, starting it.." + /etc/init.d/mariadb start + fi +else + # If systemd (and systemctl) is available, but the service did not start, then + # this smoke test is supposed to fail if next commands don't work. + echo "Found systemctl, continuing smoke test.." +fi + +mysql <&2 + exit 1 +fi + +mysql --user=testuser --password=testpassword testdatabase <&2 + exit 1 + fi + done +else + ! dpkg-query -W $plugin +fi diff --git a/debian/tests/upstream b/debian/tests/upstream new file mode 100644 index 00000000..d4f31dab --- /dev/null +++ b/debian/tests/upstream @@ -0,0 +1,68 @@ +#!/bin/sh +# autopkgtest check: Build and run the upstream test suite. +# (C) 2012 Canonical Ltd. +# Author: Daniel Kessel + +# running the mysql testsuite as described in: +# https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/959683 + +echo "Running test 'testsuite'" +set -e + +SKIP_TEST_LST="/tmp/skip-test.lst" +WORKDIR=$(mktemp -d) +trap 'rm -rf $WORKDIR $SKIP_TEST_LST' 0 INT QUIT ABRT PIPE TERM +cd "$WORKDIR" + +mkdir var +mkdir tmp + +echo "using vardir: $WORKDIR/var" +echo "using tmpdir: $WORKDIR/tmp" + +echo "Setting up skip-tests-list" + +# Use unstable-tests list as base to skip all tests considered unstable +cp /usr/share/mysql/mysql-test/unstable-tests $SKIP_TEST_LST + +# Also use arch specific skiplists if such files exist +for filename in /usr/share/mysql/mysql-test/unstable-tests.* +do + # Check for case that no files matched and glob is returned + [ -e "$filename" ] || continue + # Append file to the main skip test list file + cat "$filename" >> $SKIP_TEST_LST +done + +# Skip tests that cannot run properly on ci.debian.net / autopkgtests.ubuntu.com +cat >> $SKIP_TEST_LST << EOF +binlog.binlog_server_start_options : Requires writable /usr +main.ctype_uca : Requires writable /usr +rpl.rpl_gtid_mode : Requires starting server as root ref http://bugs.mysql.com/bug.php?id=70517 +EOF + +# Skip tests that cannot run properly on Gitlab-CI +if [ ! -z "$GITLAB_CI" ] +then + cat >> $SKIP_TEST_LST << EOF +main.mysqld--help : For unknown reason table-cache is 4000 instead of default 421 +EOF +fi + +ARCH=$(dpkg --print-architecture) +if [ "$ARCH" = "s390x" ] +then + echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> $SKIP_TEST_LST +elif [ "$ARCH" = "armhf" ] || [ "$ARCH" = "i386" ] +then + echo "main.failed_auth_unixsocket : Test returns wrong exit code on armhf and i386 (but only in debci) https://jira.mariadb.org/browse/MDEV-23933" >> $SKIP_TEST_LST +fi + +cd /usr/share/mysql/mysql-test +echo "starting mysql-test-tun.pl..." +eatmydata perl -I. ./mysql-test-run.pl --suite=main \ + --vardir="$WORKDIR/var" --tmpdir="$WORKDIR/tmp" \ + --parallel=auto --skip-rpl \ + --force --skip-test-list=$SKIP_TEST_LST \ + --xml-report=$AUTOPKGTEST_ARTIFACTS/mysql-test-run-junit.xml $@ 2>&1 +echo "run: OK" -- cgit v1.2.3