The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH net] selftest/net: skip srv6_end_d[t/x][4/6]_*_test.sh if iproute2 too old
@ 2026-08-24  9:15 Alessio Faina
  2026-08-25  8:39 ` Hangbin Liu
  2026-08-25 22:01 ` Andrea Mayer
  0 siblings, 2 replies; 4+ messages in thread
From: Alessio Faina @ 2026-08-24  9:15 UTC (permalink / raw)
  To: andrea.mayer
  Cc: davem, edumazet, kuba, pabeni, horms, shuah, netdev,
	linux-kselftest, linux-kernel

In case iproute2 is older than version 5.14.0, released ~Sept 1, 2021,
the End.DT4/DT6/DX4/DX6 support are not available and the tests
contained in the following 4 test files
 - srv6_end_dt4_l3vpn_test.sh
 - srv6_end_dt6_l3vpn_test.sh
 - srv6_end_dx4_netfilter_test.sh
 - srv6_end_dx6_netfilter_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 required
feature and, if not, just skip the entire test to avoid a failure.

This is similar to what have been done for srv6_end_dt46_l3vpn_test.sh in
https://patchwork.kernel.org/project/netdevbpf/patch/20260715122859.36177-1-alessio.faina@canonical.com/

Signed-off-by: Alessio Faina <alessio.faina@canonical.com>
---
 tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh      | 10 ++++++++++
 tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh      | 10 ++++++++++
 tools/testing/selftests/net/srv6_end_dx4_netfilter_test.sh  | 10 ++++++++++
 tools/testing/selftests/net/srv6_end_dx6_netfilter_test.sh  | 10 ++++++++++
 4 files changed, 40 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..50e8c733cf9f 100755
--- a/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh
+++ b/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh
@@ -459,6 +459,14 @@ host_vpn_isolation_tests()
 	done
 }
 
+test_iproute2_supp_or_ksft_skip()
+{
+	if ! ip route help 2>&1 | grep -qo "End.DT4"; then
+		echo "SKIP: Missing SRv6 End.DT4 support in iproute2"
+		exit "${ksft_skip}"
+	fi
+}
+
 if [ "$(id -u)" -ne 0 ];then
 	echo "SKIP: Need root privileges"
 	exit $ksft_skip
@@ -469,6 +477,8 @@ if [ ! -x "$(command -v ip)" ]; then
 	exit $ksft_skip
 fi
 
+test_iproute2_supp_or_ksft_skip
+
 modprobe vrf &>/dev/null
 if [ ! -e /proc/sys/net/vrf/strict_mode ]; then
         echo "SKIP: vrf sysctl does not exist"
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..9ed985559c6b 100755
--- a/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh
+++ b/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh
@@ -469,6 +469,14 @@ host_vpn_isolation_tests()
 	done
 }
 
+test_iproute2_supp_or_ksft_skip()
+{
+	if ! ip route help 2>&1 | grep -qo "End.DT6"; then
+		echo "SKIP: Missing SRv6 End.DT6 support in iproute2"
+		exit "${ksft_skip}"
+	fi
+}
+
 if [ "$(id -u)" -ne 0 ];then
 	echo "SKIP: Need root privileges"
 	exit $ksft_skip
@@ -479,6 +487,8 @@ if [ ! -x "$(command -v ip)" ]; then
 	exit $ksft_skip
 fi
 
+test_iproute2_supp_or_ksft_skip
+
 modprobe vrf &>/dev/null
 if [ ! -e /proc/sys/net/vrf/strict_mode ]; then
         echo "SKIP: vrf sysctl does not exist"
diff --git a/tools/testing/selftests/net/srv6_end_dx4_netfilter_test.sh b/tools/testing/selftests/net/srv6_end_dx4_netfilter_test.sh
index e23210aa547f..b0bc85db8353 100755
--- a/tools/testing/selftests/net/srv6_end_dx4_netfilter_test.sh
+++ b/tools/testing/selftests/net/srv6_end_dx4_netfilter_test.sh
@@ -311,6 +311,14 @@ router_netfilter_tests()
 	check_and_log_hs_connectivity 2 1 100
 }
 
