public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] Cygwin: testsuite: Add a small delay in kill01
@ 2023-08-11 13:38 Jon Turney
  0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2023-08-11 13:38 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7374b46bfd5ca551febf7883f6fce22f27a18aa8

commit 7374b46bfd5ca551febf7883f6fce22f27a18aa8
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Aug 8 16:38:20 2023 +0100

    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.

Diff:
---
 winsup/testsuite/winsup.api/ltp/kill01.c | 1 +
 winsup/testsuite/winsup.api/ltp/kill03.c | 1 +
 winsup/testsuite/winsup.api/ltp/kill04.c | 1 +
 3 files changed, 3 insertions(+)

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));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-11 13:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11 13:38 [newlib-cygwin/main] Cygwin: testsuite: Add a small delay in kill01 Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).