Bug #44012 mtr: test cases that are not supposed to return output always fail
Submitted: 1 Apr 2009 10:09 Modified: 18 Dec 2009 20:48
Reporter: Jørgen Austvik Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any

[1 Apr 2009 10:09] Jørgen Austvik
Description:
Tests always fail with empty output - even if they are supposed to have empty output.

How to repeat:
Create a test case (possibly conditionally included from other tests) that should not create any output. Create an empty result file. Run the test. mtr will say:
 
CURRENT_TEST: perfschema_stress.setup
mysqltest: The test didn't produce any output

perfschema_stress.setup                  [ fail ]

Suggested fix:
Make mysqltest check if the result file is empty, and if it is: make the test pass if it didn't contain any output.
[1 Apr 2009 10:38] Sveta Smirnova
Thank you for the report.

Verified as described.

Workaround: add dummy SELECT 1 statement.
[6 Aug 2009 7:57] 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/80248

2813 Bjorn Munch	2009-08-06
      Bug #44012 mtr: test cases that are not supposed to return output always fail
      Output would match an empty result file but we don't check
      Allow empty output IFF there is an empty result file.
[6 Aug 2009 8:00] Bjørn Munch
An alternative would be to have mtr detect the empty result file and pass this info in an argument to mysqltest, but I think it's clearer to put this in one place and avoiding an interface change.

Note that you have to deliberately create an empty result file, --record will also fail if output is empty.
[11 Aug 2009 10:30] Joerg Bruehe
Looks ok - I trust it was also tested.
[11 Aug 2009 21:42] 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/80631

2815 Bjorn Munch	2009-08-11
      Bug #44012 mtr: test cases that are not supposed to return output always fail
      Output would match an empty result file but we don't check
      Allow empty output IFF there is an empty result file.
[11 Aug 2009 21:56] Bjørn Munch
Pushed to 5.1-mtr and azalea-mtr
[11 Aug 2009 21:56] Bjørn Munch
Pushed to 5.1-mtr and azalea-mtr
[11 Aug 2009 21:57] Bjørn Munch
Pushed to 5.1-mtr and azalea-mtr
[11 Aug 2009 21:59] Bjørn Munch
Pushed to 5.1-mtr and azalea-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:45] 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:45] 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:20] 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)