]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: lib.sh: Add PING_COUNT to allow sending configurable amount of packets
authorAmit Cohen <amcohen@nvidia.com>
Tue, 21 Dec 2021 14:49:43 +0000 (16:49 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 23 Dec 2021 01:14:32 +0000 (17:14 -0800)
commit2ffb1a7037906795d6e7f04c54105cfd7b77d539
treeb9c318d2b427b067b5d164a2ddfb7b484bf3d885
parentb2ae2ac8de063594af04a7f9dafbd930a9761c12
selftests: lib.sh: Add PING_COUNT to allow sending configurable amount of packets

Currently `ping_do()` and `ping6_do()` send 10 packets.

There are cases that it is not possible to catch only the interesting
packets using tc rule, so then, it is possible to send many packets and
verify that at least this amount of packets hit the rule.

Add `PING_COUNT` variable, which is set to 10 by default, to allow tests
sending more than 10 packets using the existing ping API.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/lib.sh