selftests: forwarding: Make VXLAN ECN encap tests more robust
authorIdo Schimmel <idosch@nvidia.com>
Mon, 4 Mar 2024 09:56:11 +0000 (11:56 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 5 Mar 2024 17:18:13 +0000 (09:18 -0800)
commitf0008b04977a741b2fb9c5e220120f82a0e50aa8
treec3e93a2ab2fa94886000c13b2339fcbd46b7634f
parentdfbab74044be66852ebb9d4b2cbef2f082e82531
selftests: forwarding: Make VXLAN ECN encap tests more robust

These tests sometimes fail on the netdev CI because the expected number
of packets is larger than expected [1].

Make the tests more robust by specifically matching on VXLAN
encapsulated packets and allowing up to five stray packets instead of
just two.

[1]
 [...]
 # TEST: VXLAN: ECN encap: 0x00->0x00                                  [FAIL]
 # v1: Expected to capture 10 packets, got 13.
 # TEST: VXLAN: ECN encap: 0x01->0x01                                  [ OK ]
 # TEST: VXLAN: ECN encap: 0x02->0x02                                  [ OK ]
 # TEST: VXLAN: ECN encap: 0x03->0x02                                  [ OK ]
 [...]

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20240304095612.462900-6-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
tools/testing/selftests/net/forwarding/vxlan_bridge_1d_ipv6.sh