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 <[email protected]>
---
 tests/ovn.at | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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.
-- 
2.41.0

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

Reply via email to