| de94e869 | 18-Feb-2025 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: store addresses in dict indexed by ipver
Looks like more and more tests want to iterate over IP version, run the same test over ipv4 and ipv6. The current naming of members in th
selftests: drv-net: store addresses in dict indexed by ipver
Looks like more and more tests want to iterate over IP version, run the same test over ipv4 and ipv6. The current naming of members in the env class makes it a bit awkward, we have separate members for ipv4 and ipv6 parameters.
Store the parameters inside dicts, so that tests can easily index them with ip version.
Reviewed-by: Willem de Bruijn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 3337064f | 07-Feb-2025 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: add helper for path resolution
Refering to C binaries from Python code is going to be a common need. Add a helper to convert from path in relation to the test. Meaning, if the te
selftests: drv-net: add helper for path resolution
Refering to C binaries from Python code is going to be a common need. Add a helper to convert from path in relation to the test. Meaning, if the test is in the same directory as the binary, the call would be simply: cfg.rpath("binary").
The helper name "rpath" is not great. I can't think of a better name that would be accurate yet concise.
Reviewed-by: Petr Machata <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| f898c16a | 26-Jun-2024 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: rss_ctx: add tests for RSS configuration and contexts
Add tests focusing on indirection table configuration and creating extra RSS contexts in drivers which support it.
$ expo
selftests: drv-net: rss_ctx: add tests for RSS configuration and contexts
Add tests focusing on indirection table configuration and creating extra RSS contexts in drivers which support it.
$ export NETIF=eth0 REMOTE_... $ ./drivers/net/hw/rss_ctx.py KTAP version 1 1..8 ok 1 rss_ctx.test_rss_key_indir ok 2 rss_ctx.test_rss_context ok 3 rss_ctx.test_rss_context4 # Increasing queue count 44 -> 66 # Failed to create context 32, trying to test what we got ok 4 rss_ctx.test_rss_context32 # SKIP Tested only 31 contexts, wanted 32 ok 5 rss_ctx.test_rss_context_overlap ok 6 rss_ctx.test_rss_context_overlap2 # .. sprays traffic like a headless chicken .. not ok 7 rss_ctx.test_rss_context_out_of_order ok 8 rss_ctx.test_rss_context4_create_with_cfg # Totals: pass:6 fail:1 xfail:0 xpass:0 skip:1 error:0
Note that rss_ctx.test_rss_context_out_of_order fails with the device I tested with, but it seems to be a device / driver bug.
Reviewed-by: Petr Machata <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 94fecaa6 | 26-Jun-2024 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: add ability to wait for at least N packets to load gen
Teach the load generator how to wait for at least given number of packets to be received. This will be useful for filtering
selftests: drv-net: add ability to wait for at least N packets to load gen
Teach the load generator how to wait for at least given number of packets to be received. This will be useful for filtering where we'll want to send a non-trivial number of packets and make sure they landed in right queues.
Reviewed-by: Breno Leitao <[email protected]> Reviewed-by: Petr Machata <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 340ab206 | 25-Apr-2024 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: validate the environment
Throw a slightly more helpful exception when env variables are partially populated. Prior to this change we'd get a dictionary key exception somewhere la
selftests: drv-net: validate the environment
Throw a slightly more helpful exception when env variables are partially populated. Prior to this change we'd get a dictionary key exception somewhere later on.
Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 31611cea | 20-Apr-2024 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: add a TCP ping test case (and useful helpers)
More complex tests often have to spawn a background process, like a server which will respond to requests or tcpdump.
Add support f
selftests: drv-net: add a TCP ping test case (and useful helpers)
More complex tests often have to spawn a background process, like a server which will respond to requests or tcpdump.
Add support for creating such processes using the with keyword:
with bkg("my-daemon", ..): # my-daemon is alive in this block
My initial thought was to add this support to cmd() directly but it runs the command in the constructor, so by the time we __enter__ it's too late to make sure we used "background=True".
Second useful helper transplanted from net_helper.sh is wait_port_listen().
The test itself uses socat, which insists on v6 addresses being wrapped in [], it's not the only command which requires this format, so add the wrapped address to env. The hope is to save test code from checking if address is v6.
Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 1880f272 | 20-Apr-2024 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: construct environment for running tests which require an endpoint
Nothing surprising here, hopefully. Wrap the variables from the environment into a class or spawn a netdevsim ba
selftests: drv-net: construct environment for running tests which require an endpoint
Nothing surprising here, hopefully. Wrap the variables from the environment into a class or spawn a netdevsim based env and pass it to the tests.
Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 54338929 | 20-Apr-2024 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: factor out parsing of the env
The tests with a remote end will use a different class, for clarity, but will also need to parse the env. So factor parsing the env out to a functio
selftests: drv-net: factor out parsing of the env
The tests with a remote end will use a different class, for clarity, but will also need to parse the env. So factor parsing the env out to a function.
Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|