Re: [PATCH net-next v6 5/6] selftests: seg6: verify PSP flavor on the installed probe route
From: Andrea Mayer
Date: Fri Dec 04 2026 - 23:17:12 EST
On Wed, 02 Dec 2026 16:46:31 +0800
Hangbin Liu <hangbin.liu@xxxxxxxxx> wrote:
> From: Hangbin Liu <liuhangbin@xxxxxxxxxx>
>
> Older kernels (v6.0) can accept an End PSP route while ignoring the
> flavor attribute. A successful route add then lets the selftest proceed,
> and the PSP tests fail instead of being skipped.
>
> Read back the probe route and check that it reports the requested
> flavor before running the tests.
>
> Split the probe into check_kernel_support() so the follow-up End.X
> tests can handle probe failure independently. Keep the existing
> kselftest skip behavior for End.
>
> Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxxx>
> [snip]
> -test_kernel_supp_or_ksft_skip()
> +check_kernel_support()
> {
> - local flavor="$1"
> + local action="$1"
> + local flavor="$2"
> local test_netns
> + local policy=()
Style nit: policy is assigned just below, so the "=()" is not really
needed. Just something to consider for a v7.
>
> test_netns="kflv-$(mktemp -u XXXXXXXX)"
> + policy=(action "${action}" flavors "${flavor}")
Reviewed-by: Andrea Mayer <andrea.mayer@xxxxxxxxxxx>
Thanks,
Andrea