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

Design Tools to Help You Create Your Next Project- Part 3

CoolorsCoolorsis a super fast color scheme generator. You can explore thousands of pre-existing color schemes (each one features five colors). Or, you can generate your own in a matter of minutes. Once you go to the “generate” page, hit the space bar to start with a different color scheme, and then you can adjust each color’s hue, saturation, and brightness accordingly.

Web GradientsWeb Gradientsis a collection of almost 200 background gradients, created by the itmeo team. You can use each of these content backdrops for any part of your website. You’ll find a .PNG version of each gradient, as well as easy-to-copy CSS3 crossbrowser code. Bonus: there are even curated packs for Sketch & Photoshop.

Color Hunt On Color Hunt

Woot, 2.4.0 is out! : vue.js

FeaturesFull SSR + async component support in core: SSR now supports rendering async components used anywhere and the client also supports async components during the hydration phase. This means async components / code-splitting now just works during SSR and is no longer limited at the route level. (9cf6646 & 7404091) Easier creation of wrapper components: (6118759) New component option: inheritAttrs. Turns off the default behavior where
parent scope non-prop bindings are automatically inherited on component root
as attributes. New instance properties: $attrs & $listeners. $attrs contains the parent-scope attribute bindings that were not recognized as props, and $listeners contains the v-on listeners registered in the parent scope (without the .native modifier). These are essentially aliases of $ and $, but are reactive. Combining these allows us to simplify a component like this down into this: <div> <inputv-bind="$attrs"v-on=&qu…

Pay Per Click by AppWorks Technologies Pvt Ltd