On 2/12/24 18:55, Xavier Simonart wrote: > Signed-off-by: Xavier Simonart <xsimo...@redhat.com> > --- > tests/ovn-controller.at | 14 ++++++++------ > tests/ovn-macros.at | 11 +++++++++++ > tests/ovn.at | 8 +++++--- > 3 files changed, 24 insertions(+), 9 deletions(-) > > diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at > index 3089aea9d..c10bc155b 100644 > --- a/tests/ovn-controller.at > +++ b/tests/ovn-controller.at > @@ -2693,19 +2693,20 @@ ovs-vsctl add-br br-phys > ovn_attach n1 br-phys 192.168.0.1 > > for i in $(seq 1 320); do > - ovs-vsctl -- add-port br-int hv1-vif$i -- \ > + OVS_VSCTL(add-port br-int hv1-vif$i -- \ > set interface hv1-vif$i external-ids:iface-id=sw0-p$i \ > options:tx_pcap=hv1/vif${i}-tx.pcap \ > options:rxq_pcap=hv1/vif${i}-rx.pcap \ > - ofport-request=$i > + ofport-request=$i) > done > - > +RUN_OVS_VSCTL > > check ovn-nbctl ls-add sw0 > for i in $(seq 1 320); do > - check ovn-nbctl lsp-add sw0 sw0-p$i > - check ovn-nbctl lsp-set-addresses sw0-p$i "unknown" > + OVN_NBCTL(lsp-add sw0 sw0-p$i) > + OVN_NBCTL(lsp-set-addresses sw0-p$i "unknown") > done > +RUN_OVN_NBCTL > > wait_for_ports_up > ovn-nbctl --wait=hv sync > @@ -2715,8 +2716,9 @@ OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int > table=OFTABLE_LOCAL_OUTP > ]) > > for i in $(seq 1 280); do > - check ovn-nbctl lsp-del sw0-p$i > + OVN_NBCTL(lsp-del sw0-p$i) > done > +RUN_OVN_NBCTL > ovn-nbctl --wait=hv sync > > AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_LOCAL_OUTPUT | > grep -q controller], [1]) > diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at > index 84e50d76f..a35c0ff80 100644 > --- a/tests/ovn-macros.at > +++ b/tests/ovn-macros.at > @@ -984,6 +984,17 @@ m4_define([RUN_OVN_NBCTL], [ > unset command > ]) > > +# OVS_VSCTL(VSCTL_COMMAND) adds VSCTL_COMMAND to list of commands to be run > by RUN_OVS_VSCTL(). > +m4_define([OVS_VSCTL], [ > + command="${command} -- $1" > +]) > + > +# RUN_OVS_VSCTL() executes list of commands built by the OVS_VSCTL() macro. > +m4_define([RUN_OVS_VSCTL], [ > + check ovs-vsctl ${command} > + unset command > +])
Hi, Xavier. Not an issue of this particular patch as this thing was introduced long ago, but... The shell command 'command' is a way to call a different command ignoring the defined aliases. Overloading the 'command' itself in that sense doesn't seem wise to me and may cause a major headache if we ever hit an issue involving it. I'd suggest some other name should be used here. Best regards, Ilya Maximets. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev