From 8e4b0ab719788bfcbc76f635bb50fa307aa8b7f4 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 7 Aug 2025 16:03:14 +0200 Subject: [PATCH] valkey: set upper limit for parallelism in test-suite On machines with many build cores, the tests either fail repeatedly or don't even manage to start because all ports are blocked. For instance, on a heavy machine with >350 threads, valkey was busy trying to find ports for its tests for several hours: [...] Port 23380 was already busy, trying another port... Port 23381 was already busy, trying another port... Port 23382 was already busy, trying another port... Port 23383 was already busy, trying another port... Port 23384 was already busy, trying another port... Port 23385 was already busy, trying another port... Port 23386 was already busy, trying another port... Port 23387 was already busy, trying another port... Port 23388 was already busy, trying another port... Port 23389 was already busy, trying another port... Port 23390 was already busy, trying another port... It should be noted that the tests seem to repeatedly use the same, smallish range given it always tried to allocate ports in the range of 233xx. --- pkgs/by-name/va/valkey/package.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/va/valkey/package.nix b/pkgs/by-name/va/valkey/package.nix index 1fc0b641f97f..1f34c513541b 100644 --- a/pkgs/by-name/va/valkey/package.nix +++ b/pkgs/by-name/va/valkey/package.nix @@ -97,12 +97,17 @@ stdenv.mkDerivation (finalAttrs: { sed -i '/^proc wait_load_handlers_disconnected/{n ; s/wait_for_condition 50 100/wait_for_condition 50 500/; }' \ tests/support/util.tcl + CLIENTS="$NIX_BUILD_CORES" + if (( $CLIENTS > 4)); then + CLIENTS=4 + fi + # Skip some more flaky tests. # Skip test requiring custom jemalloc (unit/memefficiency). ./runtest \ --no-latency \ --timeout 2000 \ - --clients $NIX_BUILD_CORES \ + --clients "$CLIENTS" \ --tags -leaks \ --skipunit unit/memefficiency \ --skipunit integration/failover \