Added --result-file option, which will produce var/mtr-results.txt
Output has a simple format:
<tag> : <value> for general info on test run
{
<tag> : <value>
....
} for each test
Output from failed tests are included but may be truncated.
See WL for more details.
Added code to call 'ctest' if the needed cmake file is present
Will do so unless tests/suited named on mtr command line
Also add option to turn on/off
Will be made to look like a test 'unit-test' which counts towards total
Extracts summary report and any test failures from ctest output
Addendum: added override to turn off in PB, add back in selected invocations
Some output is written, some is not
Finally concluded it's a Perl bug: after running with parallel threads
for a while, print suddenly ignores all but the first argument.
Workaround: concatenate all the arguments into one, except in output that
only comes before we start running tests
perl
The problem here was the method how MTR gets its unique thread ids.
Prior to this patch, the method to do it was to maintain a global
table of pid,mtr_unique_id) pairs. The table was backed by a text
file. The table was cleaned up one in a while and dead processes leaking
unique_ids were determined with with kill(0) or with scripting tasklist
on Windows.
This method is flawed specifically on native Windows Perl. fork() is
implemented with starting a new thread, give it a syntetic negative PID
(threadID*(-1)), until this thread creates a new process with exec()
However, neither tasklist nor any other native Windows tool can cope with
negative perl PIDs. This lead to incorrect determination of dead process
and reusing already used mtr_unique_id.
The patch introduces alternative portable method of solving unique-id
problem. When a process needs a unique id in range [min...max], it just
starts to open files named min, min+1,...max in a loop . After file is
opened, we do non-blocking flock(). When flock() succeeds, process has
allocated the ID. When process dies, file is unlocked . Checks for zombies
are not necessary.
Since the change would create a co-existence problems with older version
of MTR, because of different way to calculate IDs, the default ID range
is changed from 250-299 to 300-349.
Another fix that was necessary enable --parallel option was to serialize
spawn() calls on Windows. specifically, IO redirects needed to be protected.
This patch also fixes hanging CRTL-C (as described in Bug #38629) for the
"new" MTR. The fix was already in 6.0 and is now downported.
It seems that the length of the thick line printed by mtr when printing the
suite name differs from mtr1 and mtr2, affecting the mtr filtering by PB2.
This patch addresses it by restoring the thick line length to 78 (original
length) instead of 60 (the one in mtr2).
- Clear test variables "comment" and "logfile" to make sure thay aren't
already set from previous run of same test
- Print warning if test result already set and set it anyway
conflicts:
Text conflict in client/mysqltest.cc
Text conflict in mysql-test/include/wait_until_connected_again.inc
Text conflict in mysql-test/lib/mtr_report.pm
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/r/events_bugs.result
Text conflict in mysql-test/r/log_state.result
Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
Text conflict in mysql-test/r/mysqlcheck.result
Text conflict in mysql-test/r/query_cache.result
Text conflict in mysql-test/r/status.result
Text conflict in mysql-test/suite/binlog/r/binlog_index.result
Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
Text conflict in mysql-test/t/disabled.def
Text conflict in mysql-test/t/events_bugs.test
Text conflict in mysql-test/t/log_state.test
Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
Text conflict in mysql-test/t/mysqlcheck.test
Text conflict in mysql-test/t/query_cache.test
Text conflict in mysql-test/t/rpl_init_slave_func.test
Text conflict in mysql-test/t/status.test
- Fix problem with for example ./mtr --timer, caused by new version of "Getopt::Long"
- Evaluating the "$opt" variable as a string, returns the name of the parameter
to be modified instead of "Getopt::Long::Callback" which is the class name
Use opt_start_timeout also for ndb
Remove the .result files generated by 'check_testcase'
mysql-test/lib/mtr_report.pm:
Use "failures" to keep track of if test has previously failed
oportunity to check if any other process fails during this.
Add possiblitiy to store "user_data" in a Safeprocess
Add function to get pid from a SafeProcess
mysql-test/lib/My/SafeProcess.pm:
Add possiblitiy to store "user_data" in a Safeprocess
Add function to get pid from a SafeProcess
mysql-test/lib/mtr_report.pm:
Print and detected test case sideffect also in the test server
mysql-test/mysql-test-run.pl:
Run all check-warning and check-testcase in parallel, this also give the
oportunity to check if any other process fails during this.
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-maint2
mysql-test/lib/mtr_cases.pm:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/lib/mtr_report.pm:
Manual merge
BitKeeper/deleted/.del-rpl_bug33931-slave.opt:
Delete: mysql-test/suite/rpl/t/rpl_bug33931-slave.opt
mysql-test/include/default_mysqld.cnf:
Set a default name for "log-bin"
mysql-test/mysql-test-run.pl:
Check for warnings in mysqld error log files after each testcase,
using SQL
mysql-test/lib/mtr_cases.pm:
Make mtr_match into a perl module
mysql-test/lib/mtr_match.pm:
Make mtr_match into a perl module
mysql-test/lib/mtr_report.pm:
Make mtr_match into a perl module
Print warnings if testcase failed from warnings
mysql-test/r/information_schema.result:
Be more selective which databases and tables are select in the queries
mysql-test/r/mysql_upgrade.result:
Update result, mysql_upgrade will check _all_ databases
mysql-test/r/mysqlcheck.result:
Update result, mysql_upgrade should check _all_ databases
mysql-test/r/sp-destruct.result:
Be more selective which databases and tables are select in the queries
mysql-test/r/sp-error.result:
Backup and restore mysql.proc table
mysql-test/r/sp-security.result:
Be more selective which databases and tables are select in the queries
mysql-test/r/sp.result:
Be more selective which databases and tables are select in the queries
mysql-test/suite/rpl/r/rpl_bug33931.result:
Move the setting of debug flag into the test file instead of in -slave.opt
Add supression
mysql-test/suite/rpl/r/rpl_idempotency.result:
Add supression
Add master-slave-end.inc
mysql-test/suite/rpl/t/rpl_bug33931.test:
Move the setting of debug flag into the test file instead of in -slave.opt
Add supression
mysql-test/suite/rpl/t/rpl_idempotency.test:
Add supression
Add master-slave-end.inc
mysql-test/t/information_schema.test:
Be more selective which databases and tables are select in the queries
mysql-test/t/sp-destruct.test:
Be more selective which databases and tables are select in the queries
mysql-test/t/sp-error.test:
Backup and restore mysql.proc table
mysql-test/t/sp-security.test:
Be more selective which databases and tables are select in the queries
mysql-test/t/sp.test:
Be more selective which databases and tables are select in the queries
mysql-test/include/check-warnings.test:
New BitKeeper file ``mysql-test/include/check-warnings.test''
mysql-test/include/mtr_warnings.sql:
New BitKeeper file ``mysql-test/include/mtr_warnings.sql''