Skip to main content

MySQL 8.0: New mysql-test-run option to minimize skipped tests in regression test runs

Anybody who has run the MySQL MTR test suite must have seen a statement like “x tests were skipped, y by the test itself. ” at the end of test runs. Why are some tests being skipped? Are the skipped tests affecting test coverage? If you are interested to know, read on …


The MTR test suite is run regularly on multiple platforms and with various values for MySQL system variables. Not all MTR tests can run on all environments making it necessary to skip tests in some cases. MTR supports this with the command called skip. It is used to check if the prerequisites needed to run a test are satisfied . If not satisfied, the test is skipped with an informative message defined by the test author. For example, tests that can run only on windows have to be skipped on other platforms.
However, wrong usage of ‘skip’ can lead to a situation where some tests are never run in the regression test environment. This leads to reduced test coverage and hence bug escape. An example is “Bug#80288 missing innodb_numa_interleave” which escaped our regression tests, but was caught by community.  There was an error in the build script due to which server was built without NUMA support, even though the machine had NUMA libraries installed.


To resolve this, we have introduced a new MTR option called ‘no-skip‘. When a test or a test-suite is run with no-skip option, it ignores all the skip commands used within the test and forces the test to run . In case of a missing prerequisite, the test will fail and will be noticed in the regression test environment. This is a better behavior than silently skipping tests. Note that by default this variable is OFF.
However, during the course of this work-log we discovered that skip cannot be avoided in all situations. For example a test that can only run on Windows has to be skipped on other platforms. To handle these special cases we have introduced a file ‘excludenoskip.list’. It will contain a list of tests which should continue to skip even if MTR is run with –no-skip option.
To help understand what the excludenoskip.list does, refer the listed example below.

Other Improvements

This project not only added –no-skip option, but also identified scenarios where skip could be avoided,
  • Tests modified to set required mysqld system variables(WL#9027 )– We identified few tests that used to skip if a mysqld system variable is not set to a required value. Tests have the ability to set system variables to any value and hence this skip was unnecessary . It is good to have the mysqld option set in the test itself because this will always allow the test to run. If instead, a skip check is used, the test will be skipped if the option is not passed while running the test. For instance – Test main.flush2 needs this option replay_log_info_repository to be set to ‘FILE’ for execution. Instead of creating a dependency check (eg- include/, this dynamic server variable was set within the test.
  • rpl and binlog test suites split based on required GTID_MODE setting( WL#9249WL#9394 ): The rpl and binlog suites had 3 types of tests. Tests that can run only with GTID_MODE ON, tests that can run only with GTID_MODE OFF and tests that are GTID_MODE agnostic. In order to run all tests one had to run the suites with both GTID_MODE ON and OFF. The default value of the variable is OFF and hence tests that need ON were not run if one does not explicitly pass GTID_MODE=ON in MTR command line. We improved this situation by splitting the tests into rpl, rpl_gtid and rpl_nogtid, binlog, binlog_gtid and binlog_nogtid depending on whether they need gtid ON or OFF.
  • Redundant skips removed (WL#9170 ) – Some skips were redundant because of changes in the product. For ex- In MySQL 8.0.0, we can no longer compile out charsets from the server. This implies charsets will always be available and we no longer need to check for its existence. All checks for charsets were removed from tests.


Running tests with –no-skip option will certainly reduce the number of skipped tests. It will also ensure that there are no tests getting skipped accidentally.
The no-skip option is now used for all MySQL internal testing. We recommend community to use it for improving test coverage.
In case of any questions, please drop a comment below and we would be glad to address them.
Thank you for using MySQL!


Popular posts from this blog

Pay Per Click by AppWorks Technologies Pvt Ltd

24 Must Have WordPress Plugins for Business Websites- Part 1

1. OptinMonster OptinMonster is the most popular conversion rate optimization software. It allows you to convert abandoning website visitors into email subscribers. If you want to grow your email list, then this is a must have WordPress plugin in 2017. Read these  case studies  to see how much success other businesses are having by using OptinMonster. 2. WPForms As a business owner, allowing your customers to contact you should be your top priority. WPForms is the most beginner friendly contact form plugin for WordPress. This drag & drop online form builder allows you to easily create contact forms, email subscription forms, order forms, payment forms, and other type of online forms with just a few clicks. We use it on WPBeginner and all of our other sites. There’s a free  WPForms Lite version  available for those who are looking for a simple solution. If you want more advanced features, then get the Pro version. Use this  WPForms coupon  to get 10% off your purcha

Making telescopes that curve and twist

New computational tool automates design of telescoping structures that provide compact storage and rapid deployment. Shown here: a complex telescoping lizard expands to many times its original volume, serving as a stress test of the method. Credit: Chris Yu/Carnegie Mellon University A new tool for computational design allows users to turn any 3D shape into a collapsible telescoping structure. New mathematical methods developed by researchers at Carnegie Mellon University capture the complex and diverse properties of such structures, which are valuable for a variety of applications in 3D fabrication and robotics—particularly where mechanisms must be compact in size and easily deployable. The research, "Computational Design of Telescoping Structures," led by Carnegie Mellon Professors Stelian Coros and Keenan Crane and PhD student Christopher Yu, will be presented at the annual SIGGRAPH conference, 30 July to 3 August in Los Angeles. The conference each year spotlights the