+test_iproute2_supp_or_ksft_skip()
+{
+	if ! ip route help 2>&1 | grep -qo "End.DX4"; then
+		echo "SKIP: Missing SRv6 End.DX4 support in iproute2"
+		exit "${ksft_skip}"
+	fi
+}
+
 if [ "$(id -u)" -ne 0 ];then
 	echo "SKIP: Need root privileges"
 	exit $ksft_skip
@@ -321,6 +329,8 @@ if [ ! -x "$(command -v ip)" ]; then
 	exit $ksft_skip
 fi
 
+test_iproute2_supp_or_ksft_skip
+
 cleanup &>/dev/null
 
 setup
diff --git a/tools/testing/selftests/net/srv6_end_dx6_netfilter_test.sh b/tools/testing/selftests/net/srv6_end_dx6_netfilter_test.sh
index 9e69a2ed5bc3..9bfbc5bbbdeb 100755
--- a/tools/testing/selftests/net/srv6_end_dx6_netfilter_test.sh
+++ b/tools/testing/selftests/net/srv6_end_dx6_netfilter_test.sh
@@ -316,6 +316,14 @@ router_netfilter_tests()
 	check_and_log_hs_connectivity 2 1 100
 }
 
+test_iproute2_supp_or_ksft_skip()
+{
+	if ! ip route help 2>&1 | grep -qo "End.DX6"; then
+		echo "SKIP: Missing SRv6 End.DX6 support in iproute2"
+		exit "${ksft_skip}"
+	fi
+}
+
 if [ "$(id -u)" -ne 0 ];then
 	echo "SKIP: Need root privileges"
 	exit $ksft_skip
@@ -326,6 +334,8 @@ if [ ! -x "$(command -v ip)" ]; then
 	exit $ksft_skip
 fi
 
+test_iproute2_supp_or_ksft_skip
+
 cleanup &>/dev/null
 
 setup
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net] selftest/net: skip srv6_end_d[t/x][4/6]_*_test.sh if iproute2 too old
  2026-08-24  9:15 [PATCH net] selftest/net: skip srv6_end_d[t/x][4/6]_*_test.sh if iproute2 too old Alessio Faina
