Bug #46973 MTR: extract_warning_lines does not check it's extracting lines for current test
Submitted: 28 Aug 2009 12:35 Modified: 18 Dec 2009 23:56
Reporter: Bjørn Munch Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.1, 5.4 OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any

[28 Aug 2009 12:35] Bjørn Munch
Description:
After re-anabling proper warning tests, many tests on Windows fail, referring to errors/warning in server log which actually is not from that test but from a test run just before.

If this warning/error is being suppressed for that test only, one can get a false failure, if it's not suppressed at all we get failure of the wrong test.

Apparently, the log file isn't always flushed when mtr reads it. mtr will read inn all lines following the last occurrence of CURRENT_TEST: and take it at face value.

How to repeat:
Seen in PB2 but I couldn't reproduce manually. However I do see that many CURRENT_TEST lines are actually never written on Windows.

Suggested fix:
Rewrite the extraction routine to search epecifically for CURRENT_TEST lines matching the test name. Also make sure we only read the last such section in the file.
[28 Aug 2009 12:43] 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/81860

2822 Bjorn Munch	2009-08-28
      Bug #46973 MTR: extract_warning_lines does not check it's extracting lines for current test
      Completely rewritten
[28 Aug 2009 13:03] 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/81863

2822 Bjorn Munch	2009-08-28
      Bug #46973 MTR: extract_warning_lines does not check it's extracting lines for current test
      Rewrote logic (first commit was incomplete, sorry)
[31 Aug 2009 8:20] Magnus Blåudd
Looks ok. Just don't understand when there are output from subsequent tests _after_?
[31 Aug 2009 8:42] Bjørn Munch
To the last comment: output from subsequent tests after this will come if the test has been run several times, for example when it's retried.

Output from *different* tests should not normally happen, but since it's perfectly legal to run e.g. "mtr testa testb testa", we need to allow that. In that case, search for warnings after the second 'testa' would othwise read the output from the first.
[31 Aug 2009 13:40] Bjørn Munch
Pushed to azalea-mtr (soon to be renamed next-mtr) and 5.1-mtr
[3 Sep 2009 17:12] Bugs System
Pushed into 5.1.40 (revid:bjorn.munch@sun.com-20090903170735-679d64zp580wl39j) (version source revid:bjorn.munch@sun.com-20090903170735-679d64zp580wl39j) (merge vers: 5.1.40) (pib:11)
[4 Sep 2009 0:57] Paul DuBois
Test suite change. No changelog entry needed.

Setting report to NDI pending push into 5.4.x.
[30 Sep 2009 8:18] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20090929093622-1mooerbh12e97zux) (version source revid:alik@sun.com-20090922182109-vs5ign07cwht12z6) (merge vers: 6.0.14-alpha) (pib:11)
[30 Sep 2009 8:20] Bugs System
Pushed into 5.4.5-beta (revid:alik@sun.com-20090925094254-tjl9eajkzwzgthoe) (version source revid:alik@sun.com-20090922142453-x275o41whpyezh4q) (merge vers: 5.4.4-beta) (pib:11)
[30 Sep 2009 19:42] Paul DuBois
Test suite change. No changelog entry needed.
[18 Dec 2009 10:35] Bugs System
Pushed into 5.1.41-ndb-7.1.0 (revid:jonas@mysql.com-20091218102229-64tk47xonu3dv6r6) (version source revid:jonas@mysql.com-20091218095730-26gwjidfsdw45dto) (merge vers: 5.1.41-ndb-7.1.0) (pib:15)
[18 Dec 2009 10:51] Bugs System
Pushed into 5.1.41-ndb-6.2.19 (revid:jonas@mysql.com-20091218100224-vtzr0fahhsuhjsmt) (version source revid:jonas@mysql.com-20091217101452-qwzyaig50w74xmye) (merge vers: 5.1.41-ndb-6.2.19) (pib:15)
[18 Dec 2009 11:06] Bugs System
Pushed into 5.1.41-ndb-6.3.31 (revid:jonas@mysql.com-20091218100616-75d9tek96o6ob6k0) (version source revid:jonas@mysql.com-20091217154335-290no45qdins5bwo) (merge vers: 5.1.41-ndb-6.3.31) (pib:15)
[18 Dec 2009 11:21] Bugs System
Pushed into 5.1.41-ndb-7.0.11 (revid:jonas@mysql.com-20091218101303-ga32mrnr15jsa606) (version source revid:jonas@mysql.com-20091218064304-ezreonykd9f4kelk) (merge vers: 5.1.41-ndb-7.0.11) (pib:15)