← Back to team overview

maria-developers team mailing list archive

Re: [patch 01/11] Fix error report summary at end of mysql-test-run

 

Hi!

>>>>> "knielsen" == knielsen  <knielsen@xxxxxxxxxxxxxxx> writes:

knielsen> My previous fix for not ignoring warnings during server shutdown would
knielsen> terminate the test suite completely in case of extra warnings,
knielsen> omitting the error summary at the end.

knielsen> This patch provides a much nicer summary report which includes all
knielsen> test sequences that had warnings during shutdown.

knielsen> Also add a $fail flag to make 100% sure mysql-test-run.pl will return
knielsen> failure for any kind of problem occured during the test suite.

knielsen> Also revert wrong "internal error" message from earlier patch.

<cut>

knielsen> -sub mtr_report_stats ($) {
knielsen> +sub mtr_report_stats ($$$) {
knielsen> +  my $fail= shift;
knielsen>    my $tests= shift;
knielsen> +  my $extra_warnings= shift;
knielsen>  
knielsen>    # ----------------------------------------------------------------------
knielsen>    # Find out how we where doing
knielsen> @@ -325,10 +327,27 @@ sub mtr_report_stats ($) {
knielsen>      print "All $tot_tests tests were successful.\n\n";
knielsen>    }
knielsen>  
knielsen> +  if (@$extra_warnings)
knielsen> +  {
knielsen> +    print <<MSG;
knielsen> +Errors/warnings were found in logfiles during server shutdown after running the
knielsen> +following sequence(s) of tests:
knielsen> +MSG
knielsen> +    print "    $_\n" for @$extra_warnings;
knielsen> +  }
knielsen> +
knielsen>    if ( $tot_failed != 0 || $found_problems)
knielsen>    {
knielsen>      mtr_error("there were failing test cases");
knielsen>    }
knielsen> +  elsif (@$extra_warnings)
knielsen> +  {
knielsen> +    mtr_error("There were errors/warnings in server logs after running test cases.");
knielsen> +  }
knielsen> +  elsif ($fail)
knielsen> +  {
knielsen> +    mtr_error("Test suite failure, see messages above for possible cause(s).");
knielsen> +  }
knielsen>  }

Looked through the patch, and found only one possible thing to comment
about:

It lookes liked this case is handled, but from the patch/current code
it was not trivial to be sure.

- We run some tests, one test fails.
- Test suite fails totally (for example timeout) for test 2

I hope that in this case we get a clear error that not all tests are
run (as the @tests above probably only includes the test that we did run)

ok to push, assuming the above is true.

Regards,
Monty



Follow ups

References