[ovs-dev] [PATCH 3/3] tests: Add userspace-testsuite.

Joe Stringer joestringer at nicira.com
Wed Aug 5 17:44:56 UTC 2015


Thanks for this Daniele.

A couple of general things:
- "userspace testsuite" as a name, while accurate, is also perhaps
misleading as the unit tests are also userspace tests (and don't
require any special root privileges). I guess this class of tests
should be "system", in which case it would make sense to name them
something like "system-userspace-testsuite.at" and
"system-kmod-testsuite.at".
- We should have a new vagrant provision target in VagrantFile to run
these tests. This could be mentioned in the vagrant section of
INSTALL.md.
- Seems like we've omitted a NEWS item for the kernel version of these
tests, but perhaps these should get a mention - check-ryu and
check-oftest have mentions there.
- All of this is linux-centric. I don't think we have to address this
today, as my main concern is to increase the body of these tests to
get more assurance on datapath behaviour. It might be a good thing to
keep in mind though when designing tests - Try to keep
platform-specific stuff inside the macros, and generic stuff inside
the test files.

On 4 August 2015 at 11:00, Daniele Di Proietto <diproiettod at vmware.com> wrote:
> @@ -32,10 +32,11 @@ m4_define([ADD_NAMESPACES],
>  # The existing 'port' or 'ovs-port' will be removed before new ones are added.
>  #
>  m4_define([ADD_VETH],
> -    [ AT_CHECK([ip link add $1 type veth peer name ovs-$1])
> +    [ ip link del ovs-$1
> +      AT_CHECK([ip link add $1 type veth peer name ovs-$1])
>        AT_CHECK([ip link set $1 netns $2])
> -      AT_CHECK([ovs-vsctl add-port $3 ovs-$1])
>        AT_CHECK([ip link set dev ovs-$1 up])
> +      AT_CHECK([ovs-vsctl add-port $3 ovs-$1])
>        AT_CHECK([ip netns exec $2 ip addr add $4 dev $1])
>        AT_CHECK([ip netns exec $2 ip link set dev $1 up])
>      ]

ovs-$1 should be cleaned up properly before running the test. I think
it practice this just means that we should add an ON_EXIT([ip link del
ovs-$1]) at the end of this macro.



More information about the dev mailing list