summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_process.pl
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-08-02 10:11:41 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2021-08-02 10:11:41 +0200
commit6efb5e9f5e3cd3ec811ae832a67e1878c14f0dea (patch)
treeb7c1a18b8bbc638ee12951d1d04db6d21bebcaed /mysql-test/lib/mtr_process.pl
parent07674e6a741a82d2e30f9798f699209a6c34dfef (diff)
parentec8882b9ddbba2f9fc3571a1ac2ade0dabf412d9 (diff)
downloadmariadb-git-6efb5e9f5e3cd3ec811ae832a67e1878c14f0dea.tar.gz
Merge branch '10.5' into 10.6
Diffstat (limited to 'mysql-test/lib/mtr_process.pl')
-rw-r--r--mysql-test/lib/mtr_process.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index 4c64a546f65..a384aa584c4 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,8 +102,9 @@ 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 $expectfile = shift;
my $timeout= shift;
my $proc= shift;
my $warn_seconds = shift;
@@ -121,8 +122,9 @@ sub sleep_until_file_created ($$$$) {
my $seconds= ($loop * $sleeptime) / 1000;
# Check if it died after the fork() was successful
- if ( defined $proc and ! $proc->wait_one(0) )
+ if ( defined $proc and ! $proc->wait_one(0, 1) )
{
+ return 1 if -r $expectfile;
mtr_warning("Process $proc died after mysql-test-run waited $seconds " .
"seconds for $pidfile to be created.");
return 0;