[ovs-dev] [test-kmod improvements 1/6] test: remove namespace after ovs-vswitchd is stopped

Joe Stringer joestringer at nicira.com
Fri Feb 6 22:31:00 UTC 2015


On 5 February 2015 at 16:06, Andy Zhou <azhou at nicira.com> wrote:
> Remove namespaces also removes the ports in them, thus may
> causing vswitch to generate warning log messages about not being
> able find the port before it exits.
>
> Remove namespaces after ovs-vswitchd exits improves test reliability.
>
> Signed-off-by: Andy Zhou <azhou at nicira.com>
> ---

I don't understand the difference between this and just moving the
DEL_NAMESPACES(at_ns0, at_ns1) call after OVS_KMOD_VSWITCHD_STOP.
(Which is an improvement by itself, that I welcome)

I still think that if the test fails, then the namespaces won't be
cleaned up. My understanding of autotest is the below:

(1) AT_SETUP
(2) AT_CHECK([command_that_fails])
(3) AT_CHECK([command_that_succeeds])
(4) AT_CLEANUP

(1), (2) will execute, the check for (2) fails, so autotest skips
straight to (4).

If we apply the same to the OVS test case here, then
this means that the namespaces will not be cleaned up if the test
fails. What I've done in private testing is to modify the
ADD_NAMESPACES() macro to add the DEL_NAMESPACES commands to the end
of the "cleanup" file, which appears to be invoked through AT_CLEANUP.



More information about the dev mailing list