@ 2026-08-25  8:39 ` Hangbin Liu
  2026-08-25  8:45   ` Hangbin Liu
  2026-08-25 22:01 ` Andrea Mayer
  1 sibling, 1 reply; 4+ messages in thread
From: Hangbin Liu @ 2026-08-25  8:39 UTC (permalink / raw)
  To: Alessio Faina
  Cc: andrea.mayer, davem, edumazet, kuba, pabeni, horms, shuah, netdev,
	linux-kselftest, linux-kernel

On Mon, Aug 24, 2026 at 11:15:37AM +0200, Alessio Faina wrote:
> In case iproute2 is older than version 5.14.0, released ~Sept 1, 2021,
> the End.DT4/DT6/DX4/DX6 support are not available and the tests
> contained in the following 4 test files
>  - srv6_end_dt4_l3vpn_test.sh
>  - srv6_end_dt6_l3vpn_test.sh
>  - srv6_end_dx4_netfilter_test.sh
>  - srv6_end_dx6_netfilter_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 required
> feature and, if not, just skip the entire test to avoid a failure.
> 
> This is similar to what have been done for srv6_end_dt46_l3vpn_test.sh in
> https://patchwork.kernel.org/project/netdevbpf/patch/20260715122859.36177-1-alessio.faina@canonical.com/
> 
> Signed-off-by: Alessio Faina <alessio.faina@canonical.com>
> ---
>  tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh      | 10 ++++++++++
>  tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh      | 10 ++++++++++
>  tools/testing/selftests/net/srv6_end_dx4_netfilter_test.sh  | 10 ++++++++++
>  tools/testing/selftests/net/srv6_end_dx6_netfilter_test.sh  | 10 ++++++++++
>  4 files changed, 40 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..50e8c733cf9f 100755
> --- a/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh
> +++ b/tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh
> @@ -459,6 +459,14 @@ host_vpn_isolation_tests()
>  	done
>  }
>  
> +test_iproute2_supp_or_ksft_skip()
> +{
> +	if ! ip route help 2>&1 | grep -qo "End.DT4"; then
> +		echo "SKIP: Missing SRv6 End.DT4 support in iproute2"
> +		exit "${ksft_skip}"
> +	fi
> +}
> +
>  if [ "$(id -u)" -ne 0 ];then
>  	echo "SKIP: Need root privileges"
>  	exit $ksft_skip
> @@ -469,6 +477,8 @@ if [ ! -x "$(command -v ip)" ]; then
>  	exit $ksft_skip
>  fi
>  
> +test_iproute2_supp_or_ksft_skip
> +
>  modprobe vrf &>/dev/null
>  if [ ! -e /proc/sys/net/vrf/strict_mode ]; then
>          echo "SKIP: vrf sysctl does not exist"
> 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..9ed985559c6b 100755
> --- a/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh
> +++ b/tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh
> @@ -469,6 +469,14 @@ host_vpn_isolation_tests()
>  	done
>  }
>  
> +test_iproute2_supp_or_ksft_skip()
> +{
> +	if ! ip route help 2>&1 | grep -qo "End.DT6"; then
> +		echo "SKIP: Missing SRv6 End.DT6 support in iproute2"
> +		exit "${ksft_skip}"
> +	fi
> +}
> +
>  if [ "$(id -u)" -ne 0 ];then
>  	echo "SKIP: Need root privileges"
>  	exit $ksft_skip
> @@ -479,6 +487,8 @@ if [ ! -x "$(command -v ip)" ]; then
>  	exit $ksft_skip
>  fi
>  
> +test_iproute2_supp_or_ksft_skip
> +
>  modprobe vrf &>/dev/null
>  if [ ! -e /proc/sys/net/vrf/strict_mode ]; then
>          echo "SKIP: vrf sysctl does not exist"
> diff --git a/tools/testing/selftests/net/srv6_end_dx4_netfilter_test.sh b/tools/testing/selftests/net/srv6_end_dx4_netfilter_test.sh
> index e23210aa547f..b0bc85db8353 100755
> --- a/tools/testing/selftests/net/srv6_end_dx4_netfilter_test.sh
> +++ b/tools/testing/selftests/net/srv6_end_dx4_netfilter_test.sh
> @@ -311,6 +311,14 @@ router_netfilter_tests()
>  	check_and_log_hs_connectivity 2 1 100
>  }
>  
> +test_iproute2_supp_or_ksft_skip()
> +{
> +	if ! ip route help 2>&1 | grep -qo "End.DX4"; then
> +		echo "SKIP: Missing SRv6 End.DX4 support in iproute2"
> +		exit "${ksft_skip}"
> +	fi
> +}
> +
>  if [ "$(id -u)" -ne 0 ];then
>  	echo "SKIP: Need root privileges"
>  	exit $ksft_skip
> @@ -321,6 +329,8 @@ if [ ! -x "$(command -v ip)" ]; then
>  	exit $ksft_skip
>  fi
>  
> +test_iproute2_supp_or_ksft_skip
> +
>  cleanup &>/dev/null
>  
>  setup
> diff --git a/tools/testing/selftests/net/srv6_end_dx6_netfilter_test.sh b/tools/testing/selftests/net/srv6_end_dx6_netfilter_test.sh
> index 9e69a2ed5bc3..9bfbc5bbbdeb 100755
> --- a/tools/testing/selftests/net/srv6_end_dx6_netfilter_test.sh
> +++ b/tools/testing/selftests/net/srv6_end_dx6_netfilter_test.sh
> @@ -316,6 +316,14 @@ router_netfilter_tests()
>  	check_and_log_hs_connectivity 2 1 100
>  }
>  
> +test_iproute2_supp_or_ksft_skip()
> +{
> +	if ! ip route help 2>&1 | grep -qo "End.DX6"; then
> +		echo "SKIP: Missing SRv6 End.DX6 support in iproute2"
> +		exit "${ksft_skip}"
> +	fi
> +}
> +
>  if [ "$(id -u)" -ne 0 ];then
>  	echo "SKIP: Need root privileges"
>  	exit $ksft_skip
> @@ -326,6 +334,8 @@ if [ ! -x "$(command -v ip)" ]; then
>  	exit $ksft_skip
>  fi
>  
> +test_iproute2_supp_or_ksft_skip
> +
>  cleanup &>/dev/null
>  
>  setup
> -- 
> 2.43.0
> 

LGTM

Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] selftest/net: skip srv6_end_d[t/x][4/6]_*_test.sh if iproute2 too old
  2026-08-25  8:39 ` Hangbin Liu
