Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'selftests-drv-net-fix-and-improve-command-requirement-checking'

Gal Pressman says:

====================
selftests: drv-net: Fix and improve command requirement checking

This series fixes remote command checking and cleans up command
requirement calls across tests.

The first patch fixes require_cmd() incorrectly checking commands
locally even when remote=True was specified due to a missing host
parameter.

The second patch makes require_cmd() usage explicit about local/remote
requirements, avoiding unnecessary test failures and consolidating
duplicate calls.
====================

Link: https://patch.msgid.link/20250723135454.649342-1-gal@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+6 -7
+1 -1
tools/testing/selftests/drivers/net/hw/rss_input_xfrm.py
··· 32 32 if multiprocessing.cpu_count() < 2: 33 33 raise KsftSkipEx("Need at least two CPUs to test symmetric RSS hash") 34 34 35 - cfg.require_cmd("socat", remote=True) 35 + cfg.require_cmd("socat", local=False, remote=True) 36 36 37 37 if not hasattr(socket, "SO_INCOMING_CPU"): 38 38 raise KsftSkipEx("socket.SO_INCOMING_CPU was added in Python 3.11")
+1 -1
tools/testing/selftests/drivers/net/hw/tso.py
··· 34 34 35 35 36 36 def run_one_stream(cfg, ipver, remote_v4, remote_v6, should_lso): 37 - cfg.require_cmd("socat", remote=True) 37 + cfg.require_cmd("socat", local=False, remote=True) 38 38 39 39 port = rand_port() 40 40 listen_cmd = f"socat -{ipver} -t 2 -u TCP-LISTEN:{port},reuseport /dev/null,ignoreeof"
+1 -1
tools/testing/selftests/drivers/net/lib/py/env.py
··· 259 259 if not self._require_cmd(comm, "local"): 260 260 raise KsftSkipEx("Test requires command: " + comm) 261 261 if remote: 262 - if not self._require_cmd(comm, "remote"): 262 + if not self._require_cmd(comm, "remote", host=self.remote): 263 263 raise KsftSkipEx("Test requires (remote) command: " + comm) 264 264 265 265 def wait_hw_stats_settle(self):
+1 -1
tools/testing/selftests/drivers/net/lib/py/load.py
··· 7 7 8 8 class GenerateTraffic: 9 9 def __init__(self, env, port=None): 10 - env.require_cmd("iperf3", remote=True) 10 + env.require_cmd("iperf3", local=True, remote=True) 11 11 12 12 self.env = env 13 13
+1 -1
tools/testing/selftests/drivers/net/ping.py
··· 30 30 cmd("ping -s 65000 -c 1 -W0.5 " + cfg.addr_v["6"], host=cfg.remote) 31 31 32 32 def _test_tcp(cfg) -> None: 33 - cfg.require_cmd("socat", remote=True) 33 + cfg.require_cmd("socat", local=False, remote=True) 34 34 35 35 port = rand_port() 36 36 listen_cmd = f"socat -{cfg.addr_ipver} -t 2 -u TCP-LISTEN:{port},reuseport STDOUT"