Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2202 06/03/19 21:44:14 msvensson@shellback.(none) +1 -0
--valgrind => valgrind "all" eexecs
--valgrind-mysqld => valgrind mysqld
--valgrind-mysqltest => valgrind mysqltest
--valgrind-all => turn on verbose and show-reachable for selected executables
mysql-test/mysql-test-run.pl
1.91 06/03/19 21:44:09 msvensson@shellback.(none) +34 -30
Send output from valgrinding mysqltest into mysqltest.err so it's examined for waqrnings when completed
Print info about which executables are valgrind'ed
Add option --valgrind-mysqld
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/mysqltestrun_pl/my51-mysqltestrun_pl
--- 1.90/mysql-test/mysql-test-run.pl 2006-03-19 20:24:25 +01:00
+++ 1.91/mysql-test/mysql-test-run.pl 2006-03-19 21:44:09 +01:00
@@ -159,7 +159,7 @@
our $path_timefile;
our $path_snapshot;
our $path_slave_load_tmpdir; # What is this?!
-our $path_mysqltest_log;
+our $path_mysqltest_err;
our $path_my_basedir;
our $opt_vardir; # A path but set directly on cmd line
our $opt_vardir_trace; # unix formatted opt_vardir for trace files
@@ -462,7 +462,6 @@
# We require that we are in the "mysql-test" directory
# to run mysql-test-run
-
if (! -f $glob_scriptname)
{
mtr_error("Can't find the location for the mysql-test-run script\n" .
@@ -591,7 +590,7 @@
'record' => \$opt_record,
'check-testcases' => \$opt_check_testcases,
- # ???
+ # Extra arguments used when starting mysqld
'mysqld=s' => \@opt_extra_mysqld_opt,
# Run test on running server
@@ -612,6 +611,7 @@
'gcov' => \$opt_gcov,
'gprof' => \$opt_gprof,
'valgrind:s' => \$opt_valgrind,
+ 'valgrind-mysqld:s' => \$opt_valgrind_mysqld,
'valgrind-mysqltest:s' => \$opt_valgrind_mysqltest,
'valgrind-all:s' => \$opt_valgrind_all,
'valgrind-options=s' => \$opt_valgrind_options,
@@ -818,17 +818,33 @@
# undefined option not set
# "" option set with no argument
# "somestring" option is name/path of valgrind executable
-
# Take executable path from any of them, if any
- $opt_valgrind_mysqld= $opt_valgrind;
- $opt_valgrind= $opt_valgrind_mysqltest if $opt_valgrind_mysqltest;
- $opt_valgrind= $opt_valgrind_all if $opt_valgrind_all;
- # If valgrind flag not defined, define if other valgrind flags are
- unless ( defined $opt_valgrind )
+ if ( defined $opt_valgrind )
+ {
+ # --valgrind or --valgrind-all turns on valgrinding of mysqld and mysqltest
+ mtr_report("Turn on \"valgrind\" for both mysqld and mysqltest");
+ $opt_valgrind_mysqld= $opt_valgrind;
+ $opt_valgrind_mysqltest= $opt_valgrind;
+ }
+ else
{
- $opt_valgrind= ""
- if defined $opt_valgrind_mysqltest or defined $opt_valgrind_all;
+ if (defined $opt_valgrind_mysqld )
+ {
+ mtr_report("Turn on \"valgrind\" for mysqld");
+ $opt_valgrind= $opt_valgrind_mysqld;
+ }
+ elsif (defined $opt_valgrind_mysqltest )
+ {
+ mtr_report("Turn on \"valgrind\" for mysqltest");
+ $opt_valgrind= $opt_valgrind_mysqltest;
+ }
+ elsif (defined $opt_valgrind_all)
+ {
+ mtr_error("Can't use --valgrind-all on it's own\n".
+ "specify what to valgrind with\n".
+ " --valgrind, --valgrind-mysqld or --valgrind-mysqltest");
+ }
}
if ( ! $opt_testcase_timeout )
@@ -847,8 +863,6 @@
{
$opt_sleep_time_after_restart= 10;
$opt_sleep_time_for_delete= 60;
- # >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr
- # valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck"
}
if ( ! $opt_user )
@@ -974,7 +988,7 @@
}
$path_timefile= "$opt_vardir/log/mysqltest-time";
- $path_mysqltest_log= "$opt_vardir/log/mysqltest.log";
+ $path_mysqltest_err= "$opt_vardir/log/mysqltest.err";
$path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/";
@@ -2265,10 +2279,10 @@
}
report_failure_and_restart($tinfo);
}
- # Save info from this testcase run to mysqltest.log
+ # Save info from this testcase run to mysqltest.err
my $testcase_log= mtr_fromfile($path_timefile) if -f $path_timefile;
- mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n");
- mtr_tofile($path_mysqltest_log, $testcase_log);
+ mtr_tofile($path_mysqltest_err,"CURRENT TEST $tname\n");
+ mtr_tofile($path_mysqltest_err, $testcase_log);
}
# ----------------------------------------------------------------------
@@ -2706,15 +2720,6 @@
return $args;
}
-# FIXME
-# if ( $type eq 'master' and $glob_use_embedded_server )
-# {
-# # Add a -A to each argument to pass it to embedded server
-# my @mysqltest_opt= map {("-A",$_)} @args;
-# $opt_extra_mysqltest_opt= \@mysqltest_opt;
-# return;
-# }
-
##############################################################################
#
# Start mysqld and return the PID
@@ -3295,11 +3300,9 @@
if ( $opt_valgrind_options )
{
- # FIXME split earlier and put into @glob_valgrind_*
mtr_add_arg($args, split(' ', $opt_valgrind_options));
}
-
mtr_add_arg($args, $$exe);
$$exe= $opt_valgrind || "valgrind";
@@ -3382,9 +3385,10 @@
gcov FIXME
gprof FIXME
- valgrind[=EXE] Run the "mysqld" server using valgrind, optionally
+ valgrind[=EXE] Run "mysqld" and "mysqltest" using valgrind, optionally
specifying the executable path/name
- valgrind-mysqltest[=EXE] In addition, run the "mysqltest" executable with valgrind
+ valgrind[=EXE] Run only "mysqld" using valgrind
+ valgrind-mysqltest[=EXE] Run only "mysqltest" with valgrind
valgrind-all[=EXE] Adds verbose flag, and --show-reachable to valgrind
valgrind-options=ARGS Extra options to give valgrind
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2202) | msvensson | 20 Mar |