selftests: cmsg_ipv6: repeat the exact packet
authorJakub Kicinski <kuba@kernel.org>
Sun, 4 Feb 2024 16:56:18 +0000 (08:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:10:50 +0000 (19:10 +0100)
commit84bfcb7774b6443ca6b317129a18e4a46c5c9983
treeb7aeb73b07e2b9873c29e916c3c109272b0cb73d
parent7e5ef49670766c9742ffcd9cead7cdb018268719
selftests: cmsg_ipv6: repeat the exact packet

[ Upstream commit 4b00d0c513da58b68df015968721b11396fe4ab3 ]

cmsg_ipv6 test requests tcpdump to capture 4 packets,
and sends until tcpdump quits. Only the first packet
is "real", however, and the rest are basic UDP packets.
So if tcpdump doesn't start in time it will miss
the real packet and only capture the UDP ones.

This makes the test fail on slow machine (no KVM or with
debug enabled) 100% of the time, while it passes in fast
environments.

Repeat the "real" / expected packet.

Fixes: 9657ad09e1fa ("selftests: net: test IPV6_TCLASS")
Fixes: 05ae83d5a4a2 ("selftests: net: test IPV6_HOPLIMIT")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/cmsg_ipv6.sh