4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-18 23:12:15 +08:00

Cygwin: testsuite: Add a small delay in kill01

Avoid transient failures by adding a small delay after fork()-ing to
allow the child to get into a state where it can recieve signals.

Also add same small delay to kill03 and kill04. kill02 has a more
elaborate setup where child processes write to a pipe to indicate they
have started.
This commit is contained in:
Jon Turney 2023-08-08 16:38:20 +01:00
parent 3550d74823
commit 7374b46bfd
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
3 changed files with 3 additions and 0 deletions

View File

@ -102,6 +102,7 @@ main(int ac, char **av)
/*NOTREACHED*/
exit(exno);
} else {
usleep(1000);
TEST(kill(pid, TEST_SIG));
waitpid(pid, &status, 0);
}

View File

@ -106,6 +106,7 @@ main(int ac, char **av)
/*NOTREACHED*/
exit(exno);
} else {
usleep(1000);
TEST(kill(pid, TEST_SIG));
kill(pid, SIGKILL);
waitpid(pid, &status, 0);

View File

@ -114,6 +114,7 @@ main(int ac, char **av)
/*NOTREACHED*/
exit(exno);
}
usleep(1000);
kill(fake_pid, TEST_SIG);
waitpid(fake_pid, &fake_status, 0);
TEST(kill(fake_pid, TEST_SIG));