Message ID | 20230525130753.2717172-1-frode.nordahl@canonical.com |
---|---|
State | Accepted |
Commit | d51a4ef0a63bd17acd4486f0ce38102e378599dd |
Headers | show |
Series | [ovs-dev,v2] tests: layer3-tunnels: Skip bareudp tests if not supported by kernel. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
On 5/25/23 15:07, Frode Nordahl wrote: > The bareudp tests depend on specific kernel configuration to > succeed. Skip the test if the feature is not enabled in the > running kernel. > > Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com> > --- > tests/system-kmod-macros.at | 10 ++++++++++ > tests/system-layer3-tunnels.at | 4 ++-- > tests/system-userspace-macros.at | 8 ++++++++ > 3 files changed, 20 insertions(+), 2 deletions(-) Thanks! Applied and backported down to 2.17. Best regards, Ilya Maximets.
diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at index fb15a5a7c..712925ded 100644 --- a/tests/system-kmod-macros.at +++ b/tests/system-kmod-macros.at @@ -237,3 +237,13 @@ m4_define([CHECK_L3L4_CONNTRACK_REASM]) # # The kernel module tests do not use TC offload. m4_define([CHECK_NO_TC_OFFLOAD]) + +# OVS_CHECK_BAREUDP() +# +# The feature needs to be enabled in the kernel configuration (CONFIG_BAREUDP) +# to work. +m4_define([OVS_CHECK_BAREUDP], +[ + AT_SKIP_IF([! ip link add dev ovs_bareudp0 type bareudp dstport 6635 ethertype mpls_uc 2>&1 >/dev/null]) + AT_CHECK([ip link del dev ovs_bareudp0]) +]) diff --git a/tests/system-layer3-tunnels.at b/tests/system-layer3-tunnels.at index c37852b21..81123f730 100644 --- a/tests/system-layer3-tunnels.at +++ b/tests/system-layer3-tunnels.at @@ -154,7 +154,7 @@ OVS_VSWITCHD_STOP AT_CLEANUP AT_SETUP([layer3 - ping over MPLS Bareudp]) -OVS_CHECK_MIN_KERNEL(5, 7) +OVS_CHECK_BAREUDP() OVS_TRAFFIC_VSWITCHD_START([_ADD_BR([br1])]) ADD_NAMESPACES(at_ns0, at_ns1) @@ -202,7 +202,7 @@ OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP AT_SETUP([layer3 - ping over Bareudp]) -OVS_CHECK_MIN_KERNEL(5, 7) +OVS_CHECK_BAREUDP() OVS_TRAFFIC_VSWITCHD_START([_ADD_BR([br1])]) ADD_NAMESPACES(at_ns0, at_ns1) diff --git a/tests/system-userspace-macros.at b/tests/system-userspace-macros.at index 482079386..c1855cbc5 100644 --- a/tests/system-userspace-macros.at +++ b/tests/system-userspace-macros.at @@ -336,3 +336,11 @@ m4_define([CHECK_L3L4_CONNTRACK_REASM], # # Userspace tests do not use TC offload. m4_define([CHECK_NO_TC_OFFLOAD]) + +# OVS_CHECK_BAREUDP() +# +# The userspace datapath does not support bareudp tunnels. +m4_define([OVS_CHECK_BAREUDP], +[ + AT_SKIP_IF([:]) +])
The bareudp tests depend on specific kernel configuration to succeed. Skip the test if the feature is not enabled in the running kernel. Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com> --- tests/system-kmod-macros.at | 10 ++++++++++ tests/system-layer3-tunnels.at | 4 ++-- tests/system-userspace-macros.at | 8 ++++++++ 3 files changed, 20 insertions(+), 2 deletions(-)