mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Make "./mtr --start" exit if any child process dies
This commit is contained in:
@ -2312,9 +2312,16 @@ sub run_testcase ($) {
|
|||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
if ( $opt_start or $opt_start_dirty )
|
if ( $opt_start or $opt_start_dirty )
|
||||||
{
|
{
|
||||||
mtr_report("\nServers started, sleeping");
|
$suite_timeout_proc->kill();
|
||||||
sleep(1) while (1);
|
mtr_report("\nServers started, waiting for any of them to die...");
|
||||||
exit(0);
|
my $proc= My::SafeProcess->wait_any();
|
||||||
|
if ( grep($proc eq $_, started(all_servers())) )
|
||||||
|
{
|
||||||
|
mtr_report("Server $proc died");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
mtr_report("Unknown process $proc died");
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $test_timeout_proc= My::SafeProcess->timer($opt_testcase_timeout * 60);
|
my $test_timeout_proc= My::SafeProcess->timer($opt_testcase_timeout * 60);
|
||||||
|
Reference in New Issue
Block a user