From a66864d79e5b2e7d5fb25f95a34dcb82f121e30f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 14 Aug 2024 16:43:34 +0200 Subject: [PATCH] pthread-rwlock-extra-tests: Exclude this test from packages by default. * tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Add comment. * modules/pthread-rwlock-extra-tests (Status): Mark as longrunning-test. --- ChangeLog | 6 ++++++ modules/pthread-rwlock-extra-tests | 3 +++ tests/test-pthread-rwlock-waitqueue.c | 18 +++++++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8f147f4b2e..6e351bd70a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-08-14 Bruno Haible + + pthread-rwlock-extra-tests: Exclude this test from packages by default. + * tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Add comment. + * modules/pthread-rwlock-extra-tests (Status): Mark as longrunning-test. + 2024-08-14 Bruno Haible tests: Fix link errors (regression 2024-08-12). diff --git a/modules/pthread-rwlock-extra-tests b/modules/pthread-rwlock-extra-tests index c14e3ed8ac..2d93488dfd 100644 --- a/modules/pthread-rwlock-extra-tests +++ b/modules/pthread-rwlock-extra-tests @@ -1,3 +1,6 @@ +Status: +longrunning-test + Files: tests/test-pthread-rwlock-waitqueue.c tests/macros.h diff --git a/tests/test-pthread-rwlock-waitqueue.c b/tests/test-pthread-rwlock-waitqueue.c index ad190b5491..6b800ea5cc 100644 --- a/tests/test-pthread-rwlock-waitqueue.c +++ b/tests/test-pthread-rwlock-waitqueue.c @@ -48,7 +48,23 @@ flavours of read-write locks. */ /* Some platforms need a longer STEP_INTERVAL, otherwise some of the assertions - RRR, RRRR, RRRRR fail. */ + RRR, RRRR, RRRRR fail. + Note: The probability of failing these assertions is higher when the machine + is under high load. It can be worked around by increasing the STEP_INTERVAL. + However, increasing the STEP_INTERVAL means to increase the total duration + of this test: + STEP_INTERVAL Duration (on glibc/Linux) + 10 ms 29 sec + 20 ms 57 sec + 50 ms 2.4 min + 100 ms 4.8 min + 200 ms 9.6 min + There is no way to have this test be reasonably fast and 100% reliable at the + same time. Therefore the compromise we have chosen is + - to pick STEP_INTERVAL so that the test succeeds on developer machines + with little load and on continuous integration machines, + - to exclude the test from packaging, unless the gnulib-tool option + '--with-longrunning-tests' is specified. */ #if (defined __APPLE__ && defined __MACH__) /* macOS */ # define STEP_INTERVAL 200000000 /* nanoseconds */ -- 2.39.5