Skip to content

Commit c76bab2

Browse files
gal-pressmankuba-moo
authored andcommitted
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 <[email protected]> Signed-off-by: Gal Pressman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 0454b90 commit c76bab2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/testing/selftests/drivers/net/hw/rss_input_xfrm.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ def test_rss_input_xfrm(cfg, ipver):
3232
if multiprocessing.cpu_count() < 2:
3333
raise KsftSkipEx("Need at least two CPUs to test symmetric RSS hash")
3434

35+
cfg.require_cmd("socat", remote=True)
36+
37+
if not hasattr(socket, "SO_INCOMING_CPU"):
38+
raise KsftSkipEx("socket.SO_INCOMING_CPU was added in Python 3.11")
39+
3540
input_xfrm = cfg.ethnl.rss_get(
3641
{'header': {'dev-name': cfg.ifname}}).get('input_xfrm')
3742

0 commit comments

Comments
 (0)