selftests: openvswitch: fix tcpdump execution
BugLink: https://bugs.launchpad.net/bugs/2102266
[ Upstream commit a17975992cc11588767175247ccaae1213a8b582 ]
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: 74cc26f416 ("selftests: openvswitch: add interface support")
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Link: https://patch.msgid.link/20241217211652.483016-1-amorenoz@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com>
This commit is contained in:
committed by
Mehmet Basaran
parent
76873d4582
commit
8e9bcde42e
@@ -128,8 +128,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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user