* [PATCH net] selftests: cmsg_ipv6: repeat the exact packet
@ 2024-02-04 16:56 Jakub Kicinski
2024-02-06 18:08 ` Simon Horman
2024-02-07 13:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2024-02-04 16:56 UTC (permalink / raw)
To: davem; +Cc: netdev, edumazet, pabeni, Jakub Kicinski, shuah, linux-kselftest
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")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: shuah@kernel.org
CC: linux-kselftest@vger.kernel.org
---
tools/testing/selftests/net/cmsg_ipv6.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/cmsg_ipv6.sh b/tools/testing/selftests/net/cmsg_ipv6.sh
index f30bd57d5e38..8bc23fb4c82b 100755
--- a/tools/testing/selftests/net/cmsg_ipv6.sh
+++ b/tools/testing/selftests/net/cmsg_ipv6.sh
@@ -89,7 +89,7 @@ for ovr in setsock cmsg both diff; do
check_result $? 0 "TCLASS $prot $ovr - pass"
while [ -d /proc/$BG ]; do
- $NSEXE ./cmsg_sender -6 -p u $TGT6 1234
+ $NSEXE ./cmsg_sender -6 -p $p $m $((TOS2)) $TGT6 1234
done
tcpdump -r $TMPF -v 2>&1 | grep "class $TOS2" >> /dev/null
@@ -126,7 +126,7 @@ for ovr in setsock cmsg both diff; do
check_result $? 0 "HOPLIMIT $prot $ovr - pass"
while [ -d /proc/$BG ]; do
- $NSEXE ./cmsg_sender -6 -p u $TGT6 1234
+ $NSEXE ./cmsg_sender -6 -p $p $m $LIM $TGT6 1234
done
tcpdump -r $TMPF -v 2>&1 | grep "hlim $LIM[^0-9]" >> /dev/null
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net] selftests: cmsg_ipv6: repeat the exact packet
2024-02-04 16:56 [PATCH net] selftests: cmsg_ipv6: repeat the exact packet Jakub Kicinski
@ 2024-02-06 18:08 ` Simon Horman
2024-02-07 13:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-02-06 18:08 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, shuah, linux-kselftest
On Sun, Feb 04, 2024 at 08:56:18AM -0800, Jakub Kicinski wrote:
> 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")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
I'm not sure if it is important, but doesn't this also:
Fixes: 05ae83d5a4a2 ("selftests: net: test IPV6_HOPLIMIT")
In any case, this looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] selftests: cmsg_ipv6: repeat the exact packet
2024-02-04 16:56 [PATCH net] selftests: cmsg_ipv6: repeat the exact packet Jakub Kicinski
2024-02-06 18:08 ` Simon Horman
@ 2024-02-07 13:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-07 13:40 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, shuah, linux-kselftest
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Sun, 4 Feb 2024 08:56:18 -0800 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net] selftests: cmsg_ipv6: repeat the exact packet
https://git.kernel.org/netdev/net/c/4b00d0c513da
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-07 13:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-04 16:56 [PATCH net] selftests: cmsg_ipv6: repeat the exact packet Jakub Kicinski
2024-02-06 18:08 ` Simon Horman
2024-02-07 13:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).