Bug #119914 MTR --only-big-test incorrectly skips tests that have both big_test.inc and no_valgrind_without_big.inc
Submitted: 16 Feb 13:33
Reporter: Przemysław Skibiński (OCA) Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:8.0.14+ OS:Any
Assigned to: CPU Architecture:Any

[16 Feb 13:33] Przemysław Skibiński
Description:
When running MTR with --only-big-test, tests that include both include/big_test.inc and include/no_valgrind_without_big.inc are incorrectly skipped with the message "Not a big test". These tests cannot be run at all — without the flag they are skipped as "Test needs 'big-test' or 'only-big-test' option", and with the flag they are skipped as "Not a big test".

The issue is introduced with
https://github.com/mysql/mysql-server/commit/164b8002de918

How to repeat:
./mysql-test/mtr --only-big-test --suite=encryption encryption.mysqldump

Output:

encryption.mysqldump    [ skipped ]  Not a big test

./mysql-test/mtr --suite=encryption encryption.mysqldump

Output:

encryption.mysqldump    [ skipped ]  Test needs 'big-test' or 'only-big-test' option

Suggested fix:
Add !$tinfo->{'big_test'} to the second branch so that tests marked as big are never skipped:

if ($::opt_only_big_test) {
    if ((!$tinfo->{'no_valgrind_without_big'} and !$tinfo->{'big_test'}) or
        ($tinfo->{'no_valgrind_without_big'} and !$tinfo->{'big_test'} and !$::opt_valgrind)) {
      skip_test($tinfo, "Not a big test");
      return $tinfo;
    }
}