summaryrefslogtreecommitdiff
path: root/tests/publish.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2025-03-03 19:52:04 +0000
committerChristopher Baines <mail@cbaines.net>2025-03-03 20:14:56 +0000
commit5058b40aba825ab6e7b9e518dd1147d1e35fd7de (patch)
treeda4cf023555bac7554d5ad710c2df918dca88517 /tests/publish.scm
parentb55e3b1a4bcb8c098eac7ea958a642e1d1d6511b (diff)
tests: publish: Constrain guix-publish thread use.
On systems with more than 64 processors. Otherwise starting so many threads during the test will trip resource limits and lead to a spurious failure with SIGABRT. I'm seeing this on a 128 core system running Guix, and limiting to just 64 processors seems sufficient. * tests/publish.scm: Call setaffinity when the current processor count exceeds 64. Change-Id: Id4c6d7dcc9ae8dd8dafa2587def98f538061425c
Diffstat (limited to 'tests/publish.scm')
-rw-r--r--tests/publish.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/publish.scm b/tests/publish.scm
index d5ec3c954fa..3c80c50d515 100644
--- a/tests/publish.scm
+++ b/tests/publish.scm
@@ -96,6 +96,20 @@
96 (lambda () 96 (lambda ()
97 exp ...))))) 97 exp ...)))))
98 98
99;; guix-publish uses (current-processor-count) as the default number of
100;; workers, however on a system with a large number of cores, that large
101;; number of worker threads being used in the course of these tests can end up
102;; hitting resource limits and causing spurious test failures.
103;;
104;; This will depend on what resource limits are in use, but 64 seems low
105;; enough to be able to run the tests without problems.
106(let ((max-processors 64))
107 (when (> (current-processor-count)
108 max-processors)
109 (setaffinity
110 (getpid)
111 (make-bitvector max-processors #t))))
112
99;; Run a local publishing server in a separate thread. 113;; Run a local publishing server in a separate thread.
100(with-separate-output-ports 114(with-separate-output-ports
101 (call-with-new-thread 115 (call-with-new-thread