Bug #43659 MTR2 should report worker data for tests when using --parallel > 1
Submitted: 15 Mar 2009 17:11 Modified: 18 Jun 2009 15:30
Reporter: Patrick Crews 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

[15 Mar 2009 17:11] Patrick Crews
Description:
The new version of mysql-test-run allows the use of parallel.  However, when using multiple 'workers' (when parallel > 1), mysql-test-run should also output worker data for each test.

The reason for this is that some test failures occur as the result of 'interference' (bad cleanup, hanging connections, etc) from previous tests.  This means that we must know the sequence of test execution so that we can repeat the failure and correct the test bug.

Something like:
ndb.ndb_restore_print                    [ fail ]     <worker1>

How to repeat:
Run mysql-test-run w/ a value for --parallel > 1 and observe that no such output is produced.

Suggested fix:
Include (or at least allow us to turn on such output) this information for mysql-test-run when using multiple 'workers'
[24 Apr 2009 9:17] 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/72752

2784 Bjorn Munch	2009-04-24
      Bug #43659 MTR2 should report worker data for tests when using --parallel > 1
      Add 'worker' to test data if parallel>1, print it just after test name
      modified:
        mysql-test/lib/mtr_report.pm
        mysql-test/mysql-test-run.pl
[24 Apr 2009 9:22] Bjørn Munch
My recent commit will give output like this, if using --parallel > 1:

main.alias                               w3 [ pass ]      6
main.alias                               w2 [ pass ]      6
main.alias                               w4 [ pass ]      7
main.alias                               w1 [ pass ]      8

The 'w1' etc. identifies the worker. The original request suggested putting it after [ fail ] etc. but that's much more complicated than putting it in the common part that's printed independently of the test result.
[28 Apr 2009 8:30] Magnus Blåudd
You are sure it's not going to break PushBuild reports ;) again....
[28 Apr 2009 8:34] Bjørn Munch
It *will* break PB reports if anyone is using --parallel, unless I allow the PB tools to adapt before I push.  Which I intend to do :-)
[28 Apr 2009 8:59] Magnus Blåudd
ok, and hopefully we will soon be able to turn "auto parallel" back on again...
[28 May 2009 11:04] 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/75132

2798 Bjorn Munch	2009-05-28
      Bug #43659 MTR2 should report worker data for tests when using --parallel > 1
      Adding "w# " before the test result
      Also enable --parallel=2 so this can be tested.
      modified:
        mysql-test/collections/default.push
        mysql-test/lib/mtr_report.pm
        mysql-test/mysql-test-run.pl
[28 May 2009 11:06] Bjørn Munch
Pushed to 5.1-mtr, including use of --parallel=2 for PB
[28 May 2009 11:53] Magnus Blåudd
Maybe better to turn the "automatically find a suitable --parallel value" functionality back on?

5.1$ bzr diff
=== modified file 'mysql-test/mysql-test-run.pl'
--- mysql-test/mysql-test-run.pl	2009-05-25 20:58:31 +0000
+++ mysql-test/mysql-test-run.pl	2009-05-28 11:51:05 +0000
@@ -244,7 +244,7 @@ my $opt_max_save_core= $ENV{MTR_MAX_SAVE
 my $opt_max_save_datadir= $ENV{MTR_MAX_SAVE_DATADIR} || 20;
 my $opt_max_test_fail= $ENV{MTR_MAX_TEST_FAIL} || 10;
 
-my $opt_parallel= $ENV{MTR_PARALLEL} || 1;
+my $opt_parallel= $ENV{MTR_PARALLEL};
 
 select(STDOUT);
 $| = 1; # Automatically flush STDOUT

This patch would run the code ~ 2915 in mysql-test-run.pl
[28 May 2009 12:00] Bjørn Munch
Yes to turn on auto-selection of --parallel, but I prefer to do one change at a time.  Might add a special value --parallel=auto

What do you mean by "the code ~ 2915" ??
[5 Jun 2009 8:04] Bugs System
Pushed into 5.1.36 (revid:bjorn.munch@sun.com-20090605074215-1d7l2reqdb9a0t0t) (version source revid:bjorn.munch@sun.com-20090605074215-1d7l2reqdb9a0t0t) (merge vers: 5.1.36) (pib:6)
[5 Jun 2009 15:32] Paul Dubois
Test suite changes. No changelog entry needed.

Setting report to NDI pending push into 6.0.x.
[17 Jun 2009 19:27] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090616183122-chjzbaa30qopdra9) (version source revid:matthias.leich@sun.com-20090609174954-3ao9iz97nzrfg9yl) (merge vers: 5.4.4-alpha) (pib:11)
[18 Jun 2009 15:30] Paul Dubois
Test suite changes. No changelog entry needed.
[26 Aug 2009 13:45] Bugs System
Pushed into 5.1.37-ndb-7.0.8 (revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[26 Aug 2009 13:46] Bugs System
Pushed into 5.1.37-ndb-6.3.27 (revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (version source revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (merge vers: 5.1.37-ndb-6.3.27) (pib:11)
[26 Aug 2009 13:48] Bugs System
Pushed into 5.1.37-ndb-6.2.19 (revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (version source revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (merge vers: 5.1.37-ndb-6.2.19) (pib:11)
[27 Aug 2009 16:32] Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:magnus.blaudd@sun.com-20090827163030-6o3kk6r2oua159hr) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)