mbox series

[net-next,0/2] selftests: forwarding: Two small changes

Message ID cover.1590749356.git.petrm@mellanox.com
Headers show
Series selftests: forwarding: Two small changes | expand

Message

Petr Machata May 29, 2020, 11:16 a.m. UTC
Two unrelated changes in this patchset:

- In patch #1, convert mirror tests from using ping directly to generating
  ICMP packets by 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. This was worked around in the past by just pinging more
  slowly, but using mausezahn avoids the issue as well without making the
  tests unnecessary slow.

- A missing stats_update callback was recently added to act_pedit. Now that
  iproute2 supports JSON dumping for pedit, extend in patch #2 the
  pedit_dsfield selftest with a check that would have caught the fact that
  the callback was missing.

Petr Machata (2):
  selftests: forwarding: mirror_lib: Use mausezahn
  selftests: forwarding: pedit_dsfield: Check counter value

 tools/testing/selftests/net/forwarding/mirror_lib.sh    | 6 ++----
 tools/testing/selftests/net/forwarding/pedit_dsfield.sh | 7 ++++++-
 2 files changed, 8 insertions(+), 5 deletions(-)

Comments

David Miller May 31, 2020, 4:49 a.m. UTC | #1
From: Petr Machata <petrm@mellanox.com>
Date: Fri, 29 May 2020 14:16:52 +0300

> Two unrelated changes in this patchset:
> 
> - In patch #1, convert mirror tests from using ping directly to generating
>   ICMP packets by 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. This was worked around in the past by just pinging more
>   slowly, but using mausezahn avoids the issue as well without making the
>   tests unnecessary slow.
> 
> - A missing stats_update callback was recently added to act_pedit. Now that
>   iproute2 supports JSON dumping for pedit, extend in patch #2 the
>   pedit_dsfield selftest with a check that would have caught the fact that
>   the callback was missing.

Series applied, thanks.