From e85cc5950356c87917e22e2fa5abc4473858e0e4 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 12 Aug 2024 14:18:02 +0200 Subject: [PATCH] pthread-rwlock: Attempt harder to avoid test failure on macOS. * tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the minimum interval to 100 ms on macOS. --- ChangeLog | 4 ++++ tests/test-pthread-rwlock-waitqueue.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 035f5d1151..c14cbaf1a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2024-08-12 Bruno Haible + pthread-rwlock: Attempt harder to avoid test failure on macOS. + * tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the + minimum interval to 100 ms on macOS. + pthread-rwlock: Attempt harder to avoid test failure on macOS. * tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the minimum interval to 50 ms on macOS. diff --git a/tests/test-pthread-rwlock-waitqueue.c b/tests/test-pthread-rwlock-waitqueue.c index 3267ebe920..7a1a2cde62 100644 --- a/tests/test-pthread-rwlock-waitqueue.c +++ b/tests/test-pthread-rwlock-waitqueue.c @@ -49,8 +49,11 @@ /* Some platforms need a longer STEP_INTERVAL, otherwise some of the assertions RRR, RRRR, RRRRR fail. */ -#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__ -/* macOS, Windows */ +#if (defined __APPLE__ && defined __MACH__) +/* macOS */ +# define STEP_INTERVAL 100000000 /* nanoseconds */ +#elif defined _WIN32 || defined __CYGWIN__ +/* Windows */ # define STEP_INTERVAL 50000000 /* nanoseconds */ #elif (defined __FreeBSD__ || defined __DragonFly__) || (defined __linux__ && defined __hppa) /* FreeBSD, Linux/hppa */ -- 2.39.5