๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16515

Re: [PATCH net-next v1 13/15] selftests: tc-testing: run dependsOn probes outside the test namespace

#16515
From: netdev-bot+sashiko
Date: Sun, 15 Nov 2026 03:18
100 lines
12131 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The patch fixes a real regression but has no Fixes: tag.
- [Low] run_one_test() now passes a new stage string, 'probe', to every
  plugin's adjust_command(stage, command) hook.

--

selftests: tc-testing: run dependsOn probes outside the test namespace

This changes run_one_test() in tdc.py so the dependsOn probe is passed to
exec_cmd() with a new 'probe' stage instead of 'execute'. With that stage,
nsPlugin does not put "ip netns exec" in front of the probe, so the probe
runs in the base namespace and the probe-gated tests are no longer always
skipped.

> diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py
> index 511d66c36a2a0..541caf984519f 100755
> --- a/tools/testing/selftests/tc-testing/tdc.py
> +++ b/tools/testing/selftests/tc-testing/tdc.py
> @@ -399,7 +399,7 @@ def run_one_test(pm, args, index, tidx):
>      if 'dependsOn' in tidx:
>          if (args.verbose > 0):
>              print('probe command for test skip')
> -        (p, procout) = exec_cmd(tidx, args, pm, 'execute', tidx['dependsOn'])
> +        (p, procout) = exec_cmd(tidx, args, pm, 'probe', tidx['dependsOn'])

[Severity: Low]

Should this patch have a Fixes: tag?

