Message ID | 20240207140626.729794-1-xsimonar@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] tests: Fix macro OVN_CHECK_PACKETS_CONTAIN. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
On 2/7/24 15:06, Xavier Simonart wrote: > 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: 9857ef8f61a0 ("tests: fixed multiple tests not properly waiting for packets to be received") > > Signed-off-by: Xavier Simonart <xsimonar@redhat.com> > --- Thanks, Xavier! Applied to main and backported to all stable branches down to 22.06. Regards, Dumitru
diff --git a/tests/ovn.at b/tests/ovn.at index 3e83cb2c0..8c5c3fa7c 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -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 @@ -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.
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: 9857ef8f61a0 ("tests: fixed multiple tests not properly waiting for packets to be received") Signed-off-by: Xavier Simonart <xsimonar@redhat.com> --- tests/ovn.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)