summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-02-25 14:10:25 +0100
committerSergei Golubchik <serg@mariadb.org>2021-03-01 13:22:34 +0100
commitdd9e5827a68c7864d61af44a4dea6932f963c55c (patch)
tree91b20a4f13fa39ad46fca0356370b0f0f0abc3c5
parent259e5243faa88370bbb890342326a324fb648f7d (diff)
downloadmariadb-git-dd9e5827a68c7864d61af44a4dea6932f963c55c.tar.gz
mtr --gdb: fix for --rr and for a warning
use _RR_TRACE_DIR=dir instead of -o dir, as the former can store multiple traces in dir (if, e.g., the test restarts mysqld) suppress uninitialized warning when $exe is undefined (--manual-XXX)
-rw-r--r--mysql-test/lib/My/Debugger.pm3
-rwxr-xr-xmysql-test/mysql-test-run.pl2
2 files changed, 3 insertions, 2 deletions
diff --git a/mysql-test/lib/My/Debugger.pm b/mysql-test/lib/My/Debugger.pm
index d2add55d680..a2d5f2a5435 100644
--- a/mysql-test/lib/My/Debugger.pm
+++ b/mysql-test/lib/My/Debugger.pm
@@ -74,7 +74,8 @@ my %debuggers = (
options => '-f -o {log} {exe} {args}',
},
rr => {
- options => 'record -o {log} {exe} {args}',
+ options => '_RR_TRACE_DIR={log} rr record {exe} {args}',
+ run => 'env',
pre => sub {
::mtr_error('rr requires kernel.perf_event_paranoid <= 1')
if ::mtr_grab_file('/proc/sys/kernel/perf_event_paranoid') > 1;
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 07f103ba91e..fd25c28dc06 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -5071,7 +5071,7 @@ sub mysqld_start ($$) {
$ENV{'MYSQLD_LAST_CMD'}= "$exe @$args";
My::Debugger::setup_args(\$args, \$exe, $mysqld->name());
- $ENV{'VALGRIND_TEST'}= $opt_valgrind = int($exe && $exe eq 'valgrind');
+ $ENV{'VALGRIND_TEST'}= $opt_valgrind = int(($exe || '') eq 'valgrind');
# Remove the old pidfile if any
unlink($mysqld->value('pid-file'));