* [PATCH] [net-next, v2] selftest/net: skip srv6_end_dt[4/6]_l3vpn_test.sh if vrftable not available
@ 2026-09-03 10:35 Alessio Faina
2026-09-04 18:25 ` Andrea Mayer
0 siblings, 1 reply; 3+ messages in thread
From: Alessio Faina @ 2026-09-03 10:35 UTC (permalink / raw)
To: Andrea Mayer
Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Shuah Khan, netdev, linux-kselftest, linux-kernel
In case iproute2 is older than version 5.11.0, released ~Feb 23, 2021,
the vrftable support is not available and the tests
contained in the following 4 test files
- srv6_end_dt4_l3vpn_test.sh
- srv6_end_dt6_l3vpn_test.sh
are failing in some kernel backports.
This is the result of one those tests in an unsupported environment:
\################################################################################
\TEST SECTION: SRv6 VPN connectivity test among hosts in the same tenant
\################################################################################
\
\ TEST: Hosts connectivity: hs-t100-1 -> hs-t100-2 (tenant 100) [FAIL]
\
\ TEST: Hosts connectivity: hs-t100-2 -> hs-t100-1 (tenant 100) [FAIL]
\
\ TEST: Hosts connectivity: hs-t200-3 -> hs-t200-4 (tenant 200) [FAIL]
\
\ TEST: Hosts connectivity: hs-t200-4 -> hs-t200-3 (tenant 200) [FAIL]
\
To amend this, check the current running iproute2 supports the vrftable
feature and, if not, just skip the entire test to avoid a failure.
v2: - remove dx[4/6] tests
- test if vrftable is available in the installed iproute2 application
v1: https://patchwork.kernel.org/project/netdevbpf/patch/20260824091537.2305107-1-alessio.faina@canonical.com/
- initial approach by testing DT[4/6] and DX[4/6]
- test if DT4/DT6 are available in iproute2
Signed-off-by: Alessio Faina <alessio.faina@canonical.com>
---
./tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh | 21 +++++++++++++++++++
./tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh | 21 +++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh b/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh
index a649dba3cb77..037e5fe1da2a 100755
--- a/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh
+++ b/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh
@@ -469,12 +469,33 @@ if [ ! -x "$(command -v ip)" ]; then
exit $ksft_skip
fi
+test_vrftable_supp_or_ksft_skip()
+{
+ local nsname
+
+ setup_ns nsname
+ ip netns exec "${nsname}" sh -c "echo 1 > /proc/sys/net/vrf/strict_mode"
+ ip -netns "${nsname}" link add vrf-100 type vrf table 100
+ ip -netns "${nsname}" link set vrf-100 up
+
+ if ! ip -netns "${nsname}" -6 route add fc00::1/128 \
+ encap seg6local action End.DT4 vrftable 100 dev vrf-100 2>/dev/null; then
+ cleanup_ns "${nsname}"
+ echo "SKIP: SRv6 End.DT4 vrftable not supported"
+ exit "${ksft_skip}"
+ fi
+
+ cleanup_ns "${nsname}"
+}
+
modprobe vrf &>/dev/null
if [ ! -e /proc/sys/net/vrf/strict_mode ]; then
echo "SKIP: vrf sysctl does not exist"
exit $ksft_skip
fi
+test_vrftable_supp_or_ksft_skip
+
cleanup &>/dev/null
setup
diff --git a/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh b/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh
index e408406d8489..9a29e0d6c912 100755
--- a/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh
+++ b/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh
@@ -479,12 +479,33 @@ if [ ! -x "$(command -v ip)" ]; then
exit $ksft_skip
fi
+test_vrftable_supp_or_ksft_skip()
+{
+ local nsname
+
+ setup_ns nsname
+ ip netns exec "${nsname}" sh -c "echo 1 > /proc/sys/net/vrf/strict_mode"
+ ip -netns "${nsname}" link add vrf-100 type vrf table 100
+ ip -netns "${nsname}" link set vrf-100 up
+
+ if ! ip -netns "${nsname}" -6 route add fc00::1/128 \
+ encap seg6local action End.DT6 vrftable 100 dev vrf-100 2>/dev/null; then
+ cleanup_ns "${nsname}"
+ echo "SKIP: SRv6 End.DT6 vrftable not supported"
+ exit "${ksft_skip}"
+ fi
+
+ cleanup_ns "${nsname}"
+}
+
modprobe vrf &>/dev/null
if [ ! -e /proc/sys/net/vrf/strict_mode ]; then
echo "SKIP: vrf sysctl does not exist"
exit $ksft_skip
fi
+test_vrftable_supp_or_ksft_skip
+
cleanup &>/dev/null
setup
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] [net-next, v2] selftest/net: skip srv6_end_dt[4/6]_l3vpn_test.sh if vrftable not available 2026-09-03 10:35 [PATCH] [net-next, v2] selftest/net: skip srv6_end_dt[4/6]_l3vpn_test.sh if vrftable not available Alessio Faina @ 2026-09-04 18:25 ` Andrea Mayer 2026-09-07 9:41 ` Alessio Faina 0 siblings, 1 reply; 3+ messages in thread From: Andrea Mayer @ 2026-09-04 18:25 UTC (permalink / raw) To: Alessio Faina Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, horms, Shuah Khan, netdev, linux-kselftest, linux-kernel, stefano.salsano, hangbin.liu, Andrea Mayer On Thu, 3 Sep 2026 12:35:45 +0200 Alessio Faina <alessio.faina@canonical.com> wrote: Hi Alessio, Thanks for the v2. The check looks good to me. The comments below are all on the commit message and on the subject. > In case iproute2 is older than version 5.11.0, released ~Feb 23, 2021, > the vrftable support is not available and the tests > contained in the following 4 test files > - srv6_end_dt4_l3vpn_test.sh > - srv6_end_dt6_l3vpn_test.sh > are failing in some kernel backports. Two files now, not four. > This is the result of one those tests in an unsupported environment: > > \################################################################################ > \TEST SECTION: SRv6 VPN connectivity test among hosts in the same tenant > \################################################################################ > \ > \ TEST: Hosts connectivity: hs-t100-1 -> hs-t100-2 (tenant 100) [FAIL] > \ > \ TEST: Hosts connectivity: hs-t100-2 -> hs-t100-1 (tenant 100) [FAIL] > \ > \ TEST: Hosts connectivity: hs-t200-3 -> hs-t200-4 (tenant 200) [FAIL] > \ > \ TEST: Hosts connectivity: hs-t200-4 -> hs-t200-3 (tenant 200) [FAIL] > \ > > To amend this, check the current running iproute2 supports the vrftable > feature and, if not, just skip the entire test to avoid a failure. IMO the sentence could say what the check does: it installs a route with the vrftable feature, and skips the test rather than failing when the feature is not supported. > v2: - remove dx[4/6] tests > - test if vrftable is available in the installed iproute2 application > v1: https://patchwork.kernel.org/project/netdevbpf/patch/20260824091537.2305107-1-alessio.faina@canonical.com/ > - initial approach by testing DT[4/6] and DX[4/6] > - test if DT4/DT6 are available in iproute2 > > Signed-off-by: Alessio Faina <alessio.faina@canonical.com> > --- > > [snip] The changelog goes under the ---. checkpatch reports it too. Since the commit message needs to be revised anyway, a few nits: i) The subject came as [PATCH] [net-next, v2] instead of [PATCH net-next v2]. And maybe you meant selftests/net: ? ii) "one those tests" -> "one of those tests" ? iii) The backslashes in the pasted log could go, git does not remove them and they stay in the commit message. Ciao, Andrea ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [net-next, v2] selftest/net: skip srv6_end_dt[4/6]_l3vpn_test.sh if vrftable not available 2026-09-04 18:25 ` Andrea Mayer @ 2026-09-07 9:41 ` Alessio Faina 0 siblings, 0 replies; 3+ messages in thread From: Alessio Faina @ 2026-09-07 9:41 UTC (permalink / raw) To: Andrea Mayer Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, horms, Shuah Khan, netdev, linux-kselftest, linux-kernel, stefano.salsano, hangbin.liu On Fri, Sep 04, 2026 at 08:25:46PM +0200, Andrea Mayer wrote: > On Thu, 3 Sep 2026 12:35:45 +0200 > Alessio Faina <alessio.faina@canonical.com> wrote: > > Hi Alessio, > > Thanks for the v2. The check looks good to me. The comments below are > all on the commit message and on the subject. > > > In case iproute2 is older than version 5.11.0, released ~Feb 23, 2021, > > the vrftable support is not available and the tests > > contained in the following 4 test files > > - srv6_end_dt4_l3vpn_test.sh > > - srv6_end_dt6_l3vpn_test.sh > > are failing in some kernel backports. > > Two files now, not four. > > > This is the result of one those tests in an unsupported environment: > > > > \################################################################################ > > \TEST SECTION: SRv6 VPN connectivity test among hosts in the same tenant > > \################################################################################ > > \ > > \ TEST: Hosts connectivity: hs-t100-1 -> hs-t100-2 (tenant 100) [FAIL] > > \ > > \ TEST: Hosts connectivity: hs-t100-2 -> hs-t100-1 (tenant 100) [FAIL] > > \ > > \ TEST: Hosts connectivity: hs-t200-3 -> hs-t200-4 (tenant 200) [FAIL] > > \ > > \ TEST: Hosts connectivity: hs-t200-4 -> hs-t200-3 (tenant 200) [FAIL] > > \ > > > > To amend this, check the current running iproute2 supports the vrftable > > feature and, if not, just skip the entire test to avoid a failure. > > IMO the sentence could say what the check does: it installs a route > with the vrftable feature, and skips the test rather than failing when > the feature is not supported. > > > v2: - remove dx[4/6] tests > > - test if vrftable is available in the installed iproute2 application > > v1: https://patchwork.kernel.org/project/netdevbpf/patch/20260824091537.2305107-1-alessio.faina@canonical.com/ > > - initial approach by testing DT[4/6] and DX[4/6] > > - test if DT4/DT6 are available in iproute2 > > > > Signed-off-by: Alessio Faina <alessio.faina@canonical.com> > > --- > > > > [snip] > > The changelog goes under the ---. checkpatch reports it too. > > Since the commit message needs to be revised anyway, a few nits: > > i) The subject came as [PATCH] [net-next, v2] instead of > [PATCH net-next v2]. And maybe you meant selftests/net: ? > ii) "one those tests" -> "one of those tests" ? > iii) The backslashes in the pasted log could go, git does not remove > them and they stay in the commit message. > > Ciao, > Andrea Hi Andrea, Thanks a lot for the review, I will address your comments and update the patch accordingly. A v3 will be on its way soon. i) Yeah, definitely my fault when I exported with format-patch I didn't merge the [PATCH] and [net-next v2] parts. I will fix that. ii) Yes, thanks. iii) Is interesting, checkpatch.pl is complaining about having a list of ##### in the commit message, but adding a space in front makes it happy. I will use that approach. I will add the missing cc_maintainer as well as mentioned in the list of checks. Kind regards, -Alessio Faina ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-07 9:41 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-09-03 10:35 [PATCH] [net-next, v2] selftest/net: skip srv6_end_dt[4/6]_l3vpn_test.sh if vrftable not available Alessio Faina 2026-09-04 18:25 ` Andrea Mayer 2026-09-07 9:41 ` Alessio Faina
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox