From 7ab7b5299c3140095b3a79b66d774297c4570d3a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 10 Feb 2012 19:12:00 -0500 Subject: [PATCH] Fixes for #773116 and #785243 --- mysql-disable-test.patch | 27 ------------------------- mysql-install-test.patch | 41 ++++++++++++++++++++++++++++---------- mysql.spec | 32 +++++++++++++++++++++++++---- mysqld.service | 16 +++++++++++++++ rh-skipped-tests-arm.list | 8 ++++++++ rh-skipped-tests-base.list | 20 +++++++++++++++++++ 6 files changed, 102 insertions(+), 42 deletions(-) delete mode 100644 mysql-disable-test.patch create mode 100644 rh-skipped-tests-arm.list create mode 100644 rh-skipped-tests-base.list diff --git a/mysql-disable-test.patch b/mysql-disable-test.patch deleted file mode 100644 index 74b87df..0000000 --- a/mysql-disable-test.patch +++ /dev/null @@ -1,27 +0,0 @@ -Disable the outfile_loaddata test, which as of 5.1.38 is giving -platform-dependent results, with the "expected" results being arguably the -wrong ones. This is upstream at http://bugs.mysql.com/bug.php?id=46895 -(note that upstream has also disabled it, but only for Solaris, so we still -need this patch). -Still broken in 5.5.14, despite alleged fix. - -Also disable sys_vars.plugin_dir_basic, which is broken because -mysql-test-run doesn't set the right value of MYSQL_LIBDIR. Upstream at -http://bugs.mysql.com/bug.php?id=52223 -Still fails in 5.5.16, even though upstream marked it closed. - -Also disable innodb.innodb, which is showing platform-dependent results -as of 5.5.9. Upstream at http://bugs.mysql.com/bug.php?id=60155 - - -diff -Naur mysql-5.5.16.orig/mysql-test/t/disabled.def mysql-5.5.16/mysql-test/t/disabled.def ---- mysql-5.5.16.orig/mysql-test/t/disabled.def 2011-09-09 11:56:40.000000000 -0400 -+++ mysql-5.5.16/mysql-test/t/disabled.def 2011-10-16 19:50:10.064578284 -0400 -@@ -17,3 +17,7 @@ - archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc - log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists - mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836 -+# -+outfile_loaddata : bug#46895 code wrong, expected results wrong too -+sys_vars.plugin_dir_basic : bug#52223 fails for lib64 library directory -+innodb.innodb : bug#60155 has platform-dependent results diff --git a/mysql-install-test.patch b/mysql-install-test.patch index 5980aea..a31a280 100644 --- a/mysql-install-test.patch +++ b/mysql-install-test.patch @@ -1,27 +1,46 @@ Improve the documentation that will be installed in the mysql-test RPM. -diff -Naur mysql-5.1.43.orig/mysql-test/README mysql-5.1.43/mysql-test/README ---- mysql-5.1.43.orig/mysql-test/README 2010-01-15 12:14:43.000000000 -0500 -+++ mysql-5.1.43/mysql-test/README 2010-02-13 21:18:06.000000000 -0500 -@@ -6,6 +6,16 @@ - actually have a co-existing MySQL installation. The tests will not - conflict with it. +diff -Naur mysql-5.5.20.orig/mysql-test/README mysql-5.5.20/mysql-test/README +--- mysql-5.5.20.orig/mysql-test/README 2011-12-16 14:52:05.000000000 -0500 ++++ mysql-5.5.20/mysql-test/README 2012-02-10 17:06:19.531082253 -0500 +@@ -1,14 +1,26 @@ + This directory contains a test suite for the MySQL daemon. To run +-the currently existing test cases, simply execute ./mysql-test-run in +-this directory. It will fire up the newly built mysqld and test it. ++the currently existing test cases, execute ./mysql-test-run in ++this directory. +-Note that you do not have to have to do "make install", and you could +-actually have a co-existing MySQL installation. The tests will not +-conflict with it. +- +-All tests must pass. If one or more of them fail on your system, please +-read the following manual section for instructions on how to report the +-problem: +For use in Red Hat distributions, you should run the script as user mysql, +so the best bet is something like + cd /usr/share/mysql-test -+ sudo -u mysql ./mysql-test-run ++ sudo -u mysql ./mysql-test-run --skip-test-list=rh-skipped-tests.list +This will use the installed mysql executables, but will run a private copy +of the server process (using data files within /usr/share/mysql-test), +so you need not start the mysqld service beforehand. ++ ++The "--skip-test-list=rh-skipped-tests.list" option excludes tests that are ++known to fail on one or more Red-Hat-supported platforms. You can omit it ++if you want to check whether such failures occur for you. Documentation ++about the reasons for omitting such tests can be found in the file ++rh-skipped-tests.list. ++ +To clean up afterwards, remove the created "var" subdirectory, eg + sudo -u mysql rm -rf /usr/share/mysql-test/var + - All tests must pass. If one or more of them fail on your system, please - read the following manual section for instructions on how to report the - problem: -@@ -25,7 +35,8 @@ ++If one or more tests fail on your system, please read the following manual ++section for instructions on how to report the problem: + + http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html + +@@ -25,7 +37,8 @@ With no test cases named on the command line, mysql-test-run falls back to the normal "non-extern" behavior. The reason for this is that some diff --git a/mysql.spec b/mysql.spec index 487506a..d0fd6b5 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,6 +1,6 @@ Name: mysql Version: 5.5.20 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MySQL client programs and shared libraries Group: Applications/Databases @@ -32,6 +32,8 @@ Source10: mysql.tmpfiles.d Source11: mysqld.service Source12: mysqld-prepare-db-dir Source13: mysqld-wait-ready +Source14: rh-skipped-tests-base.list +Source15: rh-skipped-tests-arm.list # Working around perl dependency checking bug in rpm FTTB. Remove later. Source999: filter-requires-mysql.sh @@ -44,7 +46,6 @@ Patch5: mysql-stack-guard.patch Patch6: mysql-chain-certs.patch Patch7: mysql-versioning.patch Patch8: mysql-dubious-exports.patch -Patch9: mysql-disable-test.patch Patch10: mysql-plugin-bool.patch Patch11: mysql-s390-tsc.patch Patch12: mysql-openssl-test.patch @@ -197,7 +198,6 @@ the MySQL sources. %patch6 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 @@ -212,6 +212,13 @@ rm -f mysql-test/t/ssl_8k_key-master.opt # upstream has fallen down badly on symbol versioning, do it ourselves cp %{SOURCE8} libmysql/libmysql.version +# generate a list of tests that fail, but are not disabled by upstream +cat %{SOURCE14} > mysql-test/rh-skipped-tests.list +# disable some tests failing on ARM architectures +%ifarch %{arm} +cat %{SOURCE15} >> mysql-test/rh-skipped-tests.list +%endif + %build # fail quickly and obviously if user tries to build as root @@ -305,11 +312,15 @@ cd ../.. # --force to continue tests after a failure # no retries please # test SSL with --ssl + # skip tests that are listed in rh-skipped-tests.list # avoid redundant test runs with --binlog-format=mixed # increase timeouts to prevent unwanted failures during mass rebuilds ( cd mysql-test - perl ./mysql-test-run.pl --force --retry=0 --ssl --mysqld=--binlog-format=mixed --suite-timeout=720 --testcase-timeout=30 + perl ./mysql-test-run.pl --force --retry=0 --ssl \ + --skip-test-list=rh-skipped-tests.list \ + --mysqld=--binlog-format=mixed \ + --suite-timeout=720 --testcase-timeout=30 # cmake build scripts will install the var cruft if left alone :-( rm -rf var ) @@ -422,6 +433,9 @@ echo "%{_libdir}/mysql" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf cp %{SOURCE6} README.mysql-docs cp %{SOURCE7} README.mysql-license +# install the list of skipped tests to be available for user runs +install -m 0644 mysql-test/rh-skipped-tests.list ${RPM_BUILD_ROOT}%{_datadir}/mysql-test + %clean rm -rf $RPM_BUILD_ROOT @@ -663,6 +677,16 @@ fi %{_mandir}/man1/mysql_client_test.1* %changelog +* Fri Feb 10 2012 Tom Lane 5.5.20-2 +- Revise our test-disabling method to make it possible to disable tests on a + platform-specific basis, and also to get rid of mysql-disable-test.patch, + which broke in just about every upstream update (Honza Horak) +- Disable cycle-counter-dependent regression tests on ARM, since there is + not currently any support for that in Fedora ARM kernels +Resolves: #773116 +- Add some comments to mysqld.service documenting how to customize it +Resolves: #785243 + * Fri Jan 27 2012 Tom Lane 5.5.20-1 - Update to MySQL 5.5.20, for various fixes described at http://dev.mysql.com/doc/refman/5.5/en/news-5-5-20.html diff --git a/mysqld.service b/mysqld.service index b3bc486..b7fa095 100644 --- a/mysqld.service +++ b/mysqld.service @@ -1,3 +1,19 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to create a file "/etc/systemd/system/mysqld.service", +# containing +# .include /lib/systemd/system/mysqld.service +# ...make your changes here... +# For more info about custom unit files, see +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F + +# For example, if you want to increase mysql's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, so create a file named +# "/etc/systemd/system/mysqld.service" containing: +# .include /lib/systemd/system/mysqld.service +# [Service] +# LimitNOFILE=10000 + [Unit] Description=MySQL database server After=syslog.target diff --git a/rh-skipped-tests-arm.list b/rh-skipped-tests-arm.list new file mode 100644 index 0000000..a6ae9bf --- /dev/null +++ b/rh-skipped-tests-arm.list @@ -0,0 +1,8 @@ + +# Disable perfschema.func_file_io and perfschema.func_mutex, which fail +# because cycle counter returns 0 every time on ARM architectures. +# This is caused by missing hardware performance counter support on ARM. +# Discussion about fixing that can be found in RH bug #741325. + +perfschema.func_file_io : rhbz#773116 cycle counter does not work on arm +perfschema.func_mutex : rhbz#773116 cycle counter does not work on arm diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list new file mode 100644 index 0000000..a855f78 --- /dev/null +++ b/rh-skipped-tests-base.list @@ -0,0 +1,20 @@ +# Disable the outfile_loaddata test, which as of 5.1.38 is giving +# platform-dependent results, with the "expected" results being arguably the +# wrong ones. This is upstream at http://bugs.mysql.com/bug.php?id=46895 +# (note that upstream has also disabled it, but only for Solaris, so we still +# need to disable it here). +# Still broken in 5.5.14, despite alleged fix. + +outfile_loaddata : bug#46895 code wrong, expected results wrong too + +# Disable sys_vars.plugin_dir_basic, which is broken because +# mysql-test-run doesn't set the right value of MYSQL_LIBDIR. +# Upstream at http://bugs.mysql.com/bug.php?id=52223 +# Still fails in 5.5.16, even though upstream marked it closed. + +sys_vars.plugin_dir_basic : bug#52223 fails for lib64 library directory + +# Disable innodb.innodb, which is showing platform-dependent results +# as of 5.5.9. Upstream at http://bugs.mysql.com/bug.php?id=60155 + +innodb.innodb : bug#60155 has platform-dependent results