maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #12886
Re: ff0ece70855: MDEV-26531: mtr shows some hunks failed
Hi, Anel!
On Sep 10, Anel Husakovic wrote:
> revision-id: ff0ece70855 (mariadb-10.6.1-73-gff0ece70855)
> parent(s): 1bc82aaf0a7
> author: Anel Husakovic
> committer: Anel Husakovic
> timestamp: 2021-09-03 21:15:58 +0200
> message:
>
> MDEV-26531: mtr shows some hunks failed
>
> Reviewed by: wlad@xxxxxxxxxxx
>
> ---
> mysql-test/mariadb-test-run.pl | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl
> index 6dcd25a9c86..7e0282b89e4 100755
> --- a/mysql-test/mariadb-test-run.pl
> +++ b/mysql-test/mariadb-test-run.pl
> @@ -3278,11 +3278,15 @@ sub do_before_run_mysqltest($)
> # don't rebuild a file if it's up to date
> unless (-e $dest and -M $dest < -M $resfile
> and -M $dest < -M $base_result) {
> - run_system(@cmd);
> + if(run_system(@cmd) != 0){
> + die("system(@cmd) : $?");
I'd rather see it done more perl-ish, like
run_system(@cmd) or die "system(@cmd): $?"
> + }
> }
> } else {
> $cmd[-3] = $dest = $opt_tmpdir . '/' . basename($dest);
> - run_system(@cmd);
> + if(run_system(@cmd) != 0){
> + die("system(@cmd) : $?");
> + }
> }
> $tinfo->{result_file} = $dest;
> }
> @@ -4887,7 +4891,7 @@ sub report_failure_and_restart ($) {
>
> sub run_system(@) {
> mtr_verbose("Running '$_[0]'");
> - my $ret= system(@_) >> 8;
> + my $ret= system(@_);
this seems wrong. `perldoc -f system` says
The return value is the exit status of the program as returned
by the "wait" call. To get the actual exit value, shift right by
eight (see below).
> return $ret;
> }
Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx