diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-07-06 11:36:59 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-07-06 16:12:13 +0200 |
commit | 621fae3cbc79eb4d0277c40993328faa4019e95f (patch) | |
tree | f1ea21181c94232ce14d2dd1e017fc04ec0447c4 /mysql-test/lib/mtr_process.pl | |
parent | 1223cfe1d3d72598e788582701989f9bb35695fb (diff) | |
download | mariadb-git-621fae3cbc79eb4d0277c40993328faa4019e95f.tar.gz |
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`)
Diffstat (limited to 'mysql-test/lib/mtr_process.pl')
-rw-r--r-- | mysql-test/lib/mtr_process.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index c568f8dc48c..2ff78c0e10a 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -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 " . |