Commit 5535fcc5 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'selftests-updates-to-fcnal-test-for-autoamted-environment'

David Ahern says:

====================
selftests: Updates to fcnal-test for autoamted environment

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.
====================

Link: https://lore.kernel.org/r/20240124214117.24687-1-dsahern@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents b54846da 70863c90
......@@ -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
......@@ -106,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"
......@@ -187,6 +191,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="$*"
......@@ -835,14 +848,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
}
......@@ -2053,12 +2066,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
}
......@@ -2521,14 +2534,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
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment