From: Jakub Kicinski <kuba@kernel.org>
To: michael.chan@broadcom.com, pavan.chebbi@broadcom.com
Cc: willemdebruijn.kernel@gmail.com, netdev@vger.kernel.org,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
Jakub Kicinski <kuba@kernel.org>,
shuah@kernel.org, mohan.prasad@microchip.com, sdf@fomichev.me,
dw@davidwei.uk, linux-kselftest@vger.kernel.org
Subject: [RFC net-next 5/6] selftests: drv-net: import things in lib one by one
Date: Mon, 9 Jun 2025 10:34:41 -0700 [thread overview]
Message-ID: <20250609173442.1745856-6-kuba@kernel.org> (raw)
In-Reply-To: <20250609173442.1745856-1-kuba@kernel.org>
pylint doesn't understand our path hacks, and it generates a lot
of warnings for driver tests. Import what we use one by one, this
is hopefully not too tedious and it makes pylint happy.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: shuah@kernel.org
CC: mohan.prasad@microchip.com
CC: sdf@fomichev.me
CC: dw@davidwei.uk
CC: linux-kselftest@vger.kernel.org
---
.../selftests/drivers/net/hw/lib/py/__init__.py | 17 +++++++++++++++++
.../selftests/drivers/net/lib/py/__init__.py | 14 ++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/tools/testing/selftests/drivers/net/hw/lib/py/__init__.py b/tools/testing/selftests/drivers/net/hw/lib/py/__init__.py
index b582885786f5..56ff11074b55 100644
--- a/tools/testing/selftests/drivers/net/hw/lib/py/__init__.py
+++ b/tools/testing/selftests/drivers/net/hw/lib/py/__init__.py
@@ -7,8 +7,25 @@ KSFT_DIR = (Path(__file__).parent / "../../../../..").resolve()
try:
sys.path.append(KSFT_DIR.as_posix())
+
from net.lib.py import *
from drivers.net.lib.py import *
+
+ # Import one by one to avoid pylint false positives
+ from net.lib.py import EthtoolFamily, NetdevFamily, NetshaperFamily, \
+ NlError, RtnlFamily
+ from net.lib.py import CmdExitFailure
+ from net.lib.py import bkg, cmd, defer, ethtool, fd_read_timeout, ip, \
+ rand_port, tool, wait_port_listen
+ from net.lib.py import fd_read_timeout
+ from net.lib.py import KsftSkipEx, KsftFailEx, KsftXfailEx
+ from net.lib.py import ksft_disruptive, ksft_exit, ksft_pr, ksft_run, \
+ ksft_setup
+ from net.lib.py import ksft_eq, ksft_ge, ksft_in, ksft_is, ksft_lt, \
+ ksft_ne, ksft_not_in, ksft_raises, ksft_true
+ from net.lib.py import NetNSEnter
+ from drivers.net.lib.py import GenerateTraffic
+ from drivers.net.lib.py import NetDrvEnv, NetDrvEpEnv
except ModuleNotFoundError as e:
ksft_pr("Failed importing `net` library from kernel sources")
ksft_pr(str(e))
diff --git a/tools/testing/selftests/drivers/net/lib/py/__init__.py b/tools/testing/selftests/drivers/net/lib/py/__init__.py
index 401e70f7f136..9ed1d8f70524 100644
--- a/tools/testing/selftests/drivers/net/lib/py/__init__.py
+++ b/tools/testing/selftests/drivers/net/lib/py/__init__.py
@@ -7,7 +7,21 @@ KSFT_DIR = (Path(__file__).parent / "../../../..").resolve()
try:
sys.path.append(KSFT_DIR.as_posix())
+
from net.lib.py import *
+
+ # Import one by one to avoid pylint false positives
+ from net.lib.py import EthtoolFamily, NetdevFamily, NetshaperFamily, \
+ NlError, RtnlFamily
+ from net.lib.py import CmdExitFailure
+ from net.lib.py import bkg, cmd, defer, ethtool, fd_read_timeout, ip, \
+ rand_port, tool, wait_port_listen
+ from net.lib.py import fd_read_timeout
+ from net.lib.py import KsftSkipEx, KsftFailEx, KsftXfailEx
+ from net.lib.py import ksft_disruptive, ksft_exit, ksft_pr, ksft_run, \
+ ksft_setup
+ from net.lib.py import ksft_eq, ksft_ge, ksft_in, ksft_is, ksft_lt, \
+ ksft_ne, ksft_not_in, ksft_raises, ksft_true
except ModuleNotFoundError as e:
ksft_pr("Failed importing `net` library from kernel sources")
ksft_pr(str(e))
--
2.49.0
next prev parent reply other threads:[~2025-06-09 17:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 17:34 [RFC net-next 0/6] net: ethtool: support including Flow Label in the flow hash for RSS Jakub Kicinski
2025-06-09 17:34 ` [RFC net-next 1/6] net: ethtool: factor out the validation for ETHTOOL_SRXFH Jakub Kicinski
2025-06-09 17:34 ` [RFC net-next 2/6] net: ethtool: support including Flow Label in the flow hash for RSS Jakub Kicinski
2025-06-10 13:33 ` Willem de Bruijn
2025-06-09 17:34 ` [RFC net-next 3/6] eth: fbnic: support RSS on IPv6 Flow Label Jakub Kicinski
2025-06-09 17:34 ` [RFC net-next 4/6] eth: bnxt: " Jakub Kicinski
2025-06-09 18:24 ` Michael Chan
2025-06-09 18:44 ` Jakub Kicinski
2025-06-09 23:03 ` Michael Chan
2025-06-13 0:11 ` Michael Chan
2025-06-13 1:04 ` Jakub Kicinski
2025-06-23 4:20 ` Michael Chan
2025-06-09 17:34 ` Jakub Kicinski [this message]
2025-06-09 17:34 ` [RFC net-next 6/6] selftests: drv-net: add test for RSS on flow label Jakub Kicinski
2025-06-09 18:26 ` [RFC net-next 0/6] net: ethtool: support including Flow Label in the flow hash for RSS Andrew Lunn
2025-06-09 18:58 ` Jakub Kicinski
2025-06-09 19:30 ` Andrew Lunn
2025-06-09 19:53 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250609173442.1745856-6-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=mohan.prasad@microchip.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).