[ovs-dev] [PATCH] system-traffic: Remove DEL_NAMESPACE at ADD_NAMESPACE.
Darrell Ball
dlu998 at gmail.com
Wed May 4 22:36:20 UTC 2016
On Wed, May 4, 2016 at 3:04 PM, William Tu <u9012063 at gmail.com> wrote:
> Since in ADD_NAMESPACE we've queued up namespace deletion using on_exit,
> whether the test passes or fails, the namespace will be cleaned up. So
> remove the DEL_NAMESPACE before adding the namespace.
>
> Signed-off-by: William Tu <u9012063 at gmail.com>
> ---
> tests/system-common-macros.at | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
> index 2116f1e..f0e65d6 100644
> --- a/tests/system-common-macros.at
> +++ b/tests/system-common-macros.at
> @@ -14,8 +14,7 @@ m4_define([DEL_NAMESPACES],
> # will be remove before new ones are installed.
> m4_define([ADD_NAMESPACES],
> [m4_foreach([ns], [$@],
> - [DEL_NAMESPACES(ns)
> - AT_CHECK([ip netns add ns || return 77])
> + [AT_CHECK([ip netns add ns || return 77])
>
what happens if the user does CTRL+C here ?
>---------------------------------------------------------<
Will some next test(s) run will experience a leaked namespace ?
Maybe better to queue up the DEL_NAMESPACES or a
some other del version before calling "ip netns add ns"
> on_exit 'DEL_NAMESPACES(ns)'
> ])
> ]
> --
> 2.5.0
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
More information about the dev
mailing list