]> Savannah Git Hosting - gnulib.git/commitdiff
pthread-rwlock: Attempt harder to avoid test failure on macOS.
authorBruno Haible <bruno@clisp.org>
Mon, 12 Aug 2024 11:15:42 +0000 (13:15 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Aug 2024 11:15:42 +0000 (13:15 +0200)
* tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the
minimum interval to 50 ms on macOS.

ChangeLog
tests/test-pthread-rwlock-waitqueue.c

index 7533e2f5b75b16a7dd80ec1b278134f511874b80..035f5d115139fc0cda263df55153a0e515a75a8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-08-12  Bruno Haible  <bruno@clisp.org>
+
+       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.
+
 2024-08-12  Bruno Haible  <bruno@clisp.org>
 
        pthread-rwlock tests: Move the waitqueue test into a separate module.
index bfe5770463d9eddf856e2424ea80ad5d943cb9a6..3267ebe920c98085e6ed86da69c86c104080f6f4 100644 (file)
 
 /* Some platforms need a longer STEP_INTERVAL, otherwise some of the assertions
    RRR, RRRR, RRRRR fail.  */
-#if defined _WIN32 || defined __CYGWIN__
-/* Windows */
+#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__
+/* macOS, Windows */
 # define STEP_INTERVAL 50000000 /* nanoseconds */
-#elif (defined __APPLE__ && defined __MACH__) || (defined __FreeBSD__ || defined __DragonFly__) || (defined __linux__ && defined __hppa)
-/* macOS, FreeBSD, Linux/hppa */
+#elif (defined __FreeBSD__ || defined __DragonFly__) || (defined __linux__ && defined __hppa)
+/* FreeBSD, Linux/hppa */
 # define STEP_INTERVAL 20000000 /* nanoseconds */
 #else
 # define STEP_INTERVAL 10000000 /* nanoseconds */