On Mon, Oct 14, 2024 at 12:10 PM Xavier Simonart <[email protected]> wrote:
> Those macros were, in some cases, returning before the proper flows > were installed, for instance when no ofport was yet created. > Hence tests might sometimes have been flaky. > This also highlited an issue in a test which also got fixed. > > Signed-off-by: Xavier Simonart <[email protected]> > --- > tests/ovn-macros.at | 6 +++--- > tests/ovn.at | 4 ++-- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at > index 0f9a3ab09..caa89ab47 100644 > --- a/tests/ovn-macros.at > +++ b/tests/ovn-macros.at > @@ -109,7 +109,7 @@ m4_divert_text([PREPARE_TESTS], > OVS_WAIT_UNTIL([ > hv_patch_ofport=$(as $hv ovs-vsctl --bare --columns ofport > find Interface name=$patch_port) > echo "$patch_port=$hv_patch_ofport" > - test 1 -le $(as $hv ovs-ofctl dump-flows br-int | grep -c > "output:\b$hv_patch_ofport\b") > + test -n "$hv_patch_ofport" && test 1 -le $(as $hv ovs-ofctl > dump-flows br-int | grep -c "output:\b$hv_patch_ofport\b") > ]) > done > done > @@ -123,7 +123,7 @@ m4_divert_text([PREPARE_TESTS], > OVS_WAIT_UNTIL([ > ofport=$(as $hv1 ovs-vsctl --bare --columns ofport find > Interface name=ovn-${hv2}-0) > echo "tunnel port=$ofport" > - test 1 -le $(as $hv1 ovs-ofctl dump-flows br-int | grep -c > "output:$ofport") > + test -n "$ofport" && test 1 -le $(as $hv1 ovs-ofctl dump-flows > br-int | grep -c "output:$ofport") > ]) > } > > @@ -135,7 +135,7 @@ m4_divert_text([PREPARE_TESTS], > OVS_WAIT_UNTIL([ > ofport=$(as $hv1 ovs-vsctl --bare --columns ofport find > Interface name=ovn-${hv2}-0) > echo "tunnel port=$ofport" > - test 1 -le $(as $hv1 ovs-ofctl dump-flows br-int | grep -c > "in_port=$ofport") > + test -n "$ofport" && test 1 -le $(as $hv1 ovs-ofctl dump-flows > br-int | grep -c "in_port=$ofport") > ]) > } > > diff --git a/tests/ovn.at b/tests/ovn.at > index e3c25be53..a82e152b4 100644 > --- a/tests/ovn.at > +++ b/tests/ovn.at > @@ -15361,8 +15361,8 @@ OVN_WAIT_PATCH_PORT_FLOWS(["public"], ["hv1"]) > OVN_WAIT_PATCH_PORT_FLOWS(["public"], ["hv2"]) > OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv1"],["hv2"]) > OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv2"],["hv1"]) > -OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],[hv1"]) > -OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],[hv2"]) > +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],["hv1"]) > +OVN_WAIT_REMOTE_OUTPUT_FLOWS(["hv3"],["hv2"]) > > wait_column "$hv1_uuid" Port_Binding chassis logical_port=migrator > wait_column "$hv1_uuid" Port_Binding requested_chassis > logical_port=migrator > -- > 2.31.1 > > Looks good to me, thanks. Acked-by: Ales Musil <[email protected]> -- Ales Musil Senior Software Engineer - OVN Core Red Hat EMEA <https://www.redhat.com> [email protected] <https://red.ht/sig> _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
