Skip to content

Commit

Permalink
MDEV-17076: mtr max-{core,datadir} 0 means 0
Browse files Browse the repository at this point in the history
There was no ability to set the mtr arguments of:
* --max-save-core; and
* --max-save-datadir

to 0. This is desireable in an automatied scenario where space
is limited hence targeting 10.1 branch.

We take away the 0 means unlimited aspect for these,
however, perl can handle some big numbers so they may as well be
close enough to unlimited for all meaningful purposes.
  • Loading branch information
grooverdan committed Jul 27, 2020
1 parent 1ce9735 commit 99af3cb
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,7 @@ ($$$)
My::CoreDump->show($core_file, $exe_mysqld, $opt_parallel);

# Limit number of core files saved
if ($opt_max_save_core > 0 &&
$num_saved_cores >= $opt_max_save_core)
if ($num_saved_cores >= $opt_max_save_core)
{
mtr_report(" - deleting it, already saved",
"$opt_max_save_core");
Expand All @@ -714,8 +713,7 @@ ($$$)
},
$worker_savedir);

if ($opt_max_save_datadir > 0 &&
$num_saved_datadir >= $opt_max_save_datadir)
if ($num_saved_datadir >= $opt_max_save_datadir)
{
mtr_report(" - skipping '$worker_savedir/'");
rmtree($worker_savedir);
Expand Down Expand Up @@ -6220,12 +6218,12 @@ ($)
test(s)
max-save-core Limit the number of core files saved (to avoid filling
up disks for heavily crashing server). Defaults to
$opt_max_save_core, set to 0 for no limit. Set
it's default with MTR_MAX_SAVE_CORE
$opt_max_save_core. Set its default with
MTR_MAX_SAVE_CORE
max-save-datadir Limit the number of datadir saved (to avoid filling
up disks for heavily crashing server). Defaults to
$opt_max_save_datadir, set to 0 for no limit. Set
it's default with MTR_MAX_SAVE_DATADIR
$opt_max_save_datadir. Set its default with
MTR_MAX_SAVE_DATADIR
max-test-fail Limit the number of test failures before aborting
the current test run. Defaults to
$opt_max_test_fail, set to 0 for no limit. Set
Expand Down

0 comments on commit 99af3cb

Please sign in to comment.