|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3 |
|
| #
f802f172 |
| 14-Feb-2025 |
Petr Machata <[email protected]> |
selftests: forwarding: lib: Move require_command to net, generalize
This helper could be useful to more than just forwarding tests. Move it upstairs and port over to log_test_skip().
Split the func
selftests: forwarding: lib: Move require_command to net, generalize
This helper could be useful to more than just forwarding tests. Move it upstairs and port over to log_test_skip().
Split the function into two parts: the bit that actually checks and reports skip, which is in a new function check_command(). And a bit that exits the test script if the check fails. This allows users consistent checking behavior while giving an option to bail out from a single test without bailing out of the whole script.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Reviewed-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc2, v6.14-rc1, v6.13 |
|
| #
7a649f39 |
| 14-Jan-2025 |
Alessandro Zanni <[email protected]> |
selftests/net/forwarding: teamd command not found
Running "make kselftest TARGETS=net/forwarding" results in multiple ccurrences of the same error: - ./lib.sh: line 787: teamd: command not found
Th
selftests/net/forwarding: teamd command not found
Running "make kselftest TARGETS=net/forwarding" results in multiple ccurrences of the same error: - ./lib.sh: line 787: teamd: command not found
This patch adds the variable $REQUIRE_TEAMD in every test that uses the command teamd and checks the $REQUIRE_TEAMD variable in the file "lib.sh" to skip the test if the command is not installed.
Signed-off-by: Alessandro Zanni <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2 |
|
| #
d76ccb2e |
| 05-Dec-2024 |
Petr Machata <[email protected]> |
selftests: net: lib: Add several autodefer helpers
Add ip_link_set_addr(), ip_link_set_up(), ip_addr_add() and ip_route_add() to the suite of helpers that automatically schedule a corresponding clea
selftests: net: lib: Add several autodefer helpers
Add ip_link_set_addr(), ip_link_set_up(), ip_addr_add() and ip_route_add() to the suite of helpers that automatically schedule a corresponding cleanup.
When setting a new MAC, one needs to remember the old address first. Move mac_get() from forwarding/ to that end.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Reviewed-by: Nikolay Aleksandrov <[email protected]> Link: https://patch.msgid.link/add6bcbe30828fd01363266df20c338cf13aaf25.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc1, v6.12 |
|
| #
46f6569c |
| 14-Nov-2024 |
Petr Machata <[email protected]> |
selftests: net: lib: Add kill_process
A number of selftests run processes in the background and need to kill them afterwards. Instead for everyone to open-code the kill / wait / redirect mantra, add
selftests: net: lib: Add kill_process
A number of selftests run processes in the background and need to kill them afterwards. Instead for everyone to open-code the kill / wait / redirect mantra, add a helper in net/lib.sh. Convert existing open-code sites.
Signed-off-by: Petr Machata <[email protected]> Acked-by: Shuah Khan <[email protected]> Reviewed-by: Amit Cohen <[email protected]> Link: https://patch.msgid.link/a9db102067d741c118f0bd93b10c75e2a34665ea.1731589511.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
af76b443 |
| 14-Nov-2024 |
Petr Machata <[email protected]> |
selftests: net: lib: Move checks from forwarding/lib.sh here
For logging to be useful, something has to set RET and retmsg by calling ret_set_ksft_status(). There is a suite of functions to that end
selftests: net: lib: Move checks from forwarding/lib.sh here
For logging to be useful, something has to set RET and retmsg by calling ret_set_ksft_status(). There is a suite of functions to that end in forwarding/lib: check_err, check_fail et.al. Move them to net/lib.sh so that every net test can use them.
Existing lib.sh users might be using these same names for their functions. However lib.sh is always sourced near the top of the file (checked), and whatever new definitions will simply override the ones provided by lib.sh.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Amit Cohen <[email protected]> Acked-by: Shuah Khan <[email protected]> Link: https://patch.msgid.link/f488a00dc85b8e0c1f3c71476b32b21b5189a847.1731589511.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
601d9d70 |
| 14-Nov-2024 |
Petr Machata <[email protected]> |
selftests: net: lib: Move tests_run from forwarding/lib.sh here
It would be good to use the same mechanism for scheduling and dispatching general net tests as the many forwarding tests already use.
selftests: net: lib: Move tests_run from forwarding/lib.sh here
It would be good to use the same mechanism for scheduling and dispatching general net tests as the many forwarding tests already use. To that end, move the logging helpers to net/lib.sh so that every net test can use them.
Existing lib.sh users might be using the name themselves. However lib.sh is always sourced near the top of the file (checked), and whatever new definition will simply override the one provided by lib.sh.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Amit Cohen <[email protected]> Acked-by: Shuah Khan <[email protected]> Link: https://patch.msgid.link/a6fc083486493425b2c61185c327845b6ce3233a.1731589511.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
b219bcfc |
| 14-Nov-2024 |
Petr Machata <[email protected]> |
selftests: net: lib: Move logging from forwarding/lib.sh here
Many net selftests invent their own logging helpers. These really should be in a library sourced by these tests. Currently forwarding/li
selftests: net: lib: Move logging from forwarding/lib.sh here
Many net selftests invent their own logging helpers. These really should be in a library sourced by these tests. Currently forwarding/lib.sh has a suite of perfectly fine logging helpers, but sourcing a forwarding/ library from a higher-level directory smells of layering violation. In this patch, move the logging helpers to net/lib.sh so that every net test can use them.
Together with the logging helpers, it's also necessary to move pause_on_fail(), and EXIT_STATUS and RET.
Existing lib.sh users might be using these same names for their functions or variables. However lib.sh is always sourced near the top of the file (checked), and whatever new definitions will simply override the ones provided by lib.sh.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Amit Cohen <[email protected]> Acked-by: Shuah Khan <[email protected]> Link: https://patch.msgid.link/edd3785a3bd72ffbe1409300989e993ee50ae98b.1731589511.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4 |
|
| #
0e07d5db |
| 17-Oct-2024 |
Petr Machata <[email protected]> |
selftests: forwarding: lib: Allow passing PID to stop_traffic()
Now that it is possible to schedule a deferral of stop_traffic() right after the traffic is started, we do not have to rely on the %%
selftests: forwarding: lib: Allow passing PID to stop_traffic()
Now that it is possible to schedule a deferral of stop_traffic() right after the traffic is started, we do not have to rely on the %% magic to kill the background process that was started last. Instead we can just give the PID explicitly. This makes it possible to start other background processes after the traffic is started without confusing the cleanup.
Signed-off-by: Petr Machata <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
b4b0549a |
| 17-Oct-2024 |
Petr Machata <[email protected]> |
selftests: forwarding: Add a fallback cleanup()
Consistent use of defers obviates the need for a separate test-specific cleanup function -- everything is just taken care of in defers. So in this pat
selftests: forwarding: Add a fallback cleanup()
Consistent use of defers obviates the need for a separate test-specific cleanup function -- everything is just taken care of in defers. So in this patch, introduce a cleanup() helper in the forwarding lib.sh, which calls just pre_cleanup() and defer_scopes_cleanup(). Selftests are obviously still free to override the function.
Since pre_cleanup() is too entangled with forwarding-specific minutia, the function cannot currently be in net/lib.sh.
Signed-off-by: Petr Machata <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
a6e263f1 |
| 17-Oct-2024 |
Petr Machata <[email protected]> |
selftests: net: lib: Introduce deferred commands
In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule cleanup with defer()"), a defer helper was added to Python selftests. The idea i
selftests: net: lib: Introduce deferred commands
In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule cleanup with defer()"), a defer helper was added to Python selftests. The idea is to keep cleanup commands close to their dirtying counterparts, thereby making it more transparent what is cleaning up what, making it harder to miss a cleanup, and make the whole cleanup business exception safe. All these benefits are applicable to bash as well, exception safety can be interpreted in terms of safety vs. a SIGINT.
This patch therefore introduces a framework of several helpers that serve to schedule cleanups in bash selftests:
- defer_scope_push(), defer_scope_pop(): Deferred statements can be batched together in scopes. When a scope is popped, the deferred commands scheduled in that scope are executed in the order opposite to order of their scheduling.
- defer(): Schedules a defer to the most recently pushed scope (or the default scope if none was pushed.)
- defer_prio(): Schedules a defer on the priority track. The priority defer queue is run before the default defer queue when scope is popped.
The issue that this is addressing is specifically the one of restoring devlink shared buffer threshold type. When setting up static thresholds, one has to first change the threshold type to static, then override the individual thresholds. When cleaning up, it would be natural to reset the threshold values first, then change the threshold type. But the values that are valid for dynamic thresholds are generally invalid for static thresholds and vice versa. Attempts to restore the values first would be bounced. Thus one has to first reset the threshold type, then adjust the thresholds.
(You could argue that the shared buffer threshold type API is broken and you would be right, but here we are.)
This cannot be solved by pure defers easily. I considered making it possible to disable an existing defer, so that one could then schedule a new defer and disable the original. But this forward-shifting of the defer job would have to take place after every threshold-adjusting command, which would make it very awkward to schedule these jobs.
- defer_scopes_cleanup(): Pops any unpopped scopes, including the default one. The selftests that use defer should run this in their exit trap. This is important to get cleanups of interrupted scripts.
- in_defer_scope(): Sometimes a function would like to introduce a new defer scope, then run whatever it is that it wants to run, and then pop the scope to run the deferred cleanups. The helper in_defer_scope() can be used to run another command within such environment, such that any scheduled defers run after the command finishes.
The framework is added as a separate file lib/sh/defer.sh so that it can be used by all bash selftests, including those that do not currently use lib.sh. lib.sh however includes the file by default, because ideally all tests would use these helpers instead of hand-rolling their cleanups.
Signed-off-by: Petr Machata <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4 |
|
| #
9aa3749c |
| 15-Aug-2024 |
Vladimir Oltean <[email protected]> |
selftests: net: local_termination: don't use xfail_on_veth()
xfail_on_veth() for this test is an incorrect approximation which gives false positives and false negatives.
When local_termination fail
selftests: net: local_termination: don't use xfail_on_veth()
xfail_on_veth() for this test is an incorrect approximation which gives false positives and false negatives.
When local_termination fails with "reception succeeded, but should have failed", it is because the DUT ($h2) accepts packets even when not configured as promiscuous. This is not something specific to veth; even the bridge behaves that way, but this is not captured by the xfail_on_veth test.
The IFF_UNICAST_FLT flag is not explicitly exported to user space, but it can somewhat be determined from the interface's behavior. We have to create a macvlan upper with a different MAC address. This forces a dev_uc_add() call in the kernel. When the unicast filtering list is not empty, but the device doesn't support IFF_UNICAST_FLT, __dev_set_rx_mode() force-enables promiscuity on the interface, to ensure correct behavior (that the requested address is received).
We can monitor the change in the promiscuity flag and infer from it whether the device supports unicast filtering.
There is no equivalent thing for allmulti, unfortunately. We never know what's hiding behind a device which has allmulti=off. Whether it will actually perform RX multicast filtering of unknown traffic is a strong "maybe". The bridge driver, for example, completely ignores the flag. We'll have to keep the xfail behavior, but instead of XFAIL on just veth, always XFAIL.
Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc3 |
|
| #
bb89fdac |
| 07-Aug-2024 |
Petr Machata <[email protected]> |
selftests: router_mpath_nh: Test 16-bit next hop weights
Add tests that exercise full 16 bits of NH weight.
To test the 255:65535, it is necessary to run more packets than for the other tests. On a
selftests: router_mpath_nh: Test 16-bit next hop weights
Add tests that exercise full 16 bits of NH weight.
To test the 255:65535, it is necessary to run more packets than for the other tests. On a debug kernel, the test can take up to a minute, therefore avoid the test when KSFT_MACHINE_SLOW.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Reviewed-by: David Ahern <[email protected]> Link: https://patch.msgid.link/c0c257c00ad30b07afc3fa5e2afd135925405544.1723036486.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6 |
|
| #
4e9cd3d0 |
| 27-Jun-2024 |
Petr Machata <[email protected]> |
selftests: libs: Drop slow_path_trap_install()/_uninstall()
These functions are not used anymore.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Danielle Ratson <[email protected]>
selftests: libs: Drop slow_path_trap_install()/_uninstall()
These functions are not used anymore.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Danielle Ratson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
d5fbb2eb |
| 27-Jun-2024 |
Petr Machata <[email protected]> |
selftests: libs: Expand "$@" where possible
In some functions, argument-forwarding through "$@" without listing the individual arguments explicitly is fundamental to the operation of a function. E.g
selftests: libs: Expand "$@" where possible
In some functions, argument-forwarding through "$@" without listing the individual arguments explicitly is fundamental to the operation of a function. E.g. xfail_on_veth() should be able to run various tests in the fail-to-xfail regime, and usage of "$@" is appropriate as an abstraction mechanism. For functions such as simple_if_init(), $@ is a handy way to pass an array.
In other functions, it's merely a mechanism to save some typing, which however ends up obscuring the real arguments and makes life hard for those that end up reading the code.
This patch adds some of the implicit function arguments and correspondingly expands $@'s. In several cases this will come in handy as following patches adjust the parameter lists.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Danielle Ratson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc5, v6.10-rc4, v6.10-rc3 |
|
| #
6f51aed3 |
| 07-Jun-2024 |
Petr Machata <[email protected]> |
selftests: forwarding: lib: Split sysctl_save() out of sysctl_set()
In order to be able to save the current value of a sysctl without changing it, split the relevant bit out of sysctl_set() into a n
selftests: forwarding: lib: Split sysctl_save() out of sysctl_set()
In order to be able to save the current value of a sysctl without changing it, split the relevant bit out of sysctl_set() into a new helper.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Reviewed-by: Nikolay Aleksandrov <[email protected]> Reviewed-by: David Ahern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc2, v6.10-rc1 |
|
| #
ea63ac14 |
| 17-May-2024 |
Hangbin Liu <[email protected]> |
selftests/net: use tc rule to filter the na packet
Test arp_ndisc_untracked_subnets use tcpdump to filter the unsolicited and untracked na messages. It set -e before calling tcpdump. But if tcpdump
selftests/net: use tc rule to filter the na packet
Test arp_ndisc_untracked_subnets use tcpdump to filter the unsolicited and untracked na messages. It set -e before calling tcpdump. But if tcpdump filters 0 packet, it will return none zero, and cause the script to exit.
Instead of using slow tcpdump to capture packets, let's using tc rule to filter out the na message.
At the same time, fix function setup_v6 which only needs one parameter. Move all the related helpers from forwarding lib.sh to net lib.sh.
Fixes: 0ea7b0a454ca ("selftests: net: arp_ndisc_untracked_subnets: test for arp_accept and accept_untracked_na") Signed-off-by: Hangbin Liu <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.9 |
|
| #
cfc2eefd |
| 10-May-2024 |
Vladimir Oltean <[email protected]> |
selftests: net: use upstream mtools
Joachim kindly merged the IPv6 support in https://github.com/troglobit/mtools/pull/2, so we can just use his version now. A few more fixes subsequently came in fo
selftests: net: use upstream mtools
Joachim kindly merged the IPv6 support in https://github.com/troglobit/mtools/pull/2, so we can just use his version now. A few more fixes subsequently came in for IPv6, so even better.
Check that the deployed mtools version is 3.0 or above. Note that the version check breaks compatibility with my fork where I didn't bump the version, but I assume that won't be a problem.
Signed-off-by: Vladimir Oltean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc7, v6.9-rc6 |
|
| #
dae9dd5f |
| 24-Apr-2024 |
Jiri Pirko <[email protected]> |
selftests: forwarding: add wait_for_dev() helper
The existing setup_wait*() helper family check the status of the interface to be up. Introduce wait_for_dev() to wait for the netdevice to appear, fo
selftests: forwarding: add wait_for_dev() helper
The existing setup_wait*() helper family check the status of the interface to be up. Introduce wait_for_dev() to wait for the netdevice to appear, for example after test script does manual device bind.
Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Petr Machata <[email protected]> Reviewed-by: Benjamin Poirier <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
617198cb |
| 24-Apr-2024 |
Jiri Pirko <[email protected]> |
selftests: forwarding: add check_driver() helper
Add a helper to be used to check if the netdevice is backed by specified driver.
Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Benjamin P
selftests: forwarding: add check_driver() helper
Add a helper to be used to check if the netdevice is backed by specified driver.
Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Benjamin Poirier <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
41ad836e |
| 24-Apr-2024 |
Jiri Pirko <[email protected]> |
selftests: forwarding: add ability to assemble NETIFS array by driver name
Allow driver tests to work without specifying the netdevice names. Introduce a possibility to search for available netdevic
selftests: forwarding: add ability to assemble NETIFS array by driver name
Allow driver tests to work without specifying the netdevice names. Introduce a possibility to search for available netdevices according to set driver name. Allow test to specify the name by setting NETIF_FIND_DRIVER variable.
Note that user overrides this either by passing netdevice names on the command line or by declaring NETIFS array in custom forwarding.config configuration file.
Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Petr Machata <[email protected]> Reviewed-by: Benjamin Poirier <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc5, v6.9-rc4 |
|
| #
49297613 |
| 12-Apr-2024 |
Petr Machata <[email protected]> |
selftests: forwarding: bail_on_lldpad() should SKIP
$ksft_skip is used to mark selftests that have tooling issues. The fact that LLDPad is running, but shouldn't, is one such issue. Therefore have b
selftests: forwarding: bail_on_lldpad() should SKIP
$ksft_skip is used to mark selftests that have tooling issues. The fact that LLDPad is running, but shouldn't, is one such issue. Therefore have bail_on_lldpad() bail with $ksft_skip.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Benjamin Poirier <[email protected]> Reviewed-by: Hangbin Liu <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
2291752f |
| 12-Apr-2024 |
Petr Machata <[email protected]> |
selftests: forwarding: lib.sh: Validate NETIFS
The variable should contain at least NUM_NETIFS interfaces, stored as keys named "p$i", for i in `seq $NUM_NETIFS`.
Signed-off-by: Petr Machata <petrm
selftests: forwarding: lib.sh: Validate NETIFS
The variable should contain at least NUM_NETIFS interfaces, stored as keys named "p$i", for i in `seq $NUM_NETIFS`.
Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Benjamin Poirier <[email protected]> Reviewed-by: Hangbin Liu <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
a4022a33 |
| 12-Apr-2024 |
Petr Machata <[email protected]> |
selftests: net: Unify code of busywait() and slowwait()
Bodies of busywait() and slowwait() functions are almost identical. Extract the common code into a helper, loopy_wait, and convert busywait()
selftests: net: Unify code of busywait() and slowwait()
Bodies of busywait() and slowwait() functions are almost identical. Extract the common code into a helper, loopy_wait, and convert busywait() and slowwait() into trivial wrappers.
Moreover, the fact that slowwait() uses seconds for units is really not intuitive, and the comment does not help much. Instead make the unit part of the name of the argument to further clarify what units are expected.
Cc: Hangbin Liu <[email protected]> Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Benjamin Poirier <[email protected]> Reviewed-by: Hangbin Liu <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc3, v6.9-rc2 |
|
| #
6db870bb |
| 26-Mar-2024 |
Petr Machata <[email protected]> |
selftests: forwarding: router_mpath_nh_lib: Don't skip, xfail on veth
When the NH group stats tests are currently run on a veth topology, the HW-stats leg of each test is SKIP'ped. But kernel networ
selftests: forwarding: router_mpath_nh_lib: Don't skip, xfail on veth
When the NH group stats tests are currently run on a veth topology, the HW-stats leg of each test is SKIP'ped. But kernel networking CI interprets skips as a sign that tooling is missing, and prompts maintainer investigation. Lack of capability to pass a test should be expressed as XFAIL.
Selftests that require HW should normally be put in drivers/net/hw, but doing so for the NH counter selftests would just lead to a lot of duplicity.
So instead, introduce a helper, xfail_on_veth(), which can be used to mark selftests that should XFAIL instead of FAILing when run on a veth topology. On non-veth topology, they don't do anything.
Use the helper in the HW-stats part of router_mpath_nh_lib selftest.
Signed-off-by: Petr Machata <[email protected]> Link: https://lore.kernel.org/r/15f0ab9637aa0497f164ec30e83c1c8f53d53719.1711464583.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
e16a8d20 |
| 26-Mar-2024 |
Petr Machata <[email protected]> |
selftests: forwarding: Support for performance sensitive tests
Several tests in the suite use large amounts of traffic to e.g. cause congestion and evaluate RED or shaper performance. These tests wi
selftests: forwarding: Support for performance sensitive tests
Several tests in the suite use large amounts of traffic to e.g. cause congestion and evaluate RED or shaper performance. These tests will not run well on a slow machine, be it one with heavy debug kernel, or a VM, or e.g. a single-board computer. Allow users to specify an environment variable, KSFT_MACHINE_SLOW=yes, to indicate that the tests are being run on one such machine.
Performance sensitive tests can then use a new helper, xfail_on_slow(), to mark parts of the test that are sensitive to low-performance machines. The helper can be used to just mark the whole suite, like so:
xfail_on_slow tests_run
... or, on the other side of the granularity spectrum, to override individual checks:
xfail_on_slow check_err $? "Expected much, got little."
Signed-off-by: Petr Machata <[email protected]> Link: https://lore.kernel.org/r/99a376a2d2ffdaeee7752b1910cb0c3ea5d80fbe.1711464583.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|