From 0bf40b3e4c3181a0f576155baedb31696d4c6afb Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 12 Oct 2010 13:13:23 +0200 Subject: [PATCH] Bug #40406 Please make mtr print better messages when servers fail to start Added some more details to warning messages, this should be enough. --- mysql-test/lib/mtr_process.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index a42627c93cd..26a95fa13ab 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -116,18 +116,20 @@ sub sleep_until_file_created ($$$) { return 1; } + my $seconds= ($loop * $sleeptime) / 1000; + # Check if it died after the fork() was successful if ( defined $proc and ! $proc->wait_one(0) ) { - mtr_warning("Process $proc died"); + mtr_warning("Process $proc died after mysql-test-run waited $seconds " . + "seconds for $pidfile to be created."); return 0; } mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile"); # Print extra message every 60 seconds - my $seconds= ($loop * $sleeptime) / 1000; - if ( $seconds > 1 and int($seconds * 10) % 600 == 0 ) + if ( $seconds > 1 && int($seconds * 10) % 600 == 0 && $seconds < $timeout ) { my $left= $timeout - $seconds; mtr_warning("Waited $seconds seconds for $pidfile to be created, " . @@ -138,6 +140,8 @@ sub sleep_until_file_created ($$$) { } + mtr_warning("Timeout after mysql-test-run waited $timeout seconds " . + "for the process $proc to create a pid file."); return 0; }