| 15011a57 | 20-Nov-2025 |
Jakub Kicinski <kuba@kernel.org> |
selftests: net: py: read ip link info about remote dev
We're already saving the info about the local dev in env.dev for the tests, save remote dev as well. This is more symmetric, env generally prov
selftests: net: py: read ip link info about remote dev
We're already saving the info about the local dev in env.dev for the tests, save remote dev as well. This is more symmetric, env generally provides the same info for local and remote end.
While at it make sure that we reliably get the detailed info about the local dev. nsim used to read the dev info without -d.
Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20251120021024.2944527-8-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 6ae67f11 | 20-Nov-2025 |
Jakub Kicinski <kuba@kernel.org> |
selftests: net: py: add test variants
There's a lot of cases where we try to re-run the same code with different parameters. We currently need to either use a generator method or create a "main" cas
selftests: net: py: add test variants
There's a lot of cases where we try to re-run the same code with different parameters. We currently need to either use a generator method or create a "main" case implementation which then gets called by trivial case functions:
def _test(x, y, z): ...
def case_int(): _test(1, 2, 3)
def case_str(): _test('a', 'b', 'c')
Add support for variants, similar to kselftests_harness.h and a lot of other frameworks. Variants can be added as decorator to test functions:
@ksft_variants([(1, 2, 3), ('a', 'b', 'c')]) def case(x, y, z): ...
ksft_run() will auto-generate case names: case.1_2_3 case.a_b_c
Because the names may not always be pretty (and to avoid forcing classes to implement case-friendly __str__()) add a wrapper class KsftNamedVariant which lets the user specify the name for the variant.
Note that ksft_run's args are still supported. ksft_run splices args and variant params together.
Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Link: https://patch.msgid.link/20251120021024.2944527-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 80970e0f | 20-Nov-2025 |
Jakub Kicinski <kuba@kernel.org> |
selftests: net: py: extract the case generation logic
In preparation for adding test variants move the test case collection logic to a dedicated function. New helper returns
(function, args, name,
selftests: net: py: extract the case generation logic
In preparation for adding test variants move the test case collection logic to a dedicated function. New helper returns
(function, args, name, )
tuples. The main test loop can simply run them, not much logic or discernment needed.
Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20251120021024.2944527-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| fd2aadce | 14-Jul-2025 |
Breno Leitao <leitao@debian.org> |
selftests: drv-net: Strip '@' prefix from bpftrace map keys
The '@' prefix in bpftrace map keys is specific to bpftrace and can be safely removed when processing results. This patch modifies the bpf
selftests: drv-net: Strip '@' prefix from bpftrace map keys
The '@' prefix in bpftrace map keys is specific to bpftrace and can be safely removed when processing results. This patch modifies the bpftrace utility to strip the '@' from map keys before storing them in the result dictionary, making the keys more consistent with Python conventions.
Signed-off-by: Breno Leitao <leitao@debian.org> Link: https://patch.msgid.link/20250714-netpoll_test-v7-2-c0220cfaa63e@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| da87caba | 24-Feb-2025 |
Gal Pressman <gal@nvidia.com> |
selftests: drv-net-hw: Add a test for symmetric RSS hash
Add a selftest that verifies symmetric RSS hash is working as intended. The test runs iterations of traffic, swapping the src/dst UDP ports,
selftests: drv-net-hw: Add a test for symmetric RSS hash
Add a selftest that verifies symmetric RSS hash is working as intended. The test runs iterations of traffic, swapping the src/dst UDP ports, and verifies that the same RX queue is receiving the traffic in both cases.
Reviewed-by: Nimrod Oren <noren@nvidia.com> Signed-off-by: Gal Pressman <gal@nvidia.com> Link: https://patch.msgid.link/20250224174416.499070-5-gal@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|