All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <hangbin.liu@linux.dev>
To: Alessio Faina <alessio.faina@canonical.com>
Cc: andrea.mayer@uniroma2.it, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, shuah@kernel.org, netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] selftest/net: skip srv6_end_d[t/x][4/6]_*_test.sh if iproute2 too old
Date: Tue, 25 Aug 2026 16:39:42 +0800	[thread overview]
Message-ID: <ao1Uzk6nLcQfkqff@fedora> (raw)
In-Reply-To: <20260824091537.2305107-1-alessio.faina@canonical.com>

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>

  reply	other threads:[~2026-08-25  8:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-08-25  8:45   ` Hangbin Liu
2026-08-25 22:01 ` Andrea Mayer
2026-08-26 11:49   ` Alessio Faina
2026-08-27  1:07     ` Andrea Mayer
2026-08-27  9:56       ` Alessio Faina
2026-08-28  2:23         ` Andrea Mayer
2026-08-28 16:04           ` Alessio Faina
2026-08-29 21:11             ` Andrea Mayer
2026-09-01 14:18               ` Alessio Faina
2026-09-02 18:25                 ` Andrea Mayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ao1Uzk6nLcQfkqff@fedora \
    --to=hangbin.liu@linux.dev \
    --cc=alessio.faina@canonical.com \
    --cc=andrea.mayer@uniroma2.it \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.