From de855cbe8aa8b5a97b2b7a47d57a8365c33d154c Mon Sep 17 00:00:00 2001 From: Michael Brantley Date: Tue, 4 Feb 2025 07:39:19 -0600 Subject: [PATCH 1/2] fix: increase sleep in midline-flush.c Increasing sleep tenfold to really minimize the chances of test races at build time. --- tests/midline-flush.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/midline-flush.c b/tests/midline-flush.c index 94608ec..b02ed37 100644 --- a/tests/midline-flush.c +++ b/tests/midline-flush.c @@ -16,9 +16,9 @@ int main() { fflush(stdout); fflush(stderr); goodbye(stderr); - usleep(3); // It only takes a millisecond to give stderr a head start - // but we'll give it three to avoid false positives where - // the first line is written to stdout. + usleep(30); // It only takes a millisecond to give stderr a head start + // but we'll give it thirty to avoid false positives where + // the first line is written to stdout. goodbye(stdout); fflush(stderr); fflush(stdout); From cfeddd2181f1f328d4847bf97ffeb288c0ec898e Mon Sep 17 00:00:00 2001 From: Michael Brantley Date: Tue, 4 Feb 2025 07:56:00 -0600 Subject: [PATCH 2/2] Update tests/midline-flush.c Co-authored-by: Yannik Sander <7040031+ysndr@users.noreply.github.com> --- tests/midline-flush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/midline-flush.c b/tests/midline-flush.c index b02ed37..b2e2fe9 100644 --- a/tests/midline-flush.c +++ b/tests/midline-flush.c @@ -18,7 +18,7 @@ int main() { goodbye(stderr); usleep(30); // It only takes a millisecond to give stderr a head start // but we'll give it thirty to avoid false positives where - // the first line is written to stdout. + // the first line is written to stdout. goodbye(stdout); fflush(stderr); fflush(stdout);