diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2023-08-08 18:38:20 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2023-08-11 16:38:23 +0300 |
commit | 7374b46bfd5ca551febf7883f6fce22f27a18aa8 (patch) | |
tree | 7e5d6bfd29f7311726e04f9cec01ea3ee1e535ac /winsup/testsuite | |
parent | 3550d74823bfc17ca5a1a687350821421b0d74e1 (diff) |
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.
Diffstat (limited to 'winsup/testsuite')
-rw-r--r-- | winsup/testsuite/winsup.api/ltp/kill01.c | 1 | ||||
-rw-r--r-- | winsup/testsuite/winsup.api/ltp/kill03.c | 1 | ||||
-rw-r--r-- | winsup/testsuite/winsup.api/ltp/kill04.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/winsup/testsuite/winsup.api/ltp/kill01.c b/winsup/testsuite/winsup.api/ltp/kill01.c index 042899173..5f0a32ba9 100644 --- a/winsup/testsuite/winsup.api/ltp/kill01.c +++ b/winsup/testsuite/winsup.api/ltp/kill01.c @@ -102,6 +102,7 @@ main(int ac, char **av) /*NOTREACHED*/ exit(exno); } else { + usleep(1000); TEST(kill(pid, TEST_SIG)); waitpid(pid, &status, 0); } diff --git a/winsup/testsuite/winsup.api/ltp/kill03.c b/winsup/testsuite/winsup.api/ltp/kill03.c index 1de727fd7..eb75fdb38 100644 --- a/winsup/testsuite/winsup.api/ltp/kill03.c +++ b/winsup/testsuite/winsup.api/ltp/kill03.c @@ -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); diff --git a/winsup/testsuite/winsup.api/ltp/kill04.c b/winsup/testsuite/winsup.api/ltp/kill04.c index a7b3274c3..c3314f35d 100644 --- a/winsup/testsuite/winsup.api/ltp/kill04.c +++ b/winsup/testsuite/winsup.api/ltp/kill04.c @@ -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)); |