Bug #42469 Backup tests fail with new mtr
Submitted: 30 Jan 2009 8:51 Modified: 6 Oct 2009 17:00
Reporter: Jørgen Løland Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Backup Severity:S2 (Serious)
Version:6.0 OS:Any
Assigned to: Hema Sridharan CPU Architecture:Any

[30 Jan 2009 8:51] Jørgen Løland
Description:
Current backup tests with expected warnings suppress test failure by a regex in mtr_report.pl. mtr_report.pl is no longer relevant with the new mtr. Instead, warning suppression should be done in the test itself, like this:

call mtr.add_suppression("<your text>");

For examples, grep for add_suppression in the test dirs; quite a number of tests do this already.

This will either block the new mtr from being pushed, or will cause an awful lot of backup test noise in PB.

How to repeat:
Run the backup tests with the new mtr.
[13 Feb 2009 10:30] Rafal Somla
Currently mtr2 ignores all [ERRORS] and [Warnings] produced by tests (see BUG#42408). Once the normal behaviour is restored, our tests will start to fail.

To fix this, one should re-enable detection of [ERRORS] and [Warnings] by mtr (see the patch below) and then run backup test suites and ensure that appropriate suppression rules are added in each test.

A patch for mtr2 which enables detection of [ERRORS] and [Warnings]:

=== modified file 'mysql-test/mysql-test-run.pl'
--- mysql-test/mysql-test-run.pl        2009-02-02 11:05:02 +0000
+++ mysql-test/mysql-test-run.pl        2009-02-13 09:04:54 +0000
@@ -3481,8 +3481,8 @@ sub extract_warning_lines ($) {
      # and correcting them shows a few additional harmless warnings.
      # Thus those patterns are temporarily removed from the list
      # of patterns. For more info see BUG#42408
-     # qr/^Warning:|mysqld: Warning|\[Warning\]/,
-     # qr/^Error:|\[ERROR\]/,
+     qr/^Warning:|mysqld: Warning|\[Warning\]/,
+     qr/^Error:|\[ERROR\]/,
      qr/^Warning:|mysqld: Warning/,
      qr/^Error:/,
      qr/^==.* at 0x/,
[25 Mar 2009 6:10] Rafal Somla
I think it is a problem if tests don't include required suppresion rules in them.
The problem is neglected now, because MTR does not complain at the moment. But at
some point it should be fixed and hence this bug report.
[15 Apr 2009 18:54] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/72214

2797 Hema Sridharan	2009-04-15
      Bug#42469(Backup tests fail with new mtr)
      Warning messages are suppressed for the backup tests that produces
      warnings and errors.
      modified:
        mysql-test/suite/backup/t/backup_db_grants_extra.test
        mysql-test/suite/backup/t/backup_dbname_lctn1.test
        mysql-test/suite/backup/t/backup_default_debug.test
        mysql-test/suite/backup/t/backup_external.test
        mysql-test/suite/backup/t/backup_namecase.test
        mysql-test/suite/backup/t/backup_securebackup.test
        mysql-test/suite/backup/t/backup_table_grants.test
[28 Apr 2009 15:16] Hema Sridharan
This bug is waiting for fix of bug#42408
[31 Jul 2009 12:53] Bjørn Munch
Just a tip: as an alternative to repeating the same suppression in many tests, it's also possible to add to the global suppression list defined in

mysql-test/include/mtr_warnings.sql

This should of course only be done if the warning should be suppressed in *any* test that sees it.
[6 Oct 2009 17:00] Hema Sridharan
All the backup tests passes successfully after re-enabling detection of [ERRORS] and [WARNINGS] in new mtr(in mysql-test-run.pl). The errors and warnings are re-enabled by patch for BUG#42408. All the backup tests includes the warning suppression in the test itself by calling the mtr.add_suppression(<" ">)

Note that I executed the tests with latest backup tree
bzr version-info
date: 2009-10-06 17:37:32 +0530
build-date: 2009-10-06 18:59:16 +0200
revno: 2878
branch-nick: mysql-6.0-backup