๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by netdev-bot+sashiko Sat, 28 Nov 2026 23:57
Re: [PATCH net-next v3 10/12] selftests: tc-testing: run dependsOn probes outside the test namespace
#23998
Author: netdev-bot+sashiko
Date: Sat, 28 Nov 2026 23:57
74 lines
10983 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] This patch adds a new stage string, 'probe'.

--

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

This patch runs a test's dependsOn probe under a new "probe" stage instead
of the "execute" stage. nsPlugin no longer prefixes the probe with
"ip netns exec tcut", so the probe runs in the base namespace. The README
stage list and AddingTestCases.txt are updated to match.

[ ... ]

> 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]
This isn't a bug, but should the plugin documentation also list the new
'probe' stage? With this change, every plugin's adjust_command() can now
receive 'probe' through exec_cmd()->pm.call_adjust_command(). The patch
adds it to the README stage list only.

The stage list in the ADJUST section of
creating-plugins/AddingPlugins.txt still reads:

    The stages are represented by the following strings:

        'pre'
        'setup'
        'command'
        'verify'
        'teardown'
        'post'

The commented template in TdcPlugin.adjust_command() also has no 'probe'
case:

        # if stage == 'pre':
        #     pass
        # elif stage == 'setup':
        #     pass
        # elif stage == 'execute':
        #     pass
        ...

The in-tree nsPlugin and valgrindPlugin both pass 'probe' through
unchanged, which is what this patch wants. A new plugin written from
either of these references would not know it can get 'probe' for
dependsOn commands, though.

Could AddingPlugins.txt and the TdcPlugin.py template be updated in the
same way as the README?

>          if p:
>              if (p.returncode != 0):
>                  res = TestResult(tidx['id'], tidx['name'])

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124221758.3230929-1-toddfreed%40meta.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads