From 9c0bf6938c742e05a0bf3ff39f8bc705cbd2c681 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sun, 1 Nov 2026 10:10:01 +0100 Subject: [PATCH] test(sub): leave the decode-once allocation bound room for the race detector TestSubscriptionDecodesInboundSettingsOncePerRequest capped a request at 128 MiB, which the race job exceeds on correct code (up to 170 MiB) because the detector inflates allocations. One decode per link costs 489 to 750 MiB without it, so a 256 MiB bound still tells the two apart. --- internal/sub/host_sub_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/sub/host_sub_test.go b/internal/sub/host_sub_test.go index 5bf9cbb24..3f8b75a4d 100644 --- a/internal/sub/host_sub_test.go +++ b/internal/sub/host_sub_test.go @@ -2118,7 +2118,8 @@ func seedSharedSubIdInbound(t *testing.T, protocol model.Protocol, subId string, func TestSubscriptionDecodesInboundSettingsOncePerRequest(t *testing.T) { const n = 1000 const subId = "shared-sub-id" - const maxAllocated = 128 << 20 + // The race detector roughly doubles allocations; one decode per link costs several times this. + const maxAllocated = 256 << 20 serverPriv, serverPub := mustWireguardKeypair(t) clientPriv, _ := mustWireguardKeypair(t)