]> Savannah Git Hosting - gnulib.git/commitdiff
pthread-rwlock-extra-tests: Exclude this test from packages by default.
authorBruno Haible <bruno@clisp.org>
Wed, 14 Aug 2024 14:43:34 +0000 (16:43 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 14 Aug 2024 14:43:34 +0000 (16:43 +0200)
* tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Add comment.
* modules/pthread-rwlock-extra-tests (Status): Mark as longrunning-test.

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

index 8f147f4b2e8590f91f1eb7b58242a90434352a81..6e351bd70ab7a0eebc4b61273e8ec9a8008b6433 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-08-14  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        tests: Fix link errors (regression 2024-08-12).
index c14e3ed8acde7c6230bb107595cc85611f2ea9dd..2d93488dfddcee5b7f29de592bb4a6b4ebf3eca0 100644 (file)
@@ -1,3 +1,6 @@
+Status:
+longrunning-test
+
 Files:
 tests/test-pthread-rwlock-waitqueue.c
 tests/macros.h
index ad190b5491f960ac20a902901d69e499e0bfdca4..6b800ea5cc287ea2ff2d99b5c768648eeb4dc6a6 100644 (file)
    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 */