summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2020-10-27 02:19:05 +0100
committerAnel Husakovic <anel@mariadb.org>2020-10-27 02:30:41 +0100
commit911655c36cc6faadc692d45831762ddfc4265ea7 (patch)
tree1cb5cfdfe9ef1b48a8f9489d2c4624ba88be93ab
parent858434910835117215890f8368b91b2905e74815 (diff)
downloadmariadb-git-bb-10.1-anel-MDEV-23679-mtrabort-v2.tar.gz
MDEV-23769: MTR can abort before it prints the test result summarybb-10.1-anel-MDEV-23679-mtrabort-v2
- Patch is solving generating report on warning To repeat the error run single worker: ``` ./mtr --mysqld=--lock-wait-timeout=-xx 1st 1st --force --parallel 1 ``` or `N` workers with `N+1` tests with failures and `force` ``` ./mtr --mysqld=--lock-wait-timeout=-xx 1st 1st grant5 --force --parallel 2 ``` - Patch is doing cosmetic fix of `current_test` log file which holds the old log value of test `CURRENT TEST:..` in `mark_log()` in case of `unknown option` and as such the logic which is using it's content doesn't output valid log content and doesn't generate valid `$test->{'comment'}` message.asdf
-rwxr-xr-xmysql-test/mysql-test-run.pl15
1 files changed, 12 insertions, 3 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index e76712cc079..b0916f7ec1e 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -140,7 +140,7 @@ my $opt_start_dirty;
my $opt_start_exit;
my $start_only;
my $file_wsrep_provider;
-
+my $wait_on_result= 0;
our @global_suppressions;
END {
@@ -659,13 +659,14 @@ sub run_test_server ($$$) {
chomp($line);
if ($line eq 'TESTRESULT'){
+
+ $wait_on_result= 1;
$result= My::Test::read_test($sock);
# Report test status
mtr_report_test($result);
if ( $result->is_failed() ) {
-
# Save the workers "savedir" in var/log
my $worker_savedir= $result->{savedir};
my $worker_savename= basename($worker_savedir);
@@ -904,11 +905,18 @@ sub run_test_server ($$$) {
delete $next->{criteria};
$next->write_test($sock, 'TESTCASE');
$running{$next->key()}= $next;
+ $wait_on_result= 0;
}
else {
# No more test, tell child to exit
#mtr_report("Saying BYE to child");
- print $sock "BYE\n";
+ if ($wait_on_result == 1){
+ print $sock "BYE\n";
+ $wait_on_result= 0
+ }
+ else {
+ next;
+ }
}
}
}
@@ -3971,6 +3979,7 @@ sub run_testcase ($$) {
if (start_servers($tinfo))
{
report_failure_and_restart($tinfo);
+ unlink $path_current_testlog;
return 1;
}
}