summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_io.pl
diff options
context:
space:
mode:
authorunknown <anozdrin/alik@booka.>2006-11-23 22:55:36 +0300
committerunknown <anozdrin/alik@booka.>2006-11-23 22:55:36 +0300
commitcf9038e97973f8bbe387887af9b9f489316b3629 (patch)
tree1775580df8fb114ac45309462afce6386932b307 /mysql-test/lib/mtr_io.pl
parent247428a1426a927e48843da378b75d6ad6d77f8a (diff)
downloadmariadb-git-cf9038e97973f8bbe387887af9b9f489316b3629.tar.gz
Fix for BUG##24415: Instance manager test im_daemon_life_cycle
fails randomly. The problem was that the test case used command line tool (mysql) without specifying connect_timeout argument. In some cases, this lead to hanging of the test case. The fix is to specify --connect_timeout=1 when starting mysql. Also, the patch contains polishing and various cleanups to simplify analyzing of the problems further. The patch affects only test suite, no server codebase has been touched. mysql-test/lib/mtr_im.pl: Remember PID of the IM-spawner -- a process, that is used to fork IM-angel. mysql-test/lib/mtr_io.pl: Trim \n from the PID. mysql-test/lib/mtr_process.pl: Don't complain if it was IM-spawner, who died. mysql-test/r/im_daemon_life_cycle.result: Update the result file. mysql-test/r/im_life_cycle.result: Update the result file. mysql-test/t/im_daemon_life_cycle.imtest: Polishing: add more comments, be more verbose. mysql-test/t/im_life_cycle.imtest: Polishing: be more verbose. mysql-test/t/im_utils.imtest: Polishing: be more verbose. mysql-test/t/kill_n_check.sh: Log messages to the extrenal file so that they can be analyzed if test case failed. mysql-test/t/wait_for_process.sh: Log messages to the extrenal file so that they can be analyzed if test case failed. mysql-test/t/wait_for_socket.sh: Log messages to the extrenal file so that they can be analyzed if test case failed. mysql-test/t/log.sh: Dummy script to facilitate logging from test-scripts. mysql-test/t/utils.sh: A bunch of auxilary functions to facilitate logging.
Diffstat (limited to 'mysql-test/lib/mtr_io.pl')
-rw-r--r--mysql-test/lib/mtr_io.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/mysql-test/lib/mtr_io.pl b/mysql-test/lib/mtr_io.pl
index 984d834486c..5be1d2ffddb 100644
--- a/mysql-test/lib/mtr_io.pl
+++ b/mysql-test/lib/mtr_io.pl
@@ -39,6 +39,7 @@ sub mtr_get_pid_from_file ($) {
# Read pid number from file
my $pid= <FILE>;
+ chomp $pid;
close FILE;
return $pid if $pid=~ /^(\d+)/;