On 6/29/26 2:40 PM, Xavier Simonart via dev wrote: > Using ofport_request can make the test flaky, as OVS might have > already used the requested ofport (typically when ovn created > ovn-hv[0-9]-0 ports). In that case, it takes some time (between > a few msec to multiple seconds) until the requested ofport is > obtained. OVN handles this properly (flows are recalculated), but > tests do not handle this properly (e.g. if it happens when comparing > I-P and recompute flows). > > This patch removes all ofport-request, querying the obtained ofport > when needed. > > Signed-off-by: Xavier Simonart <[email protected]> > --- > tests/ovn.at | 1055 ++++++++++++++++++-------------------------------- > 1 file changed, 373 insertions(+), 682 deletions(-) > > diff --git a/tests/ovn.at b/tests/ovn.at > index 5dda50044..6ae12acc7 100644 > --- a/tests/ovn.at > +++ b/tests/ovn.at > @@ -2641,7 +2641,7 @@ for i in 1 2 3; do > ovn_attach n1 br-phys 192.168.0.$i > > for j in 1 2 3; do > - check ovs-vsctl add-port br-int vif$i$j -- set Interface vif$i$j > external-ids:iface-id=lp$i$j options:tx_pcap=hv$i/vif$i$j-tx.pcap > options:rxq_pcap=hv$i/vif$i$j-rx.pcap ofport-request=$i$j > + check ovs-vsctl add-port br-int vif$i$j -- set Interface vif$i$j > external-ids:iface-id=lp$i$j options:tx_pcap=hv$i/vif$i$j-tx.pcap > options:rxq_pcap=hv$i/vif$i$j-rx.pcap > check ovn-nbctl lsp-add lsw0 lp$i$j > if test $j = 1; then > check ovn-nbctl lsp-set-addresses lp$i$j "f0:00:00:00:00:$i$j > 192.168.0.$i$j" unknown > @@ -2912,7 +2912,7 @@ for i in 1 2; do > ovn_attach n1 br-phys 192.168.0.$i > > for j in 1 2; do > - ovs-vsctl add-port br-int vif$i$j -- set Interface vif$i$j > external-ids:iface-id=lp$i$j options:tx_pcap=hv$i/vif$i$j-tx.pcap > options:rxq_pcap=hv$i/vif$i$j-rx.pcap ofport-request=$i$j > + ovs-vsctl add-port br-int vif$i$j -- set Interface vif$i$j > external-ids:iface-id=lp$i$j options:tx_pcap=hv$i/vif$i$j-tx.pcap > options:rxq_pcap=hv$i/vif$i$j-rx.pcap > check ovn-nbctl lsp-add lsw0 lp$i$j > ip_addrs="192.168.0.$i$j" > check ovn-nbctl lsp-set-addresses lp$i$j "f0:00:00:00:00:$i$j > $ip_addrs" > @@ -3359,8 +3359,7 @@ for i in 1 2; do > ovs-vsctl add-port br-int vif$i$j -- \ > set Interface vif$i$j external-ids:iface-id=lp$i$j \ > options:tx_pcap=hv$i/vif$i$j-tx.pcap \ > - options:rxq_pcap=hv$i/vif$i$j-rx.pcap \ > - ofport-request=$i$j > + options:rxq_pcap=hv$i/vif$i$j-rx.pcap >
I also wonder if all those 'ovs-vsctl add-port' commands should be replaced with a macro, since we're touching all of them here anyway. So, the next time we don't have to. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