@ 2026-08-25  8:45   ` Hangbin Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Hangbin Liu @ 2026-08-25  8:45 UTC (permalink / raw)
  To: Alessio Faina
  Cc: andrea.mayer, davem, edumazet, kuba, pabeni, horms, shuah, netdev,
	linux-kselftest, linux-kernel

On Tue, Aug 25, 2026 at 04:39:55PM +0800, Hangbin Liu wrote:
> On Mon, Aug 24, 2026 at 11:15:37AM +0200, Alessio Faina wrote:
> > In case iproute2 is older than version 5.14.0, released ~Sept 1, 2021,
> > the End.DT4/DT6/DX4/DX6 support are not available and the tests
> > contained in the following 4 test files
> >  - srv6_end_dt4_l3vpn_test.sh
> >  - srv6_end_dt6_l3vpn_test.sh
> >  - srv6_end_dx4_netfilter_test.sh
> >  - srv6_end_dx6_netfilter_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 required
> > feature and, if not, just skip the entire test to avoid a failure.
> > 
> > This is similar to what have been done for srv6_end_dt46_l3vpn_test.sh in
> > https://patchwork.kernel.org/project/netdevbpf/patch/20260715122859.36177-1-alessio.faina@canonical.com/
> > 
> > Signed-off-by: Alessio Faina <alessio.faina@canonical.com>
> > 
> 
> LGTM
> 
> Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>

Oh, I just noticed this patch is better for net‑next.

Please wait for Jakub's reply. If not, You need to re-post it once net-next
opens again (Aug 31th).

Thanks
Hangbin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] selftest/net: skip srv6_end_d[t/x][4/6]_*_test.sh if iproute2 too old
  2026-08-24  9:15 [PATCH net] selftest/net: skip srv6_end_d[t/x][4/6]_*_test.sh if iproute2 too old Alessio Faina
  2026-08-25  8:39 ` Hangbin Liu
@ 2026-08-25 22:01 ` Andrea Mayer
  1 sibling, 0 replies; 4+ messages in thread
From: Andrea Mayer @ 2026-08-25 22:01 UTC (permalink / raw)
  To: Alessio Faina
  Cc: davem, edumazet, kuba, pabeni, horms, shuah, netdev,
	linux-kselftest, linux-kernel, hangbin.liu, stefano.salsano,
	Andrea Mayer

On Mon, 24 Aug 2026 11:15:37 +0200
Alessio Faina <alessio.faina@canonical.com> wrote:

Hi Alessio,

Thanks for the patch.

> In case iproute2 is older than version 5.14.0, released ~Sept 1, 2021,
> the End.DT4/DT6/DX4/DX6 support are not available and the tests
> contained in the following 4 test files
>  - srv6_end_dt4_l3vpn_test.sh
>  - srv6_end_dt6_l3vpn_test.sh
>  - srv6_end_dx4_netfilter_test.sh
>  - srv6_end_dx6_netfilter_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 required
> feature and, if not, just skip the entire test to avoid a failure.
> 

Which kernel were you running when you saw these failures?

Did the ip route add commands that install the seg6local routes fail
there, and if so, with which error?

Ciao
Andrea

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-25 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-24  9:15 [PATCH net] selftest/net: skip srv6_end_d[t/x][4/6]_*_test.sh if iproute2 too old Alessio Faina
2026-08-25  8:39 ` Hangbin Liu
2026-08-25  8:45   ` Hangbin Liu
2026-08-25 22:01 ` Andrea Mayer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox