Bug #48209 Confusing message "Test has succeeded" after test fails due to warnings
Submitted: 21 Oct 2009 17:18 Modified: 17 Jun 2010 19:36
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.1.40 OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any

[21 Oct 2009 17:18] Joerg Bruehe
Description:
The following occurred in the build of 5.1.40.

To me, it looks pretty inconsistent to log "Test has succeeded" and still count the test as failed:

=====
parts.partition_recover_myisam           [ retry-fail ]  Found warnings/errors in server log file!
        Test ended at YYYY-MM-DD HH:MM:SS
file_name       line
g:/mysql-5.1.40-winbuild/mysql-5.1.40-win32/mysql-test/var/log/mysqld.1.err     091010  6:09:36 [ERROR] g:/mys
ql-5.1.40-winbuild/mysql-5.1.40-win32/bin/mysqld.exe: Table './test/t1_will_crash' is marked as crashed and sh
ould be repaired
g:/mysql-5.1.40-winbuild/mysql-5.1.40-win32/mysql-test/var/log/mysqld.1.err     091010  6:09:36 [Warning] Chec
king table:   './test/t1_will_crash'
g:/mysql-5.1.40-winbuild/mysql-5.1.40-win32/mysql-test/var/log/mysqld.1.err     091010  6:09:36 [Warning] Reco
vering table: './test/t1_will_crash'
g:/mysql-5.1.40-winbuild/mysql-5.1.40-win32/mysql-test/var/log/mysqld.1.err     091010  6:09:36 [ERROR] g:/mys
ql-5.1.40-winbuild/mysql-5.1.40-win32/bin/mysqld.exe: Table './test/t1_will_crash#P#p1' is marked as crashed a
nd should be repaired
g:/mysql-5.1.40-winbuild/mysql-5.1.40-win32/mysql-test/var/log/mysqld.1.err     091010  6:09:36 [Warning] Chec
king table:   './test/t1_will_crash'
g:/mysql-5.1.40-winbuild/mysql-5.1.40-win32/mysql-test/var/log/mysqld.1.err     091010  6:09:36 [Warning] Chec
king table:   './test/t1_will_crash'
g:/mysql-5.1.40-winbuild/mysql-5.1.40-win32/mysql-test/var/log/mysqld.1.err     091010  6:09:36 [Warning] Reco
vering table: './test/t1_will_crash'
g:/mysql-5.1.40-winbuild/mysql-5.1.40-win32/mysql-test/var/log/mysqld.1.err     091010  6:09:36 [Warning] Chec
king table:   './test/t1_will_crash'
^ Found warnings!!
ok
mysqltest: Logging to ''.
mysqltest: Results saved in ''.
mysqltest: Connecting to server localhost:10730 (socket /PATH/mysql-test/var/tmp/mysqld.1.sock) as 'root', con
nection 'default', attempt 0 ...
mysqltest: ... Connected.
mysqltest: Start processing test commands from '.\include\check-warnings.test' ...
mysqltest: ... Done processing test commands.
mysqltest: Test has succeeded!

 - saving '/PATH/mysql-test/var/log/parts.partition_recover_myisam/' to '/PATH/mysql-test/var/log/parts.partit
ion_recover_myisam/'

Test has failed 2 times, no more retries!
=====

How to repeat:
Either make sure the test is not marked as failed because of warnings logged,
or don't log "Test has succeeded" and make the real problem stand out.

Suggested fix:
I set "OS" to "any" because to me it looks like a general flaw in the MTR logic (or the words used) which might happen on any platform.
If I'm wrong, please change that.

If there is a real bug hidden in the output, please report that as a separate bug.
[21 Oct 2009 17:29] Bjørn Munch
The text "The test has succeeded" is technically correct because the "test" in question is not the real test but the finding of warnings and mysqltest couldn't care less what the output is.

But I agree that it's confusing to get this here, and it should be removed somehow.
[21 Oct 2009 17:33] Bjørn Munch
Changed synopsis to reflect what the problem really is.

For the record: the test in question *did* fail. Maybe those warnings should be suppressed in this test but they weren't so it failed.
[23 Oct 2009 11:06] 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/87921

2850 Bjorn Munch	2009-10-23
      Bug #48209 Confusing message "Test has succeeded" after test fails due to warnings
      There's no need for --verbose for the mysqltest in check-warnings, remove it
[4 Nov 2009 10:33] Joerg Bruehe
Looks like it should help. and not introduce any risks.
[4 Nov 2009 13:11] Magnus Blåudd
It is undoing a previous fix that was supposed to make it easier to analyze where mysqltest could be hanging.

Still, the patch looks ok.
[4 Nov 2009 15:04] Bjørn Munch
Pushed to 5.1-mtr, trunk-mtr, next-mr-mtr and 6.0-codebase-mtr
[20 Feb 2010 9:31] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100220092844-jh07ayojyxn8uh9p) (version source revid:bjorn.munch@sun.com-20091104145701-e53aocvl875cpz99) (merge vers: 6.0.14-alpha) (pib:16)
[20 Feb 2010 9:34] Bugs System
Pushed into 5.5.3-m2 (revid:alik@sun.com-20100220092622-wvhh1vfy5tjq4mhu) (version source revid:bjorn.munch@sun.com-20091104135716-k4u4vo35wzvkwpaa) (merge vers: 5.5.0-beta) (pib:16)
[20 Feb 2010 9:37] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100220092730-paoo5t9gcajs5dq8) (version source revid:bjorn.munch@sun.com-20091104140003-934yjqw1npbjsktg) (pib:16)
[20 Feb 2010 19:03] Paul DuBois
Changes to test suite. No changelog entry needed.

Setting report to Need Merge pending push to 5.1.x.
[1 Mar 2010 8:47] Bugs System
Pushed into 5.1.45 (revid:joro@sun.com-20100301083827-xnimmrjg6bh33o1o) (version source revid:azundris@mysql.com-20100222175719-viuh0f3gdsrkgv0r) (merge vers: 5.1.45) (pib:16)
[1 Mar 2010 16:14] Paul DuBois
No changelog entry needed.
[17 Jun 2010 12:15] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:02] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:martin.skold@mysql.com-20100609140708-52rvuyq4q500sxkq) (merge vers: 5.1.45-ndb-6.2.19) (pib:16)
[17 Jun 2010 13:42] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)