diff mbox series

[ovs-dev] tests: Remove almost duplicate macros.

Message ID 20240725131548.914461-1-xsimonar@redhat.com
State Accepted
Headers show
Series [ovs-dev] tests: Remove almost duplicate macros. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Xavier Simonart July 25, 2024, 1:15 p.m. UTC
(stop/restart)_ovsdb_controller_updates macros (using nft) are now defined
in ovn-macro.at.
Remove similar implementations (using iptables) from system-ovn.at.

Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
---
 tests/system-ovn.at | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Ales Musil Aug. 7, 2024, 11:29 a.m. UTC | #1
On Thu, Jul 25, 2024 at 3:16 PM Xavier Simonart <xsimonar@redhat.com> wrote:

> (stop/restart)_ovsdb_controller_updates macros (using nft) are now defined
> in ovn-macro.at.
> Remove similar implementations (using iptables) from system-ovn.at.
>
> Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
> ---
>  tests/system-ovn.at | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/tests/system-ovn.at b/tests/system-ovn.at
> index ddb3d14e9..1cbb50705 100644
> --- a/tests/system-ovn.at
> +++ b/tests/system-ovn.at
> @@ -11109,17 +11109,6 @@ wait_for_local_bindings() {
>        [kill -CONT $(cat ovn-sb/ovsdb-server.pid)]
>    )
>  }
> -stop_ovsdb_controller_updates() {
> -  TCP_PORT=$1
> -  echo Stopping updates from ovn-controller to ovsdb using port $TCP_PORT
> -  on_exit 'iptables -C INPUT -p tcp --destination-port $TCP_PORT -j DROP
> 2>/dev/null && iptables -D INPUT -p tcp --destination-port $TCP_PORT -j
> DROP'
> -  iptables -A INPUT -p tcp --destination-port $TCP_PORT -j DROP
> -}
> -restart_ovsdb_controller_updates() {
> -  TCP_PORT=$1
> -  echo Restarting updates from ovn-controller to ovsdb
> -  iptables -D INPUT -p tcp --destination-port $TCP_PORT  -j DROP
> -}
>  ensure_controller_run() {
>  # We want to make sure controller could run at least one full loop.
>  # We can't use wait=hv as sb might be sleeping.
> --
> 2.31.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Looks good to me, thanks.

Acked-by: Ales Musil <amusil@redhat.com>
Numan Siddique Aug. 8, 2024, 3:55 a.m. UTC | #2
On Wed, Aug 7, 2024 at 7:30 AM Ales Musil <amusil@redhat.com> wrote:
>
> On Thu, Jul 25, 2024 at 3:16 PM Xavier Simonart <xsimonar@redhat.com> wrote:
>
> > (stop/restart)_ovsdb_controller_updates macros (using nft) are now defined
> > in ovn-macro.at.
> > Remove similar implementations (using iptables) from system-ovn.at.
> >
> > Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
> > ---
> >  tests/system-ovn.at | 11 -----------
> >  1 file changed, 11 deletions(-)
> >
> > diff --git a/tests/system-ovn.at b/tests/system-ovn.at
> > index ddb3d14e9..1cbb50705 100644
> > --- a/tests/system-ovn.at
> > +++ b/tests/system-ovn.at
> > @@ -11109,17 +11109,6 @@ wait_for_local_bindings() {
> >        [kill -CONT $(cat ovn-sb/ovsdb-server.pid)]
> >    )
> >  }
> > -stop_ovsdb_controller_updates() {
> > -  TCP_PORT=$1
> > -  echo Stopping updates from ovn-controller to ovsdb using port $TCP_PORT
> > -  on_exit 'iptables -C INPUT -p tcp --destination-port $TCP_PORT -j DROP
> > 2>/dev/null && iptables -D INPUT -p tcp --destination-port $TCP_PORT -j
> > DROP'
> > -  iptables -A INPUT -p tcp --destination-port $TCP_PORT -j DROP
> > -}
> > -restart_ovsdb_controller_updates() {
> > -  TCP_PORT=$1
> > -  echo Restarting updates from ovn-controller to ovsdb
> > -  iptables -D INPUT -p tcp --destination-port $TCP_PORT  -j DROP
> > -}
> >  ensure_controller_run() {
> >  # We want to make sure controller could run at least one full loop.
> >  # We can't use wait=hv as sb might be sleeping.
> > --
> > 2.31.1
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> >
> Looks good to me, thanks.
>
> Acked-by: Ales Musil <amusil@redhat.com>

Thanks.  Applied to main.

Numan

>
> --
>
> Ales Musil
>
> Senior Software Engineer - OVN Core
>
> Red Hat EMEA <https://www.redhat.com>
>
> amusil@redhat.com
> <https://red.ht/sig>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox series

Patch

diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index ddb3d14e9..1cbb50705 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -11109,17 +11109,6 @@  wait_for_local_bindings() {
       [kill -CONT $(cat ovn-sb/ovsdb-server.pid)]
   )
 }
-stop_ovsdb_controller_updates() {
-  TCP_PORT=$1
-  echo Stopping updates from ovn-controller to ovsdb using port $TCP_PORT
-  on_exit 'iptables -C INPUT -p tcp --destination-port $TCP_PORT -j DROP 2>/dev/null && iptables -D INPUT -p tcp --destination-port $TCP_PORT -j DROP'
-  iptables -A INPUT -p tcp --destination-port $TCP_PORT -j DROP
-}
-restart_ovsdb_controller_updates() {
-  TCP_PORT=$1
-  echo Restarting updates from ovn-controller to ovsdb
-  iptables -D INPUT -p tcp --destination-port $TCP_PORT  -j DROP
-}
 ensure_controller_run() {
 # We want to make sure controller could run at least one full loop.
 # We can't use wait=hv as sb might be sleeping.