Skip to content

Commit d74c2ce

Browse files
simonartxavierdceara
authored andcommitted
tests: Fix macro OVN_CHECK_PACKETS_CONTAIN.
The macro had two issues: - It never used the third (optional) argument (command such as trim_zeros). - The default command was wrong, causing the test to always succeed. Fixes: 9857ef8 ("tests: fixed multiple tests not properly waiting for packets to be received") Signed-off-by: Xavier Simonart <xsimonar@redhat.com> Signed-off-by: Dumitru Ceara <dceara@redhat.com> (cherry picked from commit f5c3ffb)
1 parent 5538fe7 commit d74c2ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/ovn.at

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ m4_divert_text([PREPARE_TESTS],
7474
if [[ -n "$4" ]]; then
7575
cmd=$4
7676
else
77-
cmd=:
77+
cmd=cat
7878
fi
7979
OVS_WAIT_UNTIL(
8080
[$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $rcv_pcap > $rcv_text
@@ -169,7 +169,7 @@ m4_define([OVN_CHECK_PACKETS_REMOVE_BROADCAST],
169169
AT_CHECK([sort $rcv_text], [0], [expout], [ignore], [dump_diff__ "$1" "$2"])])
170170

171171
m4_define([OVN_CHECK_PACKETS_CONTAIN],
172-
[ovn_wait_packets__ "$1" "$2" "__file__:__line__"])
172+
[ovn_wait_packets__ "$1" "$2" "__file__:__line__" $3])
173173

174174
# OVN_CHECK_PACKETS_UNIQ succeeds if some expected packets are duplicated.
175175
# It fails if unexpected packets are received.

0 commit comments

Comments
 (0)