[MDEV-30281] MTR options from .cnf config file and features Created: 2022-12-20  Updated: 2024-02-02

Status: Stalled
Project: MariaDB Server
Component/s: Tests
Fix Version/s: 11.0

Type: Task Priority: Major
Reporter: Aleksey Midenkov Assignee: Aleksey Midenkov
Resolution: Unresolved Votes: 0
Labels: mtr

Issue Links:
Relates
relates to MDEV-29460 MTR options --one-combination and --l... Open

 Description   

1. Config file by default is located in HOME/.mtr-mariadb;
2. Config file format is compatible with server conf file. So server config can contain MTR sections;
3. Default section is [mtr], if section name is absent in the beginning of file it is treated as [mtr];
4. We can set file location and section name from command-line or from envirnment;
5. Command-line options take precedence over configuration file, environment variables take precedence over command-line options.
6. If some code is taken from CPAN its license must comply with our licensing requirements;
7. If there is wrong setting in configuration file MTR fails and displays the error message. It is clear from where it comes: conf file or command-line.



 Comments   
Comment by Aleksey Midenkov [ 2022-12-27 ]

Please review bb-10.11-midenok

Comment by Oleksandr Byelkin [ 2023-09-18 ]

We will discuss it on a call.

Comment by Aleksey Midenkov [ 2023-11-14 ]

To implement supplemental feature:

suite[s]=NAME1,..,NAMEn option should allow exclusion of suites (from default set or from configured in file) via negation like: --suites=!NAME1, !NAME2, !NAME3, ..., !NAMEn

Comment by Aleksey Midenkov [ 2023-11-15 ]

Another supplemental feature:

Instead of printing this:

parts.alter_table 'aria,innodb,lcase1,range' [ pass ]    121
parts.alter_table 'aria,innodb,lcase1,list' [ pass ]    116
parts.alter_table 'aria,innodb,lcase2,range' [ pass ]    125
parts.alter_table 'aria,innodb,lcase2,list' [ pass ]    112
parts.alter_table 'aria,innodb,lcase_def,range' [ pass ]    120
parts.alter_table 'aria,innodb,lcase_def,list' [ pass ]    107
parts.alter_table 'innodb,innodb,lcase1,range' [ pass ]    389
parts.alter_table 'innodb,innodb,lcase1,list' [ pass ]    327
parts.alter_table 'innodb,innodb,lcase2,range' [ pass ]    445
parts.alter_table 'innodb,innodb,lcase2,list' [ pass ]    346
parts.alter_table 'innodb,innodb,lcase_def,range' [ pass ]    384
parts.alter_table 'innodb,innodb,lcase_def,list' [ pass ]    310
parts.alter_table 'innodb,lcase1,myisam,range' [ pass ]     92
parts.alter_table 'innodb,lcase1,list,myisam' [ pass ]     86
parts.alter_table 'innodb,lcase2,myisam,range' [ pass ]    101
parts.alter_table 'innodb,lcase2,list,myisam' [ pass ]     85
parts.alter_table 'innodb,lcase_def,myisam,range' [ pass ]     94
parts.alter_table 'innodb,lcase_def,list,myisam' [ pass ]     87

It should print like this:

parts.alter_table,aria,innodb,lcase1,range		[ pass ]    121
parts.alter_table,aria,innodb,lcase1,list		[ pass ]    116
parts.alter_table,aria,innodb,lcase2,range		[ pass ]    125
parts.alter_table,aria,innodb,lcase2,list		[ pass ]    112
parts.alter_table,aria,innodb,lcase_def,range		[ pass ]    120
parts.alter_table,aria,innodb,lcase_def,list		[ pass ]    107
parts.alter_table,innodb,innodb,lcase1,range		[ pass ]    389
parts.alter_table,innodb,innodb,lcase1,list		[ pass ]    327
parts.alter_table,innodb,innodb,lcase2,range		[ pass ]    445
parts.alter_table,innodb,innodb,lcase2,list		[ pass ]    346
parts.alter_table,innodb,innodb,lcase_def,range		[ pass ]    384
parts.alter_table,innodb,innodb,lcase_def,list		[ pass ]    310
parts.alter_table,innodb,lcase1,myisam,range		[ pass ]     92
parts.alter_table,innodb,lcase1,list,myisam		[ pass ]     86
parts.alter_table,innodb,lcase2,myisam,range		[ pass ]    101
parts.alter_table,innodb,lcase2,list,myisam		[ pass ]     85
parts.alter_table,innodb,lcase_def,myisam,range		[ pass ]     94
parts.alter_table,innodb,lcase_def,list,myisam		[ pass ]     87

