From: netdev-bot+sashiko@kernel.org
To: hangbin.liu@linux.dev
Cc: andrea.mayer@uniroma2.it, andrea@common-net.org,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, shuah@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, liuhangbin@kylinos.cn
Subject: Re: [PATCH net-next v3 4/5] selftest: seg6: explicit cleanup for SRv6 End PSP test
Date: Mon, 16 Nov 2026 12:29:51 +0000 [thread overview]
Message-ID: <179483219155.3136.11489476668944585319@kernel.org> (raw)
In-Reply-To: <20261112-srv6_flavors_endx-v3-4-c9177bbbd965@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] In tools/testing/selftests/net/srv6_end_flavors_test.sh, the
PSP defer scope does not remove everything the PSP block sets up.
- [Low] The commit message says the patch uses "defer and
defer_scopes_cleanup", but srv6_end_flavors_test.sh never calls…
--
selftest: seg6: explicit cleanup for SRv6 End PSP test
This commit adds defer calls to setup_rt_endpoint(), setup_rt_host_proxy()
and __setup_rt_policy() in srv6_end_flavors_test.sh. It also wraps the End
PSP setup and tests in a defer_scope_push/defer_scope_pop pair, so the
PSP-specific configuration is removed when that scope ends instead of at
namespace teardown.
> Use defer and defer_scopes_cleanup to remove the PSP specified
> configurations. i.e.
[Severity: Low]
Is this description accurate? The script never calls defer_scopes_cleanup.
The patch uses defer_scope_push and defer_scope_pop in the main script
body. The EXIT handler is unchanged:
trap cleanup EXIT
and cleanup() only deletes the namespaces. net/lib.sh does not install a
trap that runs pending defers either. If setup_end_flv_psp fails under
set -e before defer_scope_pop, the queued jobs are simply dropped.
This doesn't leak anything today, because every deferred command is an
ip -netns command and cleanup() deletes those namespaces anyway.
Could the commit message refer to defer_scope_push/defer_scope_pop instead?
> diff --git a/tools/testing/selftests/net/srv6_end_flavors_test.sh b/tools/testing/selftests/net/srv6_end_flavors_test.sh
> index 0ed5bfe99029b..374b43661c285 100755
> --- a/tools/testing/selftests/net/srv6_end_flavors_test.sh
> +++ b/tools/testing/selftests/net/srv6_end_flavors_test.sh
[ ... ]
> @@ -1460,11 +1470,13 @@ set +e
> router_tests
> host2gateway_tests
>
> +defer_scope_push
> set -e
> setup_end_flv_psp
> set +e
> host_srv6_end_flv_psp_tests
> host_srv6_end_flv_next_csid_psp_tests
> host_srv6_end_flv_consumed_srh_tests
> +defer_scope_pop
[Severity: Medium]
Does this scope pop leave the cafe::1:e9 and cafe::2:e9 addresses and
routes in place?
Inside this scope, setup_end_flv_psp() calls setup_hs_lo_addr() for both
hosts:
setup_hs_lo_addr 1 1 "${END_CSID_PSP_FUNC}"
setup_hs_lo_addr 2 2 "${END_CSID_PSP_FUNC}"
setup_hs_lo_addr() did not get any defer calls:
ip -netns "${hsname}" addr add "${addr}/128" dev lo nodad
ip -netns "${rtname}" -6 route \
add "${addr}" \
via "${IPv6_HS_NETWORK}::${hs}" dev "${RT2HS_DEVNAME}"
So after defer_scope_pop, hs-1 and hs-2 still have cafe::<hs>:e9/128 on lo,
and rt-1 and rt-2 still have their routes to those addresses. The commit
message lists the cafe::1:e9 and cafe::2:e9 routes as state this patch
removes.
A later block that calls setup_hs_lo_addr with the same suffix under set -e
would fail with EEXIST and be reported as a setup skip. Nothing fails yet:
the End.X block added later in the series ("selftests: seg6: add PSP
flavor testing for SRv6 End.X") uses a different suffix (a9). But
setup_hs_lo_addr() is still not deferred at the end of the series.
Would adding something like this to setup_hs_lo_addr() fix it?
defer ip -netns "${hsname}" addr del "${addr}/128" dev lo
defer ip -netns "${rtname}" -6 route del "${addr}"
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112-srv6_flavors_endx-v3-0-c9177bbbd965%40kylinos.cn
next prev parent reply other threads:[~2026-11-16 12:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 9:27 [PATCH net-next v3 0/5] seg6: add End.X PSP flavor support and selftests Hangbin Liu
2026-11-12 9:27 ` [PATCH net-next v3 1/5] seg6: split final End process out of flavor processing Hangbin Liu
2026-11-12 9:27 ` [PATCH net-next v3 2/5] seg6: add RFC8986 flavor support for End.X Hangbin Liu
2026-11-12 9:27 ` [PATCH net-next v3 3/5] selftests: seg6: move SRv6 End PSP setup into its own helper Hangbin Liu
2026-11-16 4:26 ` Andrea Mayer
2026-11-16 6:20 ` Hangbin Liu
2026-11-12 9:27 ` [PATCH net-next v3 4/5] selftest: seg6: explicit cleanup for SRv6 End PSP test Hangbin Liu
2026-11-16 4:34 ` Andrea Mayer
2026-11-16 6:27 ` Hangbin Liu
2026-11-16 12:29 ` netdev-bot+sashiko [this message]
2026-11-12 9:28 ` [PATCH net-next v3 5/5] selftests: seg6: add PSP flavor testing for SRv6 End.X Hangbin Liu
2026-11-16 12:29 ` netdev-bot+sashiko
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=179483219155.3136.11489476668944585319@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrea.mayer@uniroma2.it \
--cc=andrea@common-net.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hangbin.liu@linux.dev \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@kylinos.cn \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®