diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2020-06-17 08:07:01 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2020-06-24 10:15:21 +0300 |
commit | e3104c4a8c6b97bbc295a2ec7802c30c51fb7801 (patch) | |
tree | f70319e7d05ffd8a1dc0b4c88ae9cf22b97eaaed /mysql-test/mysql-test-run.pl | |
parent | fe0cf85d5adb2a9cb619d7137f971b7579d85d02 (diff) | |
download | mariadb-git-e3104c4a8c6b97bbc295a2ec7802c30c51fb7801.tar.gz |
MDEV-22179 rr support for mtr
* --rr-dir to change store dir
* --rr-arg doesn't enable --rr (good for scripts)
* Bootstrap is saved to rr.boot
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 93cf00498b4..ea9f0e9ba74 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -261,7 +261,9 @@ our %gprof_dirs; our $glob_debugger= 0; our $opt_gdb; -our $opt_rr; +my $opt_rr; +my $opt_rr_dir; +my @rr_record_args; our $opt_client_gdb; my $opt_boot_gdb; my $opt_boot_rr; @@ -335,7 +337,6 @@ my $opt_callgrind; my %mysqld_logs; my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions. my $warn_seconds = 60; -my @rr_record_args; sub testcase_timeout ($) { my ($tinfo)= @_; @@ -1321,6 +1322,7 @@ sub command_line_setup { 'gdb=s' => \$opt_gdb, 'rr' => \$opt_rr, 'rr-arg=s' => \@rr_record_args, + 'rr-dir=s' => \$opt_rr_dir, 'client-gdb' => \$opt_client_gdb, 'manual-gdb' => \$opt_manual_gdb, 'manual-lldb' => \$opt_manual_lldb, @@ -1785,11 +1787,6 @@ sub command_line_setup { mtr_error("Coverage test needs the source - please use source dist"); } - if ( @rr_record_args ) - { - $opt_rr= 1; - } - # -------------------------------------------------------------------------- # Check debug related options # -------------------------------------------------------------------------- @@ -3412,7 +3409,7 @@ sub mysql_install_db { if ($opt_boot_rr) { $args= ["record", @rr_record_args, $exe_mysqld_bootstrap, @$args]; $exe_mysqld_bootstrap= "rr"; - my $rr_dir= "$opt_vardir/rr.bootstrap"; + my $rr_dir= $opt_rr_dir ? $opt_rr_dir : "$opt_vardir/rr.boot"; $ENV{'_RR_TRACE_DIR'}= $rr_dir; mkpath($rr_dir); } @@ -5390,7 +5387,7 @@ sub mysqld_start ($$) { { $args= ["record", @rr_record_args, "$exe", @$args]; $exe= "rr"; - my $rr_dir= "$opt_vardir/rr". $mysqld->after('mysqld'); + my $rr_dir= $opt_rr_dir ? $opt_rr_dir : "$opt_vardir/rr". $mysqld->after('mysqld'); $ENV{'_RR_TRACE_DIR'}= $rr_dir; mkpath($rr_dir); } @@ -6578,11 +6575,14 @@ Options for strace stracer=<EXE> Specify name and path to the trace program to use. Default is "strace". Example: $0 --stracer=ktrace. -Options for rr(Record and Replay) +Options for rr (Record and Replay) rr Run the "mysqld" executables using rr. Default run option is "rr record mysqld mysqld_options" boot-rr Start bootstrap server in rr rr-arg=ARG Option to give rr record, can be specified more then once + rr-dir=DIR The directory where rr recordings are stored. Defaults + to 'vardir'/rr.0 (rr.boot for bootstrap instance and + rr.1, ..., rr.N for slave instances). Misc options user=USER User for connecting to mysqld(default: $opt_user) |