diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-12-14 10:59:11 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-12-14 10:59:11 +0100 |
commit | 818af42f1de640f3951fcfde0cb9b7b76d06a01e (patch) | |
tree | 01ce0cff9b245923397fe70e5f02ccbdb309ccb7 /mysql-test | |
parent | db8f698c8a03bcc920b9453f8822fbbd8ec7ea66 (diff) | |
download | mariadb-git-818af42f1de640f3951fcfde0cb9b7b76d06a01e.tar.gz |
new valgrind suppression for ld.so
give mysqld more time to start under valgrind
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/lib/mtr_process.pl | 9 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 22 | ||||
-rw-r--r-- | mysql-test/valgrind.supp | 6 |
3 files changed, 22 insertions, 15 deletions
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 88e714f6f8d..cebb895da6e 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -40,7 +40,7 @@ BEGIN eval 'sub USE_NETPING { $use_netping }'; } -sub sleep_until_file_created ($$$); +sub sleep_until_file_created ($$$$); sub mtr_ping_port ($); sub mtr_ping_port ($) { @@ -102,10 +102,11 @@ sub mtr_ping_port ($) { # FIXME check that the pidfile contains the expected pid! -sub sleep_until_file_created ($$$) { +sub sleep_until_file_created ($$$$) { my $pidfile= shift; my $timeout= shift; my $proc= shift; + my $warn_seconds = shift; my $sleeptime= 100; # Milliseconds my $loops= ($timeout * 1000) / $sleeptime; @@ -128,8 +129,8 @@ sub sleep_until_file_created ($$$) { mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile"); - # Print extra message every 60 seconds - if ( $seconds > 1 && int($seconds * 10) % 600 == 0 && $seconds < $timeout ) + # Print extra message every $warn_seconds seconds + if ( $seconds > 1 && $seconds % $warn_seconds == 0 && $seconds < $timeout ) { my $left= $timeout - $seconds; mtr_warning("Waited $seconds seconds for $pidfile to be created, " . diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index e3f5cb65507..a8a2a515196 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -311,6 +311,7 @@ my $valgrind_reports= 0; my $opt_callgrind; my %mysqld_logs; my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions. +my $warn_seconds = 60; sub testcase_timeout ($) { my ($tinfo)= @_; @@ -1737,12 +1738,6 @@ sub command_line_setup { $opt_valgrind= 1; $opt_valgrind_mysqld= 1; $opt_valgrind_mysqltest= 1; - - # Increase the timeouts when running with valgrind - $opt_testcase_timeout*= 10; - $opt_suite_timeout*= 6; - $opt_start_timeout*= 10; - } elsif ( $opt_valgrind_mysqld ) { @@ -1755,6 +1750,15 @@ sub command_line_setup { $opt_valgrind= 1; } + if ($opt_valgrind) + { + # Increase the timeouts when running with valgrind + $opt_testcase_timeout*= 10; + $opt_suite_timeout*= 6; + $opt_start_timeout*= 10; + $warn_seconds*= 10; + } + if ( $opt_callgrind ) { mtr_report("Turning on valgrind with callgrind for mysqld(s)"); @@ -3229,7 +3233,8 @@ sub mysql_server_wait { return not sleep_until_file_created($mysqld->value('pid-file'), $opt_start_timeout, - $mysqld->{'proc'}); + $mysqld->{'proc'}, + $warn_seconds); } sub create_config_file_for_extern { @@ -5472,7 +5477,8 @@ sub mysqld_start ($$) { if ( $wait_for_pid_file && !sleep_until_file_created($mysqld->value('pid-file'), $opt_start_timeout, - $mysqld->{'proc'})) + $mysqld->{'proc'}, + $warn_seconds)) { my $mname= $mysqld->name(); mtr_error("Failed to start mysqld $mname with command $exe"); diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index 5174b04c054..d505cd80261 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -150,12 +150,12 @@ } { - strlen/_dl_init_paths/dl_main/_dl_sysdep_start(Cond) + somewhere in ld.so, when loading mysqld Memcheck:Cond - fun:strlen - fun:_dl_init_paths + ... fun:dl_main fun:_dl_sysdep_start + fun:_dl_start } { |