mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: vjardin@free.fr
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, donald.hunter@gmail.com,
	nicolas.dichtel@6wind.com, horms@kernel.org, corbet@lwn.net,
	skhan@linuxfoundation.org, rdunlap@infradead.org,
	shuah@kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next 5/5] selftests: net: add a scale test for LISP
Date: Fri, 27 Nov 2026 22:25:54 +0000	[thread overview]
Message-ID: <179581835452.3135.4676723835518066022@kernel.org> (raw)
In-Reply-To: <20261126-for-upstream-lisp-v1-v1-5-7382a4bcfd9b@free.fr>

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] The background loops in churn_test()
  (tools/testing/selftests/net/lisp_scale.sh) can be left running when…
- [Low] The sub-tests in tools/testing/selftests/net/lisp_scale.sh depend
  on each other through hard-coded state.

--

selftests: net: add a scale test for LISP

This adds lisp_scale.sh, a selftest that installs the mappings of many
remote sites on one LISP device of an xTR. Each site gets one nexthop and
four EID routes, and a second namespace stands in for all the sites. The
sub-tests cover counters, RLOC moves and replacements, withdrawals, churn
under traffic, and taking the device down and deleting it.

> diff --git a/tools/testing/selftests/net/lisp_scale.sh b/tools/testing/selftests/net/lisp_scale.sh
> new file mode 100755
> index 0000000000000..badba6491a42c
> --- /dev/null
> +++ b/tools/testing/selftests/net/lisp_scale.sh
> @@ -0,0 +1,532 @@

[ ... ]

> +churn_test()
> +{
> +	local loops=()
> +	local pids=()
> +	local rounds=0
> +	local site
> +	local out
> +	local pid
> +
> +	RET=0
> +
> +	out=$(mktemp -d)

[ ... ]

> +	for site in 5000 5001; do
> +		while :; do
> +			ip netns exec "$x1" ping -q -f -w 1 -I site \
> +				"$(site_eid4 "$site")"
> +			ip netns exec "$x1" ping -q -f -w 1 -I site \
> +				"$(site_eid6 "$site")"
> +		done > /dev/null 2>&1 &
> +		loops+=($!)
> +	done

[Severity: Medium]
If the script exits before churn_test() reaches its kill_process loop,
what stops these while : loops?

The loop subshells run in the init netns, and their PIDs are kept only in
the local loops array. The EXIT trap only runs this:

cleanup()
{
	cleanup_all_ns
}

cleanup_ns() in lib.sh kills only the processes listed by "ip netns pids"
for the namespace and then deletes it, so it never touches these subshells.

Suppose the script gets Ctrl-C while the churn loop is running. In a
non-interactive shell, background commands ignore SIGINT. A SIGTERM sent
only to the script PID has the same effect. In both cases x1 is deleted
and every "ip netns exec $x1" then fails at once.

Would the two loops then keep forking failing ip processes until someone
kills them by hand?

The kselftest runner timeout signals the whole process group, so this
mostly affects manual interruption and harnesses that signal only the
script PID.

The mktemp -d directory in $out would also be left behind, because
rm -rf "$out" only runs on the normal path.

Could the loop kill and the rm -rf be registered with the lib.sh defer
helpers? tests_run() already wraps each test in in_defer_scope.
Alternatively, the PIDs and $out could live in globals that cleanup()
handles, or the loops could stop at a deadline instead of using while :.

[ ... ]

> +	rm -rf "$out"
> +
> +	(( $(count_nexthops) == LISP_SITES - 1100 ))
> +	check_err $? "unexpected count of nexthops"

[Severity: Low]
Does churn_test() need to depend on what withdraw_test() did here?

The 1100 comes from withdraw_test() deleting the nexthops of sites
3000..3999 and then 4000..4099:

	sites_batch "" 4000 4100 'printf "nexthop del id %d\n", nh'

churn_test() deletes and re-adds sites 5000..5199, so it does not change
the total. This check just repeats the one at the end of withdraw_test().
move_test() also asserts count_nexthops == LISP_SITES, and most sub-tests
rely on the sites created by install_test().

tests_run() in lib.sh iterates ${TESTS:-$ALL_TESTS}, so a subset can be
run. With TESTS=churn_test, this check would fail, and sites 5500/5501
would not exist, even if the churn handling itself works.

withdraw_test() sends its deletions through ip -batch without -force. If
it fails partway, the same problem would be reported again here as an
unexpected count of nexthops.

Could this cross-test count be dropped, or compared against a count taken
at the start of churn_test()?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261126-for-upstream-lisp-v1-v1-0-7382a4bcfd9b%40free.fr

  reply	other threads:[~2026-11-27 22:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 21:37 [PATCH net-next 0/5] lisp: add a LISP (RFC 9300) tunnel device Vincent Jardin via B4 Relay
2026-11-26 21:37 ` [PATCH net-next 1/5] lisp: add LISP (Locator/ID Separation Protocol) Vincent Jardin via B4 Relay
2026-11-27 22:25   ` netdev-bot+sashiko
2026-11-26 21:37 ` [PATCH net-next 2/5] netlink: specs: rt-link: add the lisp link type Vincent Jardin via B4 Relay
2026-11-26 21:37 ` [PATCH net-next 3/5] docs: net: document the LISP devices Vincent Jardin via B4 Relay
2026-11-27 22:25   ` netdev-bot+sashiko
2026-11-26 21:37 ` [PATCH net-next 4/5] selftests: net: add a test of " Vincent Jardin via B4 Relay
2026-11-27 22:25   ` netdev-bot+sashiko
2026-11-26 21:37 ` [PATCH net-next 5/5] selftests: net: add a scale test for LISP Vincent Jardin via B4 Relay
2026-11-27 22:25   ` netdev-bot+sashiko [this message]
2026-11-27 10:24 ` [PATCH net-next 0/5] lisp: add a LISP (RFC 9300) tunnel device Matthieu Baerts
2026-11-27 22:47   ` Vincent Jardin

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=179581835452.3135.4676723835518066022@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=pabeni@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=vjardin@free.fr \
    /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®