mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-25802 mtr: race condition if the test quickly restarts twice
part II need to tell SafeProcess not to collect the exited mysqld in sleep_until_file_created(), so that it would be found in the later wait_any_timeout() in run_testcase() Removed a strange condition in SafeProcess::wait_one() that treated return value of -1 from waitpid() as "process exists" instead of as "no such child process" (see `perldoc -f waitpid`)
This commit is contained in:
@ -121,7 +121,7 @@ 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 " .
|
||||
|
Reference in New Issue
Block a user