From b12e697b20b134ff7ca5cc268f7a54e0faffc62f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 9 Aug 2024 11:59:10 +0200 Subject: [PATCH] pthread-rwlock: Attempt to avoid test failure on some machines. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by Pádraig Brady in . * tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the minimum interval to 10 ms. * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Likewise. --- ChangeLog | 9 +++++++++ m4/pthread-rwlock.m4 | 6 ++---- tests/test-pthread-rwlock-waitqueue.c | 5 +---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38802e887d..c31e68d8ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024-08-09 Bruno Haible + + pthread-rwlock: Attempt to avoid test failure on some machines. + Reported by Pádraig Brady in + . + * tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the + minimum interval to 10 ms. + * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Likewise. + 2024-08-08 Bruno Haible doc: Update for other functions added in POSIX:2024. diff --git a/m4/pthread-rwlock.m4 b/m4/pthread-rwlock.m4 index cbd08790e1..0e203606a1 100644 --- a/m4/pthread-rwlock.m4 +++ b/m4/pthread-rwlock.m4 @@ -1,5 +1,5 @@ # pthread-rwlock.m4 -# serial 6 +# serial 7 dnl Copyright (C) 2019-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -127,10 +127,8 @@ AC_DEFUN([gl_PTHREAD_RWLOCK], #if defined __hppa # define STEP_INTERVAL 20000000 /* nanoseconds */ -#elif defined __aarch64__ || defined __m68k__ -# define STEP_INTERVAL 10000000 /* nanoseconds */ #else -# define STEP_INTERVAL 5000000 /* nanoseconds */ +# define STEP_INTERVAL 10000000 /* nanoseconds */ #endif static pthread_rwlock_t lock; diff --git a/tests/test-pthread-rwlock-waitqueue.c b/tests/test-pthread-rwlock-waitqueue.c index 9dc4a4e808..b7df033c90 100644 --- a/tests/test-pthread-rwlock-waitqueue.c +++ b/tests/test-pthread-rwlock-waitqueue.c @@ -55,11 +55,8 @@ #elif (defined __FreeBSD__ || defined __DragonFly__) || (defined __linux__ && defined __hppa) /* FreeBSD, Linux/hppa */ # define STEP_INTERVAL 20000000 /* nanoseconds */ -#elif defined __GNU__ || defined __sun || (defined __linux__ && (defined __aarch64__ || defined __m68k__)) -/* GNU/Hurd, Solaris, Linux/arm64, Linux/m68k */ -# define STEP_INTERVAL 10000000 /* nanoseconds */ #else -# define STEP_INTERVAL 5000000 /* nanoseconds */ +# define STEP_INTERVAL 10000000 /* nanoseconds */ #endif static pthread_rwlock_t lock; -- 2.39.5