* [PATCH net-next 0/3] selftests: Updates to fcnal-test for autoamted environment
@ 2024-01-24 21:41 David Ahern
2024-01-24 21:41 ` [PATCH net-next 1/3] selftest: Update PATH for nettest in fcnal-test David Ahern
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: David Ahern @ 2024-01-24 21:41 UTC (permalink / raw)
To: netdev; +Cc: kuba, David Ahern
The first patch updates the PATH for fcnal-test.sh to find the nettest
binary when invoked at the top-level directory via
make -C tools/testing/selftests TARGETS=net run_tests
Second patch fixes a bug setting the ping_group; it has a compound value
and that value is not traversing the various helper functions in tact.
Fix by creating a helper specific to setting it.
Third patch adds more output when a test fails - e.g., to catch a change
in the return code of some test.
With these 3 patches, the entire suite completes successfully when
run on Ubuntu 23.10 with 6.5 kernel - 914 tests pass, 0 fail.
David Ahern (3):
selftest: Update PATH for nettest in fcnal-test
selftest: Fix set of ping_group_range in fcnal-test
selftest: Show expected and actual return codes for test failures in
fcnal-test
tools/testing/selftests/net/fcnal-test.sh | 25 +++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
--
2.39.3 (Apple Git-145)
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH net-next 1/3] selftest: Update PATH for nettest in fcnal-test
2024-01-24 21:41 [PATCH net-next 0/3] selftests: Updates to fcnal-test for autoamted environment David Ahern
@ 2024-01-24 21:41 ` David Ahern
2024-01-24 21:41 ` [PATCH net-next 2/3] selftest: Fix set of ping_group_range " David Ahern
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: David Ahern @ 2024-01-24 21:41 UTC (permalink / raw)
To: netdev; +Cc: kuba, David Ahern
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 <dsahern@kernel.org>
---
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
--
2.39.3 (Apple Git-145)
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net-next 2/3] selftest: Fix set of ping_group_range in fcnal-test
2024-01-24 21:41 [PATCH net-next 0/3] selftests: Updates to fcnal-test for autoamted environment David Ahern
2024-01-24 21:41 ` [PATCH net-next 1/3] selftest: Update PATH for nettest in fcnal-test David Ahern
@ 2024-01-24 21:41 ` David Ahern
2024-01-24 21:41 ` [PATCH net-next 3/3] selftest: Show expected and actual return codes for test failures " David Ahern
2024-01-26 1:20 ` [PATCH net-next 0/3] selftests: Updates to fcnal-test for autoamted environment patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: David Ahern @ 2024-01-24 21:41 UTC (permalink / raw)
To: netdev; +Cc: kuba, David Ahern
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 <dsahern@kernel.org>
---
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
}
--
2.39.3 (Apple Git-145)
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net-next 3/3] selftest: Show expected and actual return codes for test failures in fcnal-test
2024-01-24 21:41 [PATCH net-next 0/3] selftests: Updates to fcnal-test for autoamted environment David Ahern
2024-01-24 21:41 ` [PATCH net-next 1/3] selftest: Update PATH for nettest in fcnal-test David Ahern
2024-01-24 21:41 ` [PATCH net-next 2/3] selftest: Fix set of ping_group_range " David Ahern
@ 2024-01-24 21:41 ` David Ahern
2024-01-26 1:20 ` [PATCH net-next 0/3] selftests: Updates to fcnal-test for autoamted environment patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: David Ahern @ 2024-01-24 21:41 UTC (permalink / raw)
To: netdev; +Cc: kuba, David Ahern
Capture expected and actual return codes for a test that fails in
the fcnal-test suite.
Signed-off-by: David Ahern <dsahern@kernel.org>
---
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"
--
2.39.3 (Apple Git-145)
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH net-next 0/3] selftests: Updates to fcnal-test for autoamted environment
2024-01-24 21:41 [PATCH net-next 0/3] selftests: Updates to fcnal-test for autoamted environment David Ahern
` (2 preceding siblings ...)
2024-01-24 21:41 ` [PATCH net-next 3/3] selftest: Show expected and actual return codes for test failures " David Ahern
@ 2024-01-26 1:20 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-26 1:20 UTC (permalink / raw)
To: David Ahern; +Cc: netdev, kuba
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 24 Jan 2024 14:41:14 -0700 you wrote:
> The first patch updates the PATH for fcnal-test.sh to find the nettest
> binary when invoked at the top-level directory via
> make -C tools/testing/selftests TARGETS=net run_tests
>
> Second patch fixes a bug setting the ping_group; it has a compound value
> and that value is not traversing the various helper functions in tact.
> Fix by creating a helper specific to setting it.
>
> [...]
Here is the summary with links:
- [net-next,1/3] selftest: Update PATH for nettest in fcnal-test
https://git.kernel.org/netdev/net-next/c/ad9b701aed48
- [net-next,2/3] selftest: Fix set of ping_group_range in fcnal-test
https://git.kernel.org/netdev/net-next/c/79bf0d4a07d4
- [net-next,3/3] selftest: Show expected and actual return codes for test failures in fcnal-test
https://git.kernel.org/netdev/net-next/c/70863c902d76
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-26 1:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-24 21:41 [PATCH net-next 0/3] selftests: Updates to fcnal-test for autoamted environment David Ahern
2024-01-24 21:41 ` [PATCH net-next 1/3] selftest: Update PATH for nettest in fcnal-test David Ahern
2024-01-24 21:41 ` [PATCH net-next 2/3] selftest: Fix set of ping_group_range " David Ahern
2024-01-24 21:41 ` [PATCH net-next 3/3] selftest: Show expected and actual return codes for test failures " David Ahern
2024-01-26 1:20 ` [PATCH net-next 0/3] selftests: Updates to fcnal-test for autoamted environment patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).