For easy copy&paste.

have_innodb.inc should not add spurious innodb combination

Comment by Sergei Golubchik [ 2023-11-15 ]

I didn't dare to change mtr output (as it would break buildbot and its reporting and cross-reference and what's not), so I use this script locally:

#!/usr/bin/perl -w
 
my $file=shift || (-e 'typescript' ? 'typescript' : -e 'text' ? 'text' : undef);
die unless -e $file;
 
rename $file, "$file~" or die "rename($file, $file~): $!";
open (I, '<', "$file~") or die "open(<$file~): $!";
open (O, '>', $file) or die "open(>$file): $!";
 
while(<I>) {
  s/\e\[\d+m//g;
  s/\e.*\a//;
  s/[\r\n\a]//g;
  s/^worker\[0*(\d+)\]/w$1/;
  s/ '(.+?)'( +w\d+ \[ [-a-z]+ \])/,$1 $2/;
  print O "$_\n";
}

it also replaces worker references from --verbose-restart like worker[4] with w4

Comment by Aleksey Midenkov [ 2024-02-02 ]

"Trying to get some variables." should be possible to disable by command-line:

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x629000032238): update help_topic set description = CONCAT(description, '\n| FORCE                                 | Enables the plugin. If the plugin  |\n|                                       | cannot be initialized, then the    |\n|                                       | server will fail to start with an  |\n|                                       | error.                             |\n+---------------------------------------+------------------------------------+\n| FORCE_PLUS_PERMANENT                  | Enables the plugin. If the plugin  |\n|                                       | cannot be initialized, then the    |\n|                                       | server will fail to start with an  |\n|                                       | error. In addition, the plugin     |\n|                                       | cannot be uninstalled with         |\n|                                       | UNINSTALL SONAME or UNINSTALL      |\n|                                       | PLUGIN while the server is         |\n|                                       | running.                           |\n+---------------------------------------+------------------------------------+\n\nA plugin\'s status can be found by looking at the PLUGIN_STATUS column of the\ninformation_schema.PLUGINS table.\n\nUninstalling Plugins\n--------------------\n\nPlugins that are found in the mysql.plugin table, that is those that were\ninstalled with INSTALL SONAME, INSTALL PLUGIN or mariadb-plugin can be\nuninstalled in one of two ways:\n\n* The UNINSTALL SONAME or the UNINSTALL PLUGIN statement while the server is\nrunning\n* With mariadb-plugin while the server is offline.\n\nPlugins that were enabled as a --plugin-load option do not need to be\nuninstalled. If --plugin-load is omitted the next time the server starts, or\nthe plugin is not listed as one of the --plugin-load entries, the plugin will\nnot be loaded.\n\nUNINSTALL PLUGIN uninstalls a single installed plugin, while UNINSTALL SONAME\nuninstalls all plugins belonging to a given library.\n\nURL: https://mariadb.com/kb/en/plugin-overview/') WHERE help_topic_id = 79;
 
Connection ID (thread ID): 1
Status: NOT_KILLED

This should be disabled in debug build:

Sorry, we probably made a mistake, and this is a bug.
 
Your assistance in bug reporting will enable us to fix this for the next release.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
 
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Generated at Thu Feb 08 10:15:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.