summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/forwarding/lib.sh
diff options
context:
space:
mode:
authorPetr Machata <petrm@nvidia.com>2024-08-07 16:13:49 +0200
committerJakub Kicinski <kuba@kernel.org>2024-08-12 17:50:34 -0700
commitbb89fdacf99ccbec4dfe2d04f76f870f1483d3ea (patch)
tree74b3fccd50d58a955cf88c10f636a019accab123 /tools/testing/selftests/net/forwarding/lib.sh
parent110d3ffe9d2b42c04faaf92c3fc627004e3328c6 (diff)
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 <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/c0c257c00ad30b07afc3fa5e2afd135925405544.1723036486.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/forwarding/lib.sh')
-rw-r--r--tools/testing/selftests/net/forwarding/lib.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index ff96bb7535ff..cb0fcd6f0293 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -509,6 +509,13 @@ xfail_on_slow()
fi
}
+omit_on_slow()
+{
+ if [[ $KSFT_MACHINE_SLOW != yes ]]; then
+ "$@"
+ fi
+}
+
xfail_on_veth()
{
local dev=$1; shift