Skip to contentSkip to conversation

selftests: drv-net: rss_input_xfrm: Check test prerequisites before running

PATCH Applied Gal Pressman 2 participants 2 messages Apr 30, 2025 – May 2, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
Changelog -
v1->v2: https://lore.kernel.org/netdev/[email protected]/
* Use require_cmd() helper (Jakub).

---
 tools/testing/selftests/drivers/net/hw/rss_input_xfrm.py | 5 +++++
 1 file changed, 5 insertions(+)
tools/testing/selftests/drivers/net/hw/rss_input_xfrm.py +5 -0
index 53bb08cc29ec..f439c434ba36 100755
@@ -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')
 
Signature · 1 line
2.40.1
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Wed, 30 Apr 2025 08:48:01 +0300 you wrote:

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.

[...]

Here is the summary with links:
- [net-next,v2] selftests: drv-net: rss_input_xfrm: Check test prerequisites before running

    https://git.kernel.org/netdev/net-next/c/c76bab22e920

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html