check_warnings_post_shutdown ignores per-test suppressions

Bug #514135 reported by Alex Budovski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
New
Wishlist
Unassigned

Bug Description

The test main.innodb_bug39438 adds a test-specific suppression via mtr.add_suppression. So far so good.

The test runner runs this test, and it passes (call mtr.check_warnings skips the expected warning).

Then, sub check_warnings_post_shutdown runs. This completely ignores any per-test warnings and finds the expected warning (that was supposed to be suppressed) in the warning log and fails:

==============================================================================
TEST RESULT TIME (ms)
------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
main.innodb_bug39438 [ pass ] 187
Yoyoyoyo
***Warnings generated in error logs during shutdown after running tests: main.innodb_bug39
438

100129 14:58:42 InnoDB: Error: table 'test/bug39438' <-- this was supposed to be suppressed.

------------------------------------------------------------
The servers were restarted 0 times
Spent 0.187 of 16 seconds executing testcases

All 1 tests were successful.

Errors/warnings were found in logfiles during server shutdown after running the
following sequence(s) of tests:
    main.innodb_bug39438
mysql-test-run: *** ERROR: There where errors/warnings in server logs after running test c
ases.

=======

Note: mtr.add_suppression is doing its job correctly, but the _post_shutdown routine completely ignores such suppressions, only using the extract_warning_lines perl routine.

Revision history for this message
Kristian Nielsen (knielsen) wrote :

I agree that this is a problem. Checking for (and suppressing) warnings inside the mysqld being tested is broken design, as it does not work to test the server during shutdown.

One way to fix this is to change mtr.add_suppression() to write the added suppressions to a CSV type table. Then the underlying .csv file could be read by the mysql-test-run.pl script and all warning checks could take place there.

A possibly better option would be to change the mtr.add_suppression() into a native mysqltest command, which would be more robust and could write suppressions into a file for mysql-test-run.pl to inspect.

Until this is implemented, possible work-arounds include:
1. Delay test case end until expected warnings hit the log (eg. sync_slave_with_master at end of test script or similar).
2. If 1 is not possible, add a global suppression in mysql-test-run.pl, possibly changing table names etc. to be more unique (to avoid accidentally suppressing real warnings)

Michael Widenius (monty)
Changed in maria:
importance: Undecided → Low
importance: Low → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.