diff options
author | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-01-21 10:34:01 +0100 |
---|---|---|
committer | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-01-21 10:34:01 +0100 |
commit | 089663f9a7effab6198213e48daaea725c6d4267 (patch) | |
tree | 98b80136eed7bb0c08cef16d99fe85af24671dbc /mysql-test/lib/My/SafeProcess.pm | |
parent | bb42e1ab05f9ebe166524d7d8a25c55a69e65dfa (diff) | |
download | mariadb-git-089663f9a7effab6198213e48daaea725c6d4267.tar.gz |
Bug #40399 Please make mtr print stack trace after every failure
SIGABRT is sent to relevant processes after a timeout
client/mysqltest.cc:
Fixed signal handlers to mysqltest actually dumps core
mysql-test/lib/My/CoreDump.pm:
Added support for dbx
mysql-test/lib/My/SafeProcess.pm:
Added dump_core to force process to dump core
mysql-test/lib/My/SafeProcess/safe_process.cc:
Traps SIGABRT and sends this on to child
mysql-test/mysql-test-run.pl:
When test times out, force core dumps on mysqltest and servers
Diffstat (limited to 'mysql-test/lib/My/SafeProcess.pm')
-rw-r--r-- | mysql-test/lib/My/SafeProcess.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm index cb68b323d5e..0e3aa968052 100644 --- a/mysql-test/lib/My/SafeProcess.pm +++ b/mysql-test/lib/My/SafeProcess.pm @@ -349,13 +349,24 @@ sub start_kill { { $pid= $self->{SAFE_PID}; die "Can't kill not started process" unless defined $pid; - $ret= kill(15, $pid); + $ret= kill("TERM", $pid); } return $ret; } +sub dump_core { + my ($self)= @_; + return if IS_WINDOWS; + my $pid= $self->{SAFE_PID}; + die "Can't cet core from not started process" unless defined $pid; + _verbose("Sending ABRT to $self"); + kill ("ABRT", $pid); + return 1; +} + + # # Kill the process as fast as possible # and wait for it to return |