]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: forwarding: mirror_lib: Use mausezahn
authorPetr Machata <petrm@mellanox.com>
Fri, 29 May 2020 11:16:53 +0000 (14:16 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 May 2020 04:48:24 +0000 (21:48 -0700)
commita7b5a6f40e36239d374f22c6ac083b06811b5917
treeda836ddbabaf2c89ef59f18fc8455dec3bca1643
parent7b29bb8dd3a53db28a4a3383f2867169192d749d
selftests: forwarding: mirror_lib: Use mausezahn

Using ping in tests is error-prone, because ping is too smart. On a
flaky system (notably in a simulator), when packets don't come quickly
enough, more pings are sent, and that throws off counters. Instead use
mausezahn to generate ICMP echo request packets. That allows us to
send them in quicker succession as well, because the reason the ping
was made slow in the first place was to make the tests work on
simulated systems.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/mirror_lib.sh