diff options
author | Anel Husakovic <anel@mariadb.org> | 2022-12-20 14:25:21 +0100 |
---|---|---|
committer | Anel <an3l@users.noreply.github.com> | 2023-01-30 12:35:36 +0100 |
commit | 0e737f78980fcfe83b05c27215eb3f5ede1ea473 (patch) | |
tree | b99e78344d6b914561297a1ed9feb411a1d942a4 | |
parent | 81196469bbc6b8424c97a378e5fc5b16d40b43b5 (diff) | |
download | mariadb-git-0e737f78980fcfe83b05c27215eb3f5ede1ea473.tar.gz |
MDEV-30186 Use of uninitialized value in substitution
Reviewer: <>
-rwxr-xr-x | mysql-test/mariadb-test-run.pl | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl index 46a51d2fa58..670f63a990f 100755 --- a/mysql-test/mariadb-test-run.pl +++ b/mysql-test/mariadb-test-run.pl @@ -145,6 +145,7 @@ my $opt_start_exit; my $start_only; my $file_wsrep_provider; my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far. +my $test_name_for_report; our @global_suppressions; @@ -515,13 +516,13 @@ sub main { } if ( not @$completed ) { - my $test_name= mtr_grab_file($path_testlog); - $test_name =~ s/^CURRENT_TEST:\s//; - chomp($test_name); - my $tinfo = My::Test->new(name => $test_name); - $tinfo->{result}= 'MTR_RES_FAILED'; - $tinfo->{comment}=' '; - mtr_report_test($tinfo); + if ($test_name_for_report) + { + my $tinfo = My::Test->new(name => $test_name_for_report); + $tinfo->{result}= 'MTR_RES_FAILED'; + $tinfo->{comment}=' '; + mtr_report_test($tinfo); + } mtr_error("Test suite aborted"); } @@ -3740,8 +3741,8 @@ sub resfile_report_test ($) { sub run_testcase ($$) { my ($tinfo, $server_socket)= @_; my $print_freq=20; - - mtr_verbose("Running test:", $tinfo->{name}); + $test_name_for_report= $tinfo->{name}; + mtr_verbose("Running test:", $test_name_for_report); $ENV{'MTR_TEST_NAME'} = $tinfo->{name}; resfile_report_test($tinfo) if $opt_resfile; @@ -5130,12 +5131,10 @@ sub mysqld_start ($$) { if (!$rc) { # Report failure about the last test case before exit - my $test_name= mtr_grab_file($path_current_testlog); - $test_name =~ s/^CURRENT_TEST:\s//; - my $tinfo = My::Test->new(name => $test_name); + my $tinfo = My::Test->new(name => $test_name_for_report); $tinfo->{result}= 'MTR_RES_FAILED'; $tinfo->{failures}= 1; - $tinfo->{logfile}=get_log_from_proc($mysqld->{'proc'}, $tinfo->{name}); + $tinfo->{logfile}=get_log_from_proc($mysqld->{'proc'}, $test_name_for_report); report_option('verbose', 1); mtr_report_test($tinfo); } |