🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #23751

Re: [PATCH net-next 5/5] selftests: net: add a scale test for LISP

#23751
From: netdev-bot+sashiko
Date: Fri, 27 Nov 2026 22:25
129 lines
12394 bytes
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
Technical Details
Message-ID: <179581835452.3135.4676723835518066022@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372962-linux-kernel-netdev=dewy.ru
References: <20261126-for-upstream-lisp-v1-v1-5-7382a4bcfd9b@free.fr>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372962-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 5/5] selftests: net: add a scale test for LISP
Date: Fri, 27 Nov 2026 22:25:54 +0000
Organization: Usenet Network
Message-ID: <179581835452.3135.4676723835518066022@kernel.org>
References: <20261126-for-upstream-lisp-v1-v1-5-7382a4bcfd9b@free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="833293"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:bgoEC4Dct3FxTABr9fyf4dL903Q= sha256:MCg9lJalk+blwXbL2gg4+5oQpnJd+kC1cfuTMCwLHb8=
	sha1:JbuZfu/1BQKwvp9xpSPziw0lB2M= sha256:vz2lks4LXILCbl5nGXq1jUGeip+Sm0/Hvxs6bGf0erQ=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 589DB125DC5; Sat, 28 Nov 2026 01:26:18 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id LmBjitAMqU7g;
	Sat, 28 Nov 2026 01:26:15 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372962-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id BB6FF125F66; Sat, 28 Nov 2026 01:26:06 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id CD3062E768; Fri, 27 Nov 2026 22:25:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795818357;
	b=wl9lxFFvAbzptDW70jqPTveUJOjfxkJdCijCkrFEvMPMGI3KosqBstPUx0eG624Gq3Qb
	 A0SesvfqYMNeOAU/9+xHFvzNAuFIbvzvq2gAq/Ufm4HArlRUT0SaToNNVuDdiNK//ppJN
	 9eudbLZvvWBAcqr5v57QHkSdYlZn9B+6LCE+KS01mRakGxduu6uUzQB/ORREcKNLj2rdS
	 5ytHmyJp0UqQyVo9z1kISZDwyXxDrZ7cFyjBL6NRO4vAFKUiAgx+v+UpAUGl9l4vccFgY
	 BfkmKsc+vps9QqB5NGLXhvUFhk8CY1G1y6HLiu/Oa60JmvbYnZSJE81brpY+hRaqYiA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795818357;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=xJRmzNvq1O79iasY33Ckwg4qBT9YXe3i0Q0gMj2U+Y0=;
	b=bGVj1KGck7yKtaJxziXYe/+Qjc9UaIt9dmHH+ANXkxxhQQz5Ngk3et9hrp15PxTPRSXs
	 VjAJ1l0egcU8qw0Um0mO7i9c4Qgt6JGs13Z3QI62rL5v4SS5A2BI2Wz0w8DPoh+Ge3HKb
	 2c3B3Rf7KN2P9bDEGPt8snnw29g/hxhX5tbjPzUCpn3F0X677WmAgtuTvGeIC2mE/vD0x
	 IcIzQc2SxMr42h3k6b1lOVounRtyOEbHaS84wa363NenQoqfrBkByMz1hfgmHvxC1Im3r
	 J6ZG88WqlvafbdkrSWeFYqFV1ISXi12P4XL5yvVKZIa0c9qmHia1u0ZC9FXfmX0Kpog==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bJaBinNW;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 2AF55606A33D;
	Fri, 27 Nov 2026 22:25:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bJaBinNW
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795818356;
	b=1HW076wCJpRelGa5CLJyZyrCWe3QFUcuPeXyMUPgZLmn5lutnmaddulc8eY6y9Y+L7Gk
	 zRQa2iYvAEC2In/HlhyX1RGAIb9PP4LzIBMzijysBnd2fDSmt0JhuDb5tSp7sbSLSdFBj
	 ILEk2RcJX1t1anIIggxvJ9SFaOuQ0qTS3EluCfXGFpHBJWShNXswUyOyJTU0Ao5JU7Ip1
	 MqbF9+W/fBZWJW0Ejf5ByG/6UGVYhhBWfhNgWjjxWumJ2YORVoI+ndm1rJnqdn92U5y2K
	 4YEAfxOOovJ0oIvyTT47ldY83mcickRuxWuLzaFyTFV1QSidPEnbvQNGnvN+fXFQ9Ug==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795818356;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=xJRmzNvq1O79iasY33Ckwg4qBT9YXe3i0Q0gMj2U+Y0=;
	b=D8Phji+z2JF70V+DYtdkT/73q/aI722F1YsgZaqRdbfF04xFRilYcJnYr6JrFoQ5p8fv
	 aEtvmePqJmZa3al9IWFltlJvZanJW6Ohwww6gprze9/MaM84OJFEFgtvfSVH+kczTN4wt
	 d3qJY3LiV7XBt2e7aU48Z5l27uvLDLVIay8/t1SB0+1G7SlesaPQkNkjt+T6xHSDc2XLN
	 xpqX1KZkEi1sRD0mdkHb+osBiF/5CYp8y+FDNVcf2Zx/mIipF78S7OUycQnjqBhMEE0n4
	 uYGe5DXkVE0shv5FJW4vY8ONiYVj6kf0oocTgS4onUuEq+IYd0W07YHQ9OIc15FAopQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bJaBinNW;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 489DE606A326;
	Fri, 27 Nov 2026 22:25:56 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFB201F000C1;
	Fri, 27 Nov 2026 22:25:54 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795818355;
	bh=xJRmzNvq1O79iasY33Ckwg4qBT9YXe3i0Q0gMj2U+Y0=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=bJaBinNWkcj4mgWSBRNvCS2tKhK+mjiTKF8/RwIFfrUEoEZ9TPBx794qSrTZMYkc5
	 jK+9FYweOL3n/0mcVn9iwd/VqGiEH5vLpb5xlwr7QCPvrdMWjEKM+V4Ht0mLbCtcst
	 DjX1qDFxxUfOD5E0fGzf3HgV9E0jzovsvX15uOuFFu4OXHstxZO/rQXVZ8UusbFtlm
	 Mhw3rgTyISz1wVbpUnNo/pykEudYHEuU4HLurDv0K7pwv6hC+alot+VLM74PaFyi6n
	 LACjWqGLOiKH9gad8ggzRgfCM98iuCLF0nMhBc45Nnxg42so4zBOc+FCistgIH8wOM
	 0tbvreiVYG9zg==
X-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
X-In-Reply-To: <20261126-for-upstream-lisp-v1-v1-5-7382a4bcfd9b@free.fr>
X-sashiko-severity: Medium
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list