From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 6DDA11F62B for ; Fri, 24 Feb 2023 18:48:13 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=shopify.com header.i=@shopify.com header.a=rsa-sha256 header.s=google header.b=LdZ4RU5H; dkim-atps=neutral Received: by mail-il1-x132.google.com with SMTP id e10so281101ilu.4 for ; Fri, 24 Feb 2023 10:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopify.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fprdbpOcR7y7MAd9lq5zLp7IFxK7F07u8Pbn9eb0Vmk=; b=LdZ4RU5HKtuGrAJqqJ/nfO9fjs7JdDRl+HznE3iRiP4SqNnt378Q1AWyfYVa3AyyKd lVWGuYMjz9fqC4FDJ5RKIv/F3DeVbJW7fhod7C/+Skz/GiEVEzp9G8ypKliDHcq7PGhm lfI2b6uYAePIzQ4PUjDjoESHOuHLMyX0+5o9Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fprdbpOcR7y7MAd9lq5zLp7IFxK7F07u8Pbn9eb0Vmk=; b=tAiepMJw3L9bMEmxubReSSywlh+JkTwwEqgE7adc14Z4TJmK86S9koTkMdhIXVy8u7 ybNcS140bo2w3jHth3Pz8sz7PqNC9NaNz9lLA5Dp8gyokj0xg4/3SNPSCNrAaO1EKAgs +rs06z+djlbTIyH9yGOe3RYTReyAgs2yxL8NgwxEjoTx3gu8RjzjVjSY73XaoQZhxhJe cRzYUV9Wo/ufar8aUxA2AUB4sdn2UkyN6n9pmazqVqnFiG8p/IwH1ao5/5hAlDqcXOLO HSOSZxzhFZXEsJxmmquPT8v1l7pXhRFGU6NzTkWFkb3CxJzlc3nXrrcVuHKVw/wo3ffp chcA== X-Gm-Message-State: AO0yUKXQ48jLbbkw2TnMjyjRpjILEYPpEyK9HtrIHvRSUmx3YyGakj/P WBOe6XYUucIKSXn54sOqIjdC6dCWP0mQaqIf X-Google-Smtp-Source: AK7set8QsXhL3GTbuvMKSHnujH3eSHhBUjEtsbyLIOF0m/U0BQ5v7W0/qi+9vlof5wlFmpjyhQT1Ng== X-Received: by 2002:a92:7602:0:b0:315:8e29:a0ad with SMTP id r2-20020a927602000000b003158e29a0admr14124986ilc.11.1677264492331; Fri, 24 Feb 2023 10:48:12 -0800 (PST) Received: from MacBook-Pro.localdomain (198-84-220-18.cpe.teksavvy.com. [198.84.220.18]) by smtp.gmail.com with ESMTPSA id p5-20020a02b385000000b00346a98b0a76sm2832516jan.77.2023.02.24.10.48.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 24 Feb 2023 10:48:11 -0800 (PST) From: Dale Hamel To: dale.hamel@shopify.com Cc: raindrops-public@yhbt.net Subject: [PATCH] Fix off by one error in test Date: Fri, 24 Feb 2023 13:47:40 -0500 Message-Id: <20230224184740.52419-1-dale.hamel@shopify.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230224183544.51837-1-dale.hamel@shopify.com> References: <20230224183544.51837-1-dale.hamel@shopify.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: It doesn't affect the test outcome, but it is not the intended behaviour of the test. We listen once to find out what port to use, then should bind with SO_REUSEPORT N-1 times, but we are doing it N times, so we have one extra listener. --- test/test_linux_reuseport_tcp_listen_stats.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_linux_reuseport_tcp_listen_stats.rb b/test/test_linux_reuseport_tcp_listen_stats.rb index c977c43..73995ea 100644 --- a/test/test_linux_reuseport_tcp_listen_stats.rb +++ b/test/test_linux_reuseport_tcp_listen_stats.rb @@ -36,7 +36,7 @@ def test_reuseport_queue_stats listeners = 10 _, port = new_socket_server(reuseport: true) addr = "#{TEST_ADDR}:#{port}" - listeners.times do + (listeners - 1).times do new_socket_server(reuseport: true, port: port) end -- 2.39.2