All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [Devel] [PATCH vz10 1/3] selftests: drv-net: let NetDrvEnv take nsim_test
@ 2026-08-31 23:43 Eva Kurchatova
  2026-08-31 23:43 ` [Devel] [PATCH vz10 2/3] selftests: drv-net: run ping in its own netns Eva Kurchatova
  2026-08-31 23:43 ` [Devel] [PATCH vz10 3/3] selftests: drv-net: read the channel count over netlink Eva Kurchatova
  0 siblings, 2 replies; 3+ messages in thread
From: Eva Kurchatova @ 2026-08-31 23:43 UTC (permalink / raw)
  To: khorenko; +Cc: devel

rss_api.py opens its environment with

  with NetDrvEnv(__file__, nsim_test=False) as cfg:

NetDrvEnv hands every keyword it does not name to NetdevSimDev(), which
takes port_count, queue_count and ns only, so the test ends in

  TypeError: NetdevSimDev.__init__() got an unexpected
  keyword argument 'nsim_test'

The test came in with the RHEL10 import, commit 9f055df11343 ("rh10:
import RHEL10 kernel-6.12.0-211.16.1.el10"); the parameter it asks for
did not. Take the env.py hunk of commit 185646a8a0a8 ("selftests:
drv-net: add tests for napi IRQ affinity notifiers"), which added that
parameter upstream. The test that commit adds is left out, it needs a
real device.

https://virtuozzo.atlassian.net/browse/VSTOR-139651
Feature: fix vz selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
 tools/testing/selftests/drivers/net/lib/py/env.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/drivers/net/lib/py/env.py b/tools/testing/selftests/drivers/net/lib/py/env.py
index 987e452d3a45..4677c3df4ec6 100644
--- a/tools/testing/selftests/drivers/net/lib/py/env.py
+++ b/tools/testing/selftests/drivers/net/lib/py/env.py
@@ -38,14 +38,20 @@ class NetDrvEnv:
     """
     Class for a single NIC / host env, with no remote end
     """
-    def __init__(self, src_path, **kwargs):
+    def __init__(self, src_path, nsim_test=None, **kwargs):
         self._ns = None
 
         self.env = _load_env_file(src_path)
 
         if 'NETIF' in self.env:
+            if nsim_test is True:
+                raise KsftXfailEx("Test only works on netdevsim")
+
             self.dev = ip("link show dev " + self.env['NETIF'], json=True)[0]
         else:
+            if nsim_test is False:
+                raise KsftXfailEx("Test does not work on netdevsim")
+
             self._ns = NetdevSimDev(**kwargs)
             self.dev = self._ns.nsims[0].dev
         self.ifname = self.dev['ifname']
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-31 23:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 23:43 [Devel] [PATCH vz10 1/3] selftests: drv-net: let NetDrvEnv take nsim_test Eva Kurchatova
2026-08-31 23:43 ` [Devel] [PATCH vz10 2/3] selftests: drv-net: run ping in its own netns Eva Kurchatova
2026-08-31 23:43 ` [Devel] [PATCH vz10 3/3] selftests: drv-net: read the channel count over netlink Eva Kurchatova

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.