On Wed, Jun 24, 2026 at 10:09 AM Xavier Simonart via dev <
[email protected]> wrote:

> - ovs-dpctl was erroneously not executed when ovs-vswitchd was stopped.
> - on_exit 'test -e $OVS_RUNDIR/ovs-vswitchd.pid && ovs-appctl
>   dpctl/flush-conntrack' was executed after stopping ovs-vswitchd, so
>   ovs-appctl dpctl/flush-conntrack was never executed.
>
> Fixes: 0156e7da2d32 ("tests: Avoid calling ovs/ovn commands when ovs/ovn
> are stopped.")
> Signed-off-by: Xavier Simonart <[email protected]>
> ---
>  tests/ovs-macros.at         | 2 +-
>  tests/system-kmod-macros.at | 4 +++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at
> index 95d522b70..42b07a636 100644
> --- a/tests/ovs-macros.at
> +++ b/tests/ovs-macros.at
> @@ -351,7 +351,7 @@ on_exit () {
>        (echo "test -e ovn-nb/ovn-nb.sock && $1"; cat cleanup;) >
> cleanup.tmp
>      elif [ echo "$1" | grep -qe '^ovn-sbctl' ]; then
>        (echo "test -e ovn-sb/ovn-sb.sock && $1"; cat cleanup) > cleanup.tmp
> -    elif [ echo "$1" | grep -qe '^ovs-ofctl' -qe '^ovs-dpctl' ]; then
> +    elif [ echo "$1" | grep -qe '^ovs-ofctl' ]; then
>        (echo "test -e $OVS_RUNDIR/ovs-vswitchd.pid && $1"; cat cleanup) >
> cleanup.tmp
>      else
>        (echo "$1"; cat cleanup) > cleanup.tmp
> diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at
> index f3b03f572..9351cfa82 100644
> --- a/tests/system-kmod-macros.at
> +++ b/tests/system-kmod-macros.at
> @@ -22,8 +22,10 @@ m4_define([OVS_TRAFFIC_VSWITCHD_START],
>                [modprobe mod && on_exit 'modprobe -r mod' || echo "Module
> mod not loaded."
>                ])
>     on_exit 'ovs-dpctl show | grep ovs-system && ovs-dpctl del-dp
> ovs-system'
> -   on_exit 'test -e $OVS_RUNDIR/ovs-vswitchd.pid && ovs-appctl
> dpctl/flush-conntrack'
>     _OVS_VSWITCHD_START([])
> +   # Do 'on_exit ovs-appctl ...' after 'on_exit kill_ovs_vswitchd' (from
> _OVS_VSWITCHD_START)
> +   # so it is executed before.
> +   on_exit 'test -e $OVS_RUNDIR/ovs-vswitchd.pid && ovs-appctl
> dpctl/flush-conntrack'
>     dnl Add bridges, ports, etc.
>     AT_CHECK([ovs-vsctl -- _ADD_BR([br0]) -- $1 m4_if([$2], [], [], [|
> uuidfilt])], [0], [$2])
>     if test OVN_MONITOR_ALL = yes; then
> --
> 2.47.1
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Thank you Xavier,

applied to main and backported down to 25.03.

Regards,
Ales
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to