On 25.02.2016 22:28, Joe Stringer wrote: > On 25 February 2016 at 06:15, Ilya Maximets <i.maxim...@samsung.com> wrote: >> This prevents failure of test scenarios 'make check-kernel' >> and 'make check-system-userspace' if creation of veth pairs is not >> supported by kernel (or module isn't loaded). >> >> Signed-off-by: Ilya Maximets <i.maxim...@samsung.com> > > All of the tests require support for namespaces and veths, so I think > the main use for this patch is to change the "fail" for all tests to > "skip" if you're running the testsuite in a setup without veths. > > Rather than adding an extra macro which must be specified for every > test, I suggest that this should be integrated into either > OVS_TRAFFIC_VSWITCHD_START() or ADD_VETH(). If I'm not mistaken, this > should provide the same result with a 1-liner patch. > >> --- >> tests/system-common-macros.at | 9 +++++++++ >> tests/system-traffic.at | 45 >> +++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 54 insertions(+) >> >> diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at >> index fcd7792..107900a 100644 >> --- a/tests/system-common-macros.at >> +++ b/tests/system-common-macros.at >> @@ -155,3 +155,12 @@ m4_define([NETNS_DAEMONIZE], >> # Do basic check for vxlan functionality, skip the test if it's not there. >> m4_define([OVS_CHECK_VXLAN], >> [AT_SKIP_IF([! ip link add foo type vxlan help 2>&1 | grep dstport >> >/dev/null])]) >> + >> +# OVS_CHECK_VETH() >> +# >> +# Do basic check for veth functionality, skip the test if it's not there. >> +m4_define([OVS_CHECK_VETH], >> + [ADD_NAMESPACES(at_vethtest) >> + AT_SKIP_IF([! ip netns exec at_vethtest ip link add type veth peer]) >> + ] >> +) > > You shouldn't need to add a namespace to check whether you can create > a veth. I don't think any of the tests actually adds a veth inside a > namespace, either.
Thanks for review. Another version of this patch sent as a part of patch-set: http://openvswitch.org/pipermail/dev/2016-February/066828.html Best regards, Ilya Maximets. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev