mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
selftests: drv-net: rss_input_xfrm: Check test prerequisites before running
Ensure the following prerequisites before executing the test: 1. 'socat' is installed on the remote host. 2. Python version supports socket.SO_INCOMING_CPU (available since v3.11). Skip the test if either prerequisite is not met. Reviewed-by: Nimrod Oren <noren@nvidia.com> Signed-off-by: Gal Pressman <gal@nvidia.com> Link: https://patch.msgid.link/20250430054801.750646-1-gal@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
0454b9057e
commit
c76bab22e9
1 changed files with 5 additions and 0 deletions
|
@ -32,6 +32,11 @@ def test_rss_input_xfrm(cfg, ipver):
|
|||
if multiprocessing.cpu_count() < 2:
|
||||
raise KsftSkipEx("Need at least two CPUs to test symmetric RSS hash")
|
||||
|
||||
cfg.require_cmd("socat", remote=True)
|
||||
|
||||
if not hasattr(socket, "SO_INCOMING_CPU"):
|
||||
raise KsftSkipEx("socket.SO_INCOMING_CPU was added in Python 3.11")
|
||||
|
||||
input_xfrm = cfg.ethnl.rss_get(
|
||||
{'header': {'dev-name': cfg.ifname}}).get('input_xfrm')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue