Skip to content

Commit

Permalink
tests: Fix macro OVN_CHECK_PACKETS_CONTAIN.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Dumitru Ceara <[email protected]>
(cherry picked from commit f5c3ffb)
  • Loading branch information
simonartxavier authored and dceara committed Feb 12, 2024
1 parent 5538fe7 commit d74c2ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ m4_divert_text([PREPARE_TESTS],
if [[ -n "$4" ]]; then
cmd=$4
else
cmd=:
cmd=cat
fi
OVS_WAIT_UNTIL(
[$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $rcv_pcap > $rcv_text
Expand Down Expand Up @@ -169,7 +169,7 @@ m4_define([OVN_CHECK_PACKETS_REMOVE_BROADCAST],
AT_CHECK([sort $rcv_text], [0], [expout], [ignore], [dump_diff__ "$1" "$2"])])

m4_define([OVN_CHECK_PACKETS_CONTAIN],
[ovn_wait_packets__ "$1" "$2" "__file__:__line__"])
[ovn_wait_packets__ "$1" "$2" "__file__:__line__" $3])

# OVN_CHECK_PACKETS_UNIQ succeeds if some expected packets are duplicated.
# It fails if unexpected packets are received.
Expand Down

0 comments on commit d74c2ce

Please sign in to comment.