Skip to content

Commit

Permalink
system-test: Fix tcpdump usage in LB template tests.
Browse files Browse the repository at this point in the history
Make sure the capture is up before continuing the test.
A similar fix was committed earlier via 6c4ffe5
("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: 086744a ("northd: Use LB port_str in northd.")
Reported-at: https://issues.redhat.com/browse/FDP-192
Signed-off-by: Dumitru Ceara <[email protected]>
Acked-by: Eelco Chaudron <[email protected]>
(cherry picked from commit b87e502)
  • Loading branch information
dceara committed Dec 7, 2023
1 parent 49d3362 commit 5141c9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/system-ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -9212,8 +9212,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])
Expand Down Expand Up @@ -9363,8 +9364,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])
Expand Down

0 comments on commit 5141c9d

Please sign in to comment.