Make sure the capture is up before continuing the test.
A similar fix was committed earlier via 6c4ffe5f111f
("system-test: Use OVS_WAIT_UNTIL for tcpdump start instead
fo sleep") but other tests were added in the meantime.

Suggested-by: Xavier Simonart <[email protected]>
Fixes: 086744a645a7 ("northd: Use LB port_str in northd.")
Reported-at: https://issues.redhat.com/browse/FDP-192
Signed-off-by: Dumitru Ceara <[email protected]>
---
NOTE: we should probably try to find a unified way of using tcpdump
throughout the test suite.  However, since the LB template tests fail
quite often in CI, I'd like to find a quick fix for them for now so that
we simplify the work maintainers have to do on every patch.
---
 tests/system-ovn.at | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index c454526073..58c3142d7f 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -9213,8 +9213,9 @@ name: 'vport4' value: '999'
 NETNS_DAEMONIZE([vm1], [nc -k -l 42.42.42.2 4242], [nc-vm1.pid])
 
 NETNS_DAEMONIZE([vm1],
-    [tcpdump -n -i vm1 -nnleX -c6 udp and dst 42.42.42.2 and dst port 4343 > 
vm1.pcap 2>/dev/null],
+    [tcpdump -n -i vm1 -nnleX -c6 udp and dst 42.42.42.2 and dst port 4343 > 
vm1.pcap 2> vm1.pcap.stderr],
     [tcpdump1.pid])
+OVS_WAIT_UNTIL([grep "listening" vm1.pcap.stderr])
 
 # Make sure connecting to the VIP works (hairpin, via ls and via lr).
 NS_CHECK_EXEC([vm1], [nc 66.66.66.66 666 -z], [0], [ignore], [ignore])
@@ -9364,8 +9365,9 @@ name: 'vport4' value: '999'
 NETNS_DAEMONIZE([vm1], [nc -k -l 4242::2 4242], [nc-vm1.pid])
 
 NETNS_DAEMONIZE([vm1],
-    [tcpdump -n -i vm1 -nnleX -c6 udp and dst 4242::2 and dst port 4343 > 
vm1.pcap 2>/dev/null],
+    [tcpdump -n -i vm1 -nnleX -c6 udp and dst 4242::2 and dst port 4343 > 
vm1.pcap 2> vm1.pcap.stderr],
     [tcpdump1.pid])
+OVS_WAIT_UNTIL([grep "listening" vm1.pcap.stderr])
 
 # Make sure connecting to the VIP works (hairpin, via ls and via lr).
 NS_CHECK_EXEC([vm1], [nc 6666::1 666 -z], [0], [ignore], [ignore])
-- 
2.39.3

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to