From patchwork Wed Jan 24 21:41:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ahern X-Patchwork-Id: 13529731 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09EF61353E4 for ; Wed, 24 Jan 2024 21:41:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706132494; cv=none; b=AucO85V9cE2MboNUIrWUCLDFsy9JNOzeh7Wl0T4uddqqYAGHOWTjiBds/tareYnaJd86iX3ngpp+rB4+hf0rOOJqV16mLxUt2uFU2fUocDDh6xeWfQ1hJmGazsLU/5aojigI1Xr0rWYd6UcM5gm8v5gdT4o/6xCDPFViib2O6qk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706132494; c=relaxed/simple; bh=+Esq6AUWHOcGoUPb1Baq0b2HH8sfJUH2AjM6ICNdR4g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Wk4/83RPqY6EcZSeAu2PwvU6rdSFWPPoP/HD46lb80exA16ecq3YFrDCnOhLuMSdQBEm1DL4n4erCISX3aOOxuLM5eg5h3pwDaS425QPhQOS8xQ6H6IVNGnp+VZcTkt2MlHMP2MLtYR2cWkmJZGfnP9EjiM0tH6OnlxUAqOw7xI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PFShbPuE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PFShbPuE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D652C433C7; Wed, 24 Jan 2024 21:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706132493; bh=+Esq6AUWHOcGoUPb1Baq0b2HH8sfJUH2AjM6ICNdR4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PFShbPuEAXnzqAFHImmIN2DEO3hD5o2iuk586DX0JH0fMXD/k0RBVtjEMRJatp2Zv 33arzOU7snNBBQlruhKMq1g9u5dVu0+nbzXPffm0842JJm1w6DAU8L/c9q4HWLnfyl fWrq5mJEtPCLn98y9hUyJzmeBqsWM36PnIFpSi2ubEaMzvRv3nnPvmarOOLEuoIjTT otuy67AJI+/ZG984Vlc+YRqrqGF8VfGCWDUzh3zG6rpfEAQsb0VeSOeyBO6tx+LGRn zdILxppw8eXRJUrL5yfkxCpLZx0DlDPjVuiGyOn63C2T1ny7Ijk3r1Z4sayqISDnok LN7qpm2UjDG0g== From: David Ahern To: netdev@vger.kernel.org Cc: kuba@kernel.org, David Ahern Subject: [PATCH net-next 1/3] selftest: Update PATH for nettest in fcnal-test Date: Wed, 24 Jan 2024 14:41:15 -0700 Message-Id: <20240124214117.24687-2-dsahern@kernel.org> X-Mailer: git-send-email 2.39.3 (Apple Git-145) In-Reply-To: <20240124214117.24687-1-dsahern@kernel.org> References: <20240124214117.24687-1-dsahern@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Allow fcnal-test.sh to be run from top level directory in the kernel repo as well as from tools/testing/selftests/net by setting the PATH to find the in-tree nettest. Signed-off-by: David Ahern --- tools/testing/selftests/net/fcnal-test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh index 0d4f252427e2..3d69fac6bcc0 100755 --- a/tools/testing/selftests/net/fcnal-test.sh +++ b/tools/testing/selftests/net/fcnal-test.sh @@ -38,6 +38,9 @@ # server / client nomenclature relative to ns-A source lib.sh + +PATH=$PWD:$PWD/tools/testing/selftests/net:$PATH + VERBOSE=0 NSA_DEV=eth1 From patchwork Wed Jan 24 21:41:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ahern X-Patchwork-Id: 13529732 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A34BF135A58 for ; Wed, 24 Jan 2024 21:41:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706132494; cv=none; b=ZXLMjsOuPjoCJrJXYrH+r4lGLDC0g8qGAp+FgAnWsCSPciqZpE5eXOQSgSpFQLopDrJSz92oe2paghHPIFQ1xa025RapkFs1bqs7ju3dNbg32l97yh73ZJ7t25lI8LEjVIExjceJO9ik0sPPUPDMdgg/FoHAQhaaJiJ7uFM5FFU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706132494; c=relaxed/simple; bh=uGTPCJ4KadVLOvov+WSpwl51de34SMMbJdxNYoZBlyE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WrQnuH3cmJ5cE2Qwg2GM3pzrHXfIi21RCn+O3OYyeWokQaQOnhuTlIgyFiCFxFPe8XXlnyVK99IS8uN4U51cm6CMm1TQlnzSdohIagkLQQT+H6aC55m7BslVvbtaPr27l1QmWT7XxUGerRbX7xJtXGW0O15sc0exNOKjuSSABR4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Uxo4VOma; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Uxo4VOma" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C20FBC433F1; Wed, 24 Jan 2024 21:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706132494; bh=uGTPCJ4KadVLOvov+WSpwl51de34SMMbJdxNYoZBlyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uxo4VOmaNHrwcjwrHdlIvS6rOzPpjImwIuDI0MP6FqC7mEMewtAJGpxYiLdxN8Lfi 7S6puZS0UeXvy+CVVwrIFlU50OdntcR/rVhO+9NQwMGxMatl1PdFHdJJGWr4ZnXgz4 UsycbnUSKNQ0E4yUiSCyVJ6vlTUv7dlTJStnKsXxwab7JYm7/6PlfcdnwHGxpM8Ue9 8kP3Cc3JxZNy4+Xyb4t/bO7/0dZxOtzn+4nH/i2UlmTLZXv0F/a9EX7XMi/2VbZVgw 2jGmp4nZqtjOj5d5oxWC+SmeSR/ao/9uzhHXLOdDy3sY5VnlsqoZADIt6S9BEbSXTe wV+eDQNUa7PhQ== From: David Ahern To: netdev@vger.kernel.org Cc: kuba@kernel.org, David Ahern Subject: [PATCH net-next 2/3] selftest: Fix set of ping_group_range in fcnal-test Date: Wed, 24 Jan 2024 14:41:16 -0700 Message-Id: <20240124214117.24687-3-dsahern@kernel.org> X-Mailer: git-send-email 2.39.3 (Apple Git-145) In-Reply-To: <20240124214117.24687-1-dsahern@kernel.org> References: <20240124214117.24687-1-dsahern@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org ping_group_range sysctl has a compound value which does not go through the various function layers in tact. Create a helper function to bypass the layers and correctly set the value. Signed-off-by: David Ahern --- tools/testing/selftests/net/fcnal-test.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh index 3d69fac6bcc0..f590b0fb740e 100755 --- a/tools/testing/selftests/net/fcnal-test.sh +++ b/tools/testing/selftests/net/fcnal-test.sh @@ -190,6 +190,15 @@ kill_procs() sleep 1 } +set_ping_group() +{ + if [ "$VERBOSE" = "1" ]; then + echo "COMMAND: ${NSA_CMD} sysctl -q -w net.ipv4.ping_group_range='0 2147483647'" + fi + + ${NSA_CMD} sysctl -q -w net.ipv4.ping_group_range='0 2147483647' +} + do_run_cmd() { local cmd="$*" @@ -838,14 +847,14 @@ ipv4_ping() set_sysctl net.ipv4.raw_l3mdev_accept=1 2>/dev/null ipv4_ping_novrf setup - set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null + set_ping_group ipv4_ping_novrf log_subsection "With VRF" setup "yes" ipv4_ping_vrf setup "yes" - set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null + set_ping_group ipv4_ping_vrf } @@ -2056,12 +2065,12 @@ ipv4_addr_bind() log_subsection "No VRF" setup - set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null + set_ping_group ipv4_addr_bind_novrf log_subsection "With VRF" setup "yes" - set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null + set_ping_group ipv4_addr_bind_vrf } @@ -2524,14 +2533,14 @@ ipv6_ping() setup ipv6_ping_novrf setup - set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null + set_ping_group ipv6_ping_novrf log_subsection "With VRF" setup "yes" ipv6_ping_vrf setup "yes" - set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null + set_ping_group ipv6_ping_vrf } From patchwork Wed Jan 24 21:41:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ahern X-Patchwork-Id: 13529733 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 362B9135A66 for ; Wed, 24 Jan 2024 21:41:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706132495; cv=none; b=NsOOgvq0Alml7D2KaFFKpCQxKfntVRHp93F1TUCSbOpwo3SRREE2JghuX7bYkoJzWUoGJ+LeLcgHCR44kupZDPLYMJz9Zn/sbGYeHmCykp7Fv8GrmJFo4YySLlLymAZwWrT4G8PcVApyxK4QZ7bOy5wjy5Jx5VSwJOzNlbQMTwg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706132495; c=relaxed/simple; bh=L6wBSyjWpEkApiKdAKEQJMcpF9u2gtdAWdUQxFKV1i0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hzYq+TYVNgBbLovcGlQxtmJ6+wFw+daxHLh1C9o8q+Uq8GgY2t5PpUDrBWH5mvZM1NfaSqxVuFKMi8HhFnlJ9Sm16FbJtvHMTaD+pMXzP9FTuiL4tasnkeVt3R4atxPN2wTg2X590YkzDyR4obfSR07Qu4Y9kfWq75g2YgiVPMU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ThSkNuM3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ThSkNuM3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AB52C433C7; Wed, 24 Jan 2024 21:41:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706132494; bh=L6wBSyjWpEkApiKdAKEQJMcpF9u2gtdAWdUQxFKV1i0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ThSkNuM3jV+x/sUzwwZ9XsoS+aUl6WknNi9OgUUYgU+MLdd9UfuvjtiwSE8uIamRo j5UPKwuz8E0Zu+7wgpl9PI09/D9MGKEvaQecPQPaZIZcOCyLvTO7TV+stsPMHiatNa 653FN9CLzRAfy5Np5G2KWOkcoPwwa2RIMPa/A0LsdLFqbcz+dfEx1hDUzsiqYGUg8y JVhqphcvvPUscX6gSYcyE0I+ZWpUBVQ8ln+xSf/c6eNvysIEGyIPN0uWHVtsovG5JQ LwzQc/YY+MQBtYZusEmmciK/Z6jXB2TojK7460sFxsacjMNhx+E0WyNWpj6VckqjGi +J9hMFgWeQzwg== From: David Ahern To: netdev@vger.kernel.org Cc: kuba@kernel.org, David Ahern Subject: [PATCH net-next 3/3] selftest: Show expected and actual return codes for test failures in fcnal-test Date: Wed, 24 Jan 2024 14:41:17 -0700 Message-Id: <20240124214117.24687-4-dsahern@kernel.org> X-Mailer: git-send-email 2.39.3 (Apple Git-145) In-Reply-To: <20240124214117.24687-1-dsahern@kernel.org> References: <20240124214117.24687-1-dsahern@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Capture expected and actual return codes for a test that fails in the fcnal-test suite. Signed-off-by: David Ahern --- tools/testing/selftests/net/fcnal-test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh index f590b0fb740e..d7cfb7c2b427 100755 --- a/tools/testing/selftests/net/fcnal-test.sh +++ b/tools/testing/selftests/net/fcnal-test.sh @@ -109,6 +109,7 @@ log_test() else nfail=$((nfail+1)) printf "TEST: %-70s [FAIL]\n" "${msg}" + echo " expected rc $expected; actual rc $rc" if [ "${PAUSE_ON_FAIL}" = "yes" ]; then echo echo "hit enter to continue, 'q' to quit"