mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01: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 <[email protected]> Signed-off-by: Gal Pressman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
1 parent
0454b9057e
commit
c76bab22e9
1 file changed
+5
@@ -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')
|
||||
|
||||
|
||||
Reference in new issue
Block a user