Re: [PATCH v4 net-next 09/15] selftests: xsk: run one test case per xskxceiver invocation
flat view
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Date: 2026-10-22 15:44:32
Also in:
bpf
On Wed, Oct 21, 2026 at 03:01:45PM -0700, Jakub Kicinski wrote:
On Fri, 16 Oct 2026 19:43:32 +0200 Maciej Fijalkowski wrote:quoted
Replace test_xsk.sh and xsk_prereqs.sh with test_xsk.py, which runs xskxceiver once per mode and case, so that every case starts from a fresh process and a crash fails only its own case. A single case is also the unit that the next patch splits into RX and TX processes.diff --git a/MAINTAINERS b/MAINTAINERS index 1fc9eaedd744..6985a42bc09c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS@@ -29784,6 +29784,7 @@ F: include/uapi/linux/if_xdp.h F: include/uapi/linux/xdp_diag.h F: net/xdp/ F: tools/testing/selftests/net/*xsk* +F: tools/testing/selftests/net/lib/py/xsk.py F: tools/testing/selftests/net/lib/xsk/pylint has some complaints, about main(), I think? Could you make it clean?quoted
+++ b/tools/testing/selftests/net/lib/py/xsk.pyReally not loving the amount of "library" code added here. Do you need this just to run it over veth in net/ and over real HW in drivers/net/ ? Are the test cases very different?
Now that you bring this up, would be good to clarify expectations of this work. The lib input is what veth and hw runners share to avoid code repetition. The separation comes from a fact that we still want to cover SKB and DRV modes (via veth at net/test_xsk.py) and ZC mode is covered by drivers/net/hw/xsk.py. My assumption was that would not hurt much to carry common code within lib file. I might have been wrong tho.
I wonder if we could solve this by parameterizing the env class to use veth instead of netdevsim and then have unified tests?
Tell me more regarding the unified tests. Is that okay'ish to run veth-based tests from drivers/net/hw ? I thought it was not and I shared my insights on similar work which does the same kind of migration (xdp_features bpf->drivers/net/hw) and it seemed to be heavily veth dedicated - the bpf sh runner was basically veth based, but so does the xskxceiver and I moved away from this after Bjorn's input (turned out to be a good thing). each runner can have single ksft_run() call, right? So, do you think separate files for veth and hw runners is still okay? In veth runner I don't even instantiate NetDrvEpEnv as I have veth pair being created 'manually', however having a param similar to existing netdevsim one would be nice and xdp-features set could benefit from that as well.
quoted
+def xsk_wait_endpoint_exit(endpoint, label, timeout):odd, the existing cmd() / bkg() stuff doesn't work for you? It works for many other tests...
This has been mostly about grabbing output from failed cases, let me dig and see if bkg() is indeed enough or if we could adjust it. Good point!
-- pw-bot: cr