Skip to contentSkip to conversation

selftests: drv-net: Bring back tool() to driver __init__s

PATCH Applied Gal Pressman 3 participants 3 messages Jan 5 – Jan 7

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

PATCH 1/1 selftests: drv-net: Bring back tool() to driver __init__s

The pp_alloc_fail.py test (which doesn't run in NIPA CI?) uses tool, add back the import.

Resolves:
ImportError: cannot import name 'tool' from 'lib.py'

Fixes 68a052239fc4 ("selftests: drv-net: update remaining Python init files")
---
 tools/testing/selftests/drivers/net/hw/lib/py/__init__.py | 4 ++--
 tools/testing/selftests/net/lib/py/__init__.py            | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
tools/testing/selftests/drivers/net/hw/lib/py/__init__.py +2 -2
index 766bfc4ad842..d5d247eca6b7 100644
@@ -22,7 +22,7 @@ try:
         NlError, RtnlFamily, DevlinkFamily, PSPFamily
     from net.lib.py import CmdExitFailure
     from net.lib.py import bkg, cmd, bpftool, bpftrace, defer, ethtool, \
-        fd_read_timeout, ip, rand_port, wait_port_listen, wait_file
+        fd_read_timeout, ip, rand_port, wait_port_listen, wait_file, tool
     from net.lib.py import KsftSkipEx, KsftFailEx, KsftXfailEx
     from net.lib.py import ksft_disruptive, ksft_exit, ksft_pr, ksft_run, \
         ksft_setup, ksft_variants, KsftNamedVariant
@@ -37,7 +37,7 @@ try:
                "CmdExitFailure",
                "bkg", "cmd", "bpftool", "bpftrace", "defer", "ethtool",
                "fd_read_timeout", "ip", "rand_port",
-               "wait_port_listen", "wait_file",
+               "wait_port_listen", "wait_file", "tool",
                "KsftSkipEx", "KsftFailEx", "KsftXfailEx",
                "ksft_disruptive", "ksft_exit", "ksft_pr", "ksft_run",
                "ksft_setup", "ksft_variants", "KsftNamedVariant",
tools/testing/selftests/net/lib/py/__init__.py +2 -2
index 40f9ce307dd1..f528b67639de 100644
@@ -13,7 +13,7 @@ from .ksft import KsftFailEx, KsftSkipEx, KsftXfailEx, ksft_pr, ksft_eq, \
 from .netns import NetNS, NetNSEnter
 from .nsim import NetdevSim, NetdevSimDev
 from .utils import CmdExitFailure, fd_read_timeout, cmd, bkg, defer, \
-    bpftool, ip, ethtool, bpftrace, rand_port, wait_port_listen, wait_file
+    bpftool, ip, ethtool, bpftrace, rand_port, wait_port_listen, wait_file, tool
 from .ynl import NlError, YnlFamily, EthtoolFamily, NetdevFamily, RtnlFamily, RtnlAddrFamily
 from .ynl import NetshaperFamily, DevlinkFamily, PSPFamily
 
@@ -26,7 +26,7 @@ __all__ = ["KSRC",
            "NetNS", "NetNSEnter",
            "CmdExitFailure", "fd_read_timeout", "cmd", "bkg", "defer",
            "bpftool", "ip", "ethtool", "bpftrace", "rand_port",
-           "wait_port_listen", "wait_file",
+           "wait_port_listen", "wait_file", "tool",
            "NetdevSim", "NetdevSimDev",
            "NetshaperFamily", "DevlinkFamily", "PSPFamily", "NlError",
            "YnlFamily", "EthtoolFamily", "NetdevFamily", "RtnlFamily",
Signature · 1 line
2.40.1
maintainer
#1 lore raw
Quoted 2 lines · On Mon, 5 Jan 2026 18:33:19 +0200 Gal Pressman wrote:

The pp_alloc_fail.py test (which doesn't run in NIPA CI?) uses tool, add back the import.

Nice catch! It does run on NIPA FWIW but HW tests must pass for a while before we start showing them in the main reports, so I guess this one never reached stability before it got broken :(

#2 lore raw
In reply to Gal Pressman
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

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

Quoted 11 lines · On Mon, 5 Jan 2026 18:33:19 +0200 you wrote:

The pp_alloc_fail.py test (which doesn't run in NIPA CI?) uses tool, add back the import.

Resolves:
ImportError: cannot import name 'tool' from 'lib.py'

Fixes 68a052239fc4 ("selftests: drv-net: update remaining Python init files")

[...]

Here is the summary with links:
- [net-next] selftests: drv-net: Bring back tool() to driver __init__s

    https://git.kernel.org/netdev/net/c/353cfc0ef3f3

You are awesome, thank you!

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