Hi Ilya Thanks for the review.
On Mon, Jun 29, 2026 at 7:41 PM Ilya Maximets <[email protected]> wrote: > On 6/29/26 2:40 PM, Xavier Simonart via dev wrote: > > Macro can be used to wait for ofport creation in ovsdb and > > to retrieve its value. > > > > Signed-off-by: Xavier Simonart <[email protected]> > > --- > > tests/ovn-macros.at | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at > > index 8879c2fa1..2636b34cd 100644 > > --- a/tests/ovn-macros.at > > +++ b/tests/ovn-macros.at > > @@ -1485,6 +1485,16 @@ wake_up_nb() { > > AT_CHECK([kill -CONT $(cat ovn-nb/ovsdb-server.pid)]) > > } > > > > +wait_and_get_ofport() { > > + local ofport > > + local condition=$1 > > + OVS_WAIT_UNTIL([ > > + ofport=$(ovs-vsctl --bare --columns ofport find Interface > $condition) > > + echo "$condition port=$ofport" >&2 > > + test -n "$ofport" && test "$ofport" -ge 0]) > > Can we use something like: > > AT_CHECK([ovs-vsctl wait-until interface $1 'ofport>0']) > AT_CEHCK([ovs-vsctl get interface $1 ofport], [0], [stdout]) > cat stdout > > ? > Yes, I think it is a good idea. It will avoid launching a new ovs-vsctl every second in the OVS_WAIT_UNTIL loop and might slighly speed up the test (by avoiding the sleep 0.1/sleep 1 in the OVS_WAIT_UNTIL). > > > > Or are you using some more complex conditions somewhere? > No, I think it should work. I'll send a v2. > > Best regards, Ilya Maximets. > Thanks Xavier _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
