* [PATCH net] selftests: openvswitch: fix tcpdump execution
@ 2024-12-17 21:16 Adrian Moreno
2024-12-18 10:08 ` [ovs-dev] " Eelco Chaudron
2024-12-19 3:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Adrian Moreno @ 2024-12-17 21:16 UTC (permalink / raw)
To: linux-kselftest
Cc: Adrian Moreno, Pravin B Shelar, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman, Shuah Khan,
Aaron Conole, netdev, dev, linux-kernel
Fix the way tcpdump is executed by:
- Using the right variable for the namespace. Currently the use of the
empty "ns" makes the command fail.
- Waiting until it starts to capture to ensure the interesting traffic
is caught on slow systems.
- Using line-buffered output to ensure logs are available when the test
is paused with "-p". Otherwise the last chunk of data might only be
written when tcpdump is killed.
Fixes: 74cc26f416b9 ("selftests: openvswitch: add interface support")
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
---
tools/testing/selftests/net/openvswitch/openvswitch.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh
index cc0bfae2bafa..960e1ab4dd04 100755
--- a/tools/testing/selftests/net/openvswitch/openvswitch.sh
+++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh
@@ -171,8 +171,10 @@ ovs_add_netns_and_veths () {
ovs_add_if "$1" "$2" "$4" -u || return 1
fi
- [ $TRACING -eq 1 ] && ovs_netns_spawn_daemon "$1" "$ns" \
- tcpdump -i any -s 65535
+ if [ $TRACING -eq 1 ]; then
+ ovs_netns_spawn_daemon "$1" "$3" tcpdump -l -i any -s 6553
+ ovs_wait grep -q "listening on any" ${ovs_dir}/stderr
+ fi
return 0
}
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [ovs-dev] [PATCH net] selftests: openvswitch: fix tcpdump execution
2024-12-17 21:16 [PATCH net] selftests: openvswitch: fix tcpdump execution Adrian Moreno
@ 2024-12-18 10:08 ` Eelco Chaudron
2024-12-19 3:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Eelco Chaudron @ 2024-12-18 10:08 UTC (permalink / raw)
To: Adrian Moreno
Cc: linux-kselftest, dev, netdev, linux-kernel, Eric Dumazet,
Simon Horman, Jakub Kicinski, Paolo Abeni, Shuah Khan,
David S. Miller
On 17 Dec 2024, at 22:16, Adrian Moreno wrote:
> Fix the way tcpdump is executed by:
> - Using the right variable for the namespace. Currently the use of the
> empty "ns" makes the command fail.
> - Waiting until it starts to capture to ensure the interesting traffic
> is caught on slow systems.
> - Using line-buffered output to ensure logs are available when the test
> is paused with "-p". Otherwise the last chunk of data might only be
> written when tcpdump is killed.
>
> Fixes: 74cc26f416b9 ("selftests: openvswitch: add interface support")
> Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Thank for fixing this, the change looks good to me.
Acked-by: Eelco Chaudron <echaudro@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] selftests: openvswitch: fix tcpdump execution
2024-12-17 21:16 [PATCH net] selftests: openvswitch: fix tcpdump execution Adrian Moreno
2024-12-18 10:08 ` [ovs-dev] " Eelco Chaudron
@ 2024-12-19 3:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-12-19 3:30 UTC (permalink / raw)
To: Adrian Moreno
Cc: linux-kselftest, pshelar, davem, edumazet, kuba, pabeni, horms,
shuah, aconole, netdev, dev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 17 Dec 2024 22:16:51 +0100 you wrote:
> Fix the way tcpdump is executed by:
> - Using the right variable for the namespace. Currently the use of the
> empty "ns" makes the command fail.
> - Waiting until it starts to capture to ensure the interesting traffic
> is caught on slow systems.
> - Using line-buffered output to ensure logs are available when the test
> is paused with "-p". Otherwise the last chunk of data might only be
> written when tcpdump is killed.
>
> [...]
Here is the summary with links:
- [net] selftests: openvswitch: fix tcpdump execution
https://git.kernel.org/netdev/net/c/a17975992cc1
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-12-19 3:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-17 21:16 [PATCH net] selftests: openvswitch: fix tcpdump execution Adrian Moreno
2024-12-18 10:08 ` [ovs-dev] " Eelco Chaudron
2024-12-19 3:30 ` 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