3069 Bjorn Munch 2011-04-26 [merge]
upmerge 12373916 and 12379923 (60907)
modified:
mysql-test/lib/My/SafeProcess/safe_process.pl
mysql-test/mysql-test-run.pl
3068 Bjorn Munch 2011-04-18 [merge]
yet another silly redundant null upmerge
=== modified file 'mysql-test/lib/My/SafeProcess/safe_process.pl'
--- a/mysql-test/lib/My/SafeProcess/safe_process.pl 2007-12-20 17:39:33 +0000
+++ b/mysql-test/lib/My/SafeProcess/safe_process.pl 2011-04-20 12:58:53 +0000
@@ -94,7 +94,7 @@ eval {
local $SIG{INT}= \&handle_signal;
local $SIG{CHLD}= sub {
message("Got signal @_");
- kill(9, -$child_pid);
+ kill('KILL', -$child_pid);
my $ret= waitpid($child_pid, 0);
if ($? & 127){
exit(65); # Killed by signal
@@ -134,7 +134,7 @@ if ( $@ ) {
# Use negative pid in order to kill the whole
# process group
#
-my $ret= kill(9, -$child_pid);
+my $ret= kill('KILL', -$child_pid);
message("Killed child: $child_pid, ret: $ret");
if ($ret > 0) {
message("Killed child: $child_pid");
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2011-04-18 13:38:00 +0000
+++ b/mysql-test/mysql-test-run.pl 2011-04-26 08:55:58 +0000
@@ -281,6 +281,7 @@ my $opt_valgrind_mysqltest= 0;
my @default_valgrind_args= ("--show-reachable=yes");
my @valgrind_args;
my $opt_valgrind_path;
+my $valgrind_reports= 0;
my $opt_callgrind;
my %mysqld_logs;
my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions.
@@ -505,6 +506,25 @@ sub main {
push @$completed, run_ctest() if $opt_ctest;
+ if ($opt_valgrind) {
+ # Create minimalistic "test" for the reporting
+ my $tinfo = My::Test->new
+ (
+ name => 'valgrind_report',
+ );
+ # Set dummy worker id to align report with normal tests
+ $tinfo->{worker} = 0 if $opt_parallel > 1;
+ if ($valgrind_reports) {
+ $tinfo->{result}= 'MTR_RES_FAILED';
+ $tinfo->{comment}= "Valgrind reported failures at shutdown, see above";
+ $tinfo->{failures}= 1;
+ } else {
+ $tinfo->{result}= 'MTR_RES_PASSED';
+ }
+ mtr_report_test($tinfo);
+ push @$completed, $tinfo;
+ }
+
mtr_print_line();
if ( $opt_gcov ) {
@@ -705,6 +725,9 @@ sub run_test_server ($$$) {
elsif ($line =~ /^SPENT/) {
add_total_times($line);
}
+ elsif ($line eq 'VALGREP' && $opt_valgrind) {
+ $valgrind_reports= 1;
+ }
else {
mtr_error("Unknown response: '$line' from client");
}
@@ -890,6 +913,7 @@ sub run_worker ($) {
my $valgrind_reports= 0;
if ($opt_valgrind_mysqld) {
$valgrind_reports= valgrind_exit_reports();
+ print $server "VALGREP\n" if $valgrind_reports;
}
if ( $opt_gprof ) {
gprof_collect (find_mysqld($basedir), keys %gprof_dirs);
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-mtr branch (bjorn.munch:3068 to 3069) | Bjorn Munch | 26 Apr |