guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#67722] [PATCH v3] gnu: libtorrent-rasterbar: Work around hang in te


From: Tomas Volf
Subject: [bug#67722] [PATCH v3] gnu: libtorrent-rasterbar: Work around hang in test_ssl.
Date: Wed, 13 Dec 2023 17:38:57 +0100

test_ssl does sometimes hang (at least when executed under faketime).  It is
somewhat unlikely to happen, and (on my machine) required a build with
--rounds=32 to reproduce it.

The workaround is to set somewhat lower timeout of 240s (expected test
duration * 5 rounded up to whole minutes) and retry few times on failure.  In
this way, --rounds=64 finished successfully (on my machine).

At the same time remove the timeout from the other tests, since it is not
necessary (they do not hang), and one of them runs for ~270s (almost half the
original timeout), so it could posse a problem on slow/overloaded machine.

* gnu/packages/bittorrent.scm
(libtorrent-rasterbar)[arguments]<#:phases>['check]: Remote test timeout for
most tests.  Lower the timeout for test_ssl.  Retry test_ssl on failure.

Change-Id: I535c72fec24658a4b2151d2e8794319055c9a278
---
 gnu/packages/bittorrent.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 731c8e1c20..4585c3b088 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -470,7 +470,6 @@ (define-public libtorrent-rasterbar
                     (exclude-regex (string-append "^("
                                                   (string-join disabled-tests 
"|")
                                                   ")$"))
-                    (timeout "600")
                     (jobs (if parallel-tests?
                               (number->string (parallel-job-count))
                               "1")))
@@ -478,7 +477,6 @@ (define-public libtorrent-rasterbar
                  (invoke "ctest"
                          "-E" exclude-regex
                          "-j" jobs
-                         "--timeout" timeout
                          "--output-on-failure")
                  ;; test_ssl relies on bundled TLS certificates with a fixed
                  ;; expiry date.  To ensure succesful builds in the future,
@@ -492,7 +490,11 @@ (define-public libtorrent-rasterbar
                          "ctest"
                          "-R" "^test_ssl$"
                          "-j" jobs
-                         "--timeout" timeout
+                         ;; test_ssl sometimes hangs (at least when run under
+                         ;; faketime), therefore set a time limit and retry
+                         ;; few times on failure.
+                         "--timeout" "240"
+                         "--repeat" "until-pass:5"
                          "--output-on-failure"))))))))
     (inputs (list boost openssl))
     (native-inputs `(("libfaketime" ,libfaketime)

base-commit: 1b2505217cf222d98cc960b8510660976a01cfa1
-- 
2.41.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]