The probe block came from commit 7f3f86402609 ("selftests: tc-testing: add
"depends_on" property to skip tests"). At that time nsPlugin used one
shared netns that was created ahead of time, so the probe worked.

Commit 98cfbe4234a4 ("selftests/tc-testing: localize test resources")
moved tests to per-test tcut-<random> namespaces. It also wrote the
'execute' stage call shown above. In run_one_test(), the probe still runs
before the per-test suffix is added:

    NAMES['NS'] = '{}-{}'.format(NAMES['NS'], tidx['random'])

It also runs before pm.call_pre_case() creates the namespace. As a result,
nsPlugin's adjust_command() wraps the probe in a netns exec for the bare
"tcut" name, and no namespace with that name is ever created.

Because of this, the mirred dependsOn probes added later in dcfaf1f758ee
("selftests/tc-testing: require an up to date iproute2 for blockcast
tests") could never pass.

Would this tag fit?

Fixes: 98cfbe4234a4 ("selftests/tc-testing: localize test resources")

[Severity: Low]

This passes a new stage string, 'probe', to the adjust_command() hook of
every plugin. Should the in-tree docs list it?

The stage list in tools/testing/selftests/tc-testing/README reads:

  The stages are identified by the following strings:

    - pre  (pre-suite)
    - setup
    - command
    - verify
    - teardown
    - post (post-suite)

creating-plugins/AddingPlugins.txt also leaves 'probe' out of both its
phase list and its "The stages are represented by the following strings"
list. The commented stage-dispatch template in TdcPlugin.adjust_command()
has no 'probe' branch either.

The dependsOn description in creating-testcases/AddingTestCases.txt only
says:

  dependsOn:    Same as 'skip', but the value is executed as a command. The test
                is skipped when the command returns non-zero.

Probes now run in the base namespace, outside the test netns. A future
dependsOn command that uses per-test devices such as $DEV0, $DEV1 or
$DUMMY would fail, and its test would just be skipped. Could this be noted
in the dependsOn description?

The fix also depends on plugins passing unknown stages through unchanged.
nsPlugin and valgrindPlugin both do that today.

The existing lists were already out of date ('command' rather than
'execute'). The missing 'probe' entry and the base-namespace behaviour of
dependsOn are new with this patch.

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261111005533.6436-1-toddfreed%40meta.com
Technical Details
Message-ID: <179471270808.2199510.6514314455565065109@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363544-linux-kernel-netdev=dewy.ru
References: <20261111005533.6436-14-toddfreed@meta.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363544-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v1 13/15] selftests: tc-testing: run dependsOn
 probes outside the test namespace
Date: Sun, 15 Nov 2026 03:18:28 +0000
Organization: Usenet Network
Message-ID: <179471270808.2199510.6514314455565065109@kernel.org>
References: <20261111005533.6436-14-toddfreed@meta.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1719669"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:/Bqe9R2c3cVzTcneSWdJRfSquWY= sha256:P3weUgID9BY0+BOMJ56EZaofJIrLb8Cr7NztfKGZEXA=
	sha1:NQb7o/ZBgWzasW2dsI7d7AkdcTM= sha256:Bi4+/6Cg3P3Qp5fvf7hLM5xeNFR6H1Gh3Cq1RD4n1eo=
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 0EB6511492A; Sun, 15 Nov 2026 06:20:24 +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 Yufp_AHmczBI;
	Sun, 15 Nov 2026 06:20:20 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-363544-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 C279F114924; Sun, 15 Nov 2026 06:20:11 +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 4072342AE3; Sun, 15 Nov 2026 03:19:54 +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=1794712715;
	b=wKTDK17GF5v5AEmIpFr2yY8+NWMoeXONWZ2a5hT2MBTCqvAxx446c90ljkbMBxuMecwA
	 PPpTZD5QBuR7onvvYD3BM8y3kk9iWXsd46qEyLk6EU6IxVLFHqGZ0F0JYmwZP3azV6wg2
	 KHW7vfAxuJDS7mmOAPjFdJ6pUSeIqUC1EmBKYI6WH8uSscn9Rk0KXHP3cel79L4GS5/J3
	 VSmZWRiy9b4bAnQ3wxRm+oXTGig1bH4Z+TqS1AjgWLhRuN78B7yPF2ZwQ65aM/HhURkA5
	 JJ1+RLg5XMBz0R+iReZte/mDIb/eL+5OczooVOac4XKdPYyRjy/BPE2aoijms0cu3+Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794712715;
	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=Xqkmq+KJ2/HtU3nnCQ54j5ML6laUMMrM5zulVXs75RE=;
	b=bUREaPhzH5sKGfu5DRXV6651M/IRdarkUkRyfO6KrM8kRzZCLGyJiMPqtUZDkvLx8998
	 YIiqxoMOhZVL+fQDOxM1HOIfKwvMt6/VYEPz9oxvkGnmgfKpZEPKP477qVuv+cbbasQjf
	 wJ+mfig1kPndq8SfBHTvXbAn0nzT0wZPgmAy1AG8MOLWDe+xEuzqxo0Yq8UWtkb3LJj11
	 aiiR+wD6x02aAFlw1x2StuaZ7YOwkPNtDhetFxUtFKclhx5hWcmKOUye/SM4quo1C6GeF
	 yAFWLG6ncR9Rtd6gIQX5/VeEt8yqeaTR92hSyK2mfIenxuXG03OCJfsb9aKBQC2tXkQ==
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=olyVM2U2;
	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 D56BD606B205;
	Sun, 15 Nov 2026 03:18:35 +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=olyVM2U2
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=1794712710;
	b=SG3Mwj2GoERnO9UWrdAKlxBYMIQ9nbpgmEI5583gC8Op5ru/2TyTsYqeVKZTgUJN3bcR
	 LcePwUbblFEbxtiZtsrdmc/o74AS+90Roh/Z/fRyqLwKwTw3lLS8B5LQTUNoWRldTXz5i
	 kxSZTLTHO7vDcCsTiC9Rh6v+YNCdePw+1GbF+D8Y0Wn574o2iTNiElvMxHEBenIezV6XM
	 AcDmFT8B/INmzdRxiSKgGEHZaPHLNH7luKIs/Mj++n83N/NfPZdgn6ckee8NhvXEQh6aM
	 qSD3bS/Le4sZNbQJCBB1nino4v4We5AncBmBydj+G8x8Xm+Lo1gYlCw5DmHQzSp5bUQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794712710;
	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=Xqkmq+KJ2/HtU3nnCQ54j5ML6laUMMrM5zulVXs75RE=;
	b=m3aOTNMuIpjdOxTR9Ibdeo28m3dbvKtnYvNVLP06IftrbCMMVid3AB5xChKKjZL3kMx+
	 bpPxIekqHufADT6G+tEKREW5s5LYk3gyJz/uvN5T1n1PBVfYt++T7eAHTCXdYsBznZ2Ng
	 xHZXxLy6sqrcJT2hPLAqsdPTF2+RFg9oK1rMlk7ufybOCkXR993eCabVSQkvz+E4D1qfi
	 qhzTEDYS27s+PabR38TcwHMbx5KzTN5amj5AeW+qjK4e+uzLRJjsFG2x6hZWW+GbyM8xg
	 hdtgTTnhr3vy9+M3SOtTVYgP2nd9y3+7H5RzhRdw6EG3Ygb1ey6a3HmrAe+YoQDevfg==
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=olyVM2U2;
	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 012CB606A891;
	Sun, 15 Nov 2026 03:18:29 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AB2A1F000D0;
	Sun, 15 Nov 2026 03:18:28 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794712709;
	bh=Xqkmq+KJ2/HtU3nnCQ54j5ML6laUMMrM5zulVXs75RE=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=olyVM2U2Aghqs20/HIhJGzxuOPZytZp20BXK6kDJZG7fEqVSYDHQfu9aHJgTG0O3S
	 tjTfvrSoLJW1mGGIRFh7fLTGgkUnB/u4EUzkL1RuPSaXzzt6cOPRF8jseKIfQ3sMv9
	 JzQ+3e7tVwVW4ToyOU+pWm9q1vF7uya1N0OIlLqlnYQeNXIa1uO2UNvTcIwZ0+Szmo
	 H3cJdRxlG8MHbSfZqFn6OBLryQX2l6kqMfItgEtybaVIvNEvUZv6hJ58G9B/kuBVaZ
	 MwWjTgAKVLl6TCtRlHRz1DxmjD0n63YI2y27hpyipZT90m7wT0VHA+0LSyvt/m/mOb
	 3jBWkkhpVdXtQ==
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, andrew+netdev@lunn.ch,
 bjorn@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net,
 daniel.zahka@gmail.com, donald.hunter@gmail.com, edumazet@kernel.org,
 kuba@kernel.org, jhs@mojatatu.com, jiri@resnulli.us, john.fastabend@gmail.com,
 linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
 linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org,
 martin.lau@linux.dev, pabeni@redhat.com, saeedm@nvidia.com, horms@kernel.org,
 tariqt@nvidia.com, weiwan@google.com, willemdebruijn.kernel@gmail.com
X-In-Reply-To: <20261111005533.6436-14-toddfreed@meta.com>
X-sashiko-severity: Low
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