diff options
author | Darrell Ball <dlu998@gmail.com> | 2019-03-16 11:50:24 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-03-25 14:19:59 -0700 |
commit | e06c44a865a58a8c1765c24fba9f7eaa874b3d68 (patch) | |
tree | 4b1142628bfa91eb2f3a55a1aac05abe8226b3e4 /tests | |
parent | 304c8075c24d401e9497922d8c5438c48d0b90d7 (diff) | |
download | openvswitch-e06c44a865a58a8c1765c24fba9f7eaa874b3d68.tar.gz |
tests: Remove maximum version kernel check.
The macro 'OVS_CHECK_KERNEL' was checking for maximum supported kernel
version. This means checks like 'OVS_CHECK_KERNEL(3, 10, 4, 18)'
in various tests need to be updated when each new kernel version is
supported. This is unnecessary as these tests are expected to continue
to work in later kernel versions.
Fix this by changing the macro to check for minimum version only and
update the macro name accordingly.
This patch does not make any possible corrections to the indicated minimum
kernel version specified by the callers of the macro.
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Darrell Ball <dlu998@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system-kmod-macros.at | 12 | ||||
-rw-r--r-- | tests/system-traffic.at | 12 | ||||
-rw-r--r-- | tests/system-userspace-macros.at | 4 |
3 files changed, 13 insertions, 15 deletions
diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at index 87f99a6c4..554a61e9b 100644 --- a/tests/system-kmod-macros.at +++ b/tests/system-kmod-macros.at @@ -166,21 +166,19 @@ m4_define([DPCTL_CHECK_FRAGMENTATION_FAIL], ]) -# OVS_CHECK_KERNEL([minversion], [minsublevel], [maxversion], [maxsublevel]) +# OVS_CHECK_MIN_KERNEL([minversion], [minsublevel]) # -# Check if kernel version falls between minversion.minsublevel and -# maxversion.maxsublevel, skip this test if it is not. -m4_define([OVS_CHECK_KERNEL], +# Skip test if kernel version falls below minversion.minsublevel +m4_define([OVS_CHECK_MIN_KERNEL], [ version=$(uname -r | sed -e 's/\./ /g' | awk '{print $ 1}') sublevel=$(uname -r | sed -e 's/\./ /g' | awk '{print $ 2}') - AT_SKIP_IF([test $version -lt $1 || ( test $version -eq $1 && test $sublevel -lt $2 ) || test $version -gt $3 || ( test $version -eq $3 && test $sublevel -gt $4 )]) + AT_SKIP_IF([test $version -lt $1 || ( test $version -eq $1 && test $sublevel -lt $2 )]) ]) # OVS_CHECK_KERNEL_EXCL([minversion], [minsublevel], [maxversion], [maxsublevel]) # -# Check that kernel version doesn't fall between minversion.minsublevel and -# maxversion.maxsublevel, skip this test if it is. +# Skip test if kernel version falls between minversion.minsublevel and maxversion.maxsublevel m4_define([OVS_CHECK_KERNEL_EXCL], [ version=$(uname -r | sed -e 's/\./ /g' | awk '{print $ 1}') diff --git a/tests/system-traffic.at b/tests/system-traffic.at index b1241812e..a35874463 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at @@ -617,7 +617,7 @@ OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP AT_SETUP([datapath - ping over gre tunnel by simulated packets]) -OVS_CHECK_KERNEL(3, 10, 4, 18) +OVS_CHECK_MIN_KERNEL(3, 10) OVS_TRAFFIC_VSWITCHD_START() AT_CHECK([ovs-vsctl -- set bridge br0 other-config:hwaddr=\"f2:ff:00:00:00:01\"]) @@ -667,7 +667,7 @@ OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP AT_SETUP([datapath - ping over erspan v1 tunnel by simulated packets]) -OVS_CHECK_KERNEL(3, 10, 4, 18) +OVS_CHECK_MIN_KERNEL(3, 10) OVS_TRAFFIC_VSWITCHD_START() AT_CHECK([ovs-vsctl -- set bridge br0 other-config:hwaddr=\"f2:ff:00:00:00:01\"]) @@ -719,7 +719,7 @@ OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP AT_SETUP([datapath - ping over erspan v2 tunnel by simulated packets]) -OVS_CHECK_KERNEL(3, 10, 4, 18) +OVS_CHECK_MIN_KERNEL(3, 10) OVS_TRAFFIC_VSWITCHD_START() AT_CHECK([ovs-vsctl -- set bridge br0 other-config:hwaddr=\"f2:ff:00:00:00:01\"]) @@ -772,7 +772,7 @@ OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP AT_SETUP([datapath - ping over ip6erspan v1 tunnel by simulated packets]) -OVS_CHECK_KERNEL(3, 10, 4, 18) +OVS_CHECK_MIN_KERNEL(3, 10) OVS_TRAFFIC_VSWITCHD_START() AT_CHECK([ovs-vsctl -- set bridge br0 other-config:hwaddr=\"f2:ff:00:00:00:01\"]) @@ -827,7 +827,7 @@ OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP AT_SETUP([datapath - ping over ip6erspan v2 tunnel by simulated packets]) -OVS_CHECK_KERNEL(3, 10, 4, 18) +OVS_CHECK_MIN_KERNEL(3, 10) OVS_TRAFFIC_VSWITCHD_START() AT_CHECK([ovs-vsctl -- set bridge br0 other-config:hwaddr=\"f2:ff:00:00:00:01\"]) @@ -1066,7 +1066,7 @@ dnl ns1: connect to br0, with IP:10.1.1.2 dnl br-underlay: with IP: 172.31.1.100 dnl ns0: connect to br-underlay, with IP: 10.1.1.1 AT_SETUP([datapath - truncate and output to gre tunnel by simulated packets]) -OVS_CHECK_KERNEL(3, 10, 4, 18) +OVS_CHECK_MIN_KERNEL(3, 10) AT_SKIP_IF([test $HAVE_NC = no]) OVS_TRAFFIC_VSWITCHD_START() diff --git a/tests/system-userspace-macros.at b/tests/system-userspace-macros.at index 5cebe5821..92ffbf6d5 100644 --- a/tests/system-userspace-macros.at +++ b/tests/system-userspace-macros.at @@ -278,10 +278,10 @@ AT_CHECK([ovs-appctl dpctl/ipf-get-status -m | FORMAT_FRAG_LIST()], [], [dnl ]) ]) -# OVS_CHECK_KERNEL([minversion], [maxversion], [minsublevel], [maxsublevel]) +# OVS_CHECK_MIN_KERNEL([minversion], [maxversion]) # # The userspace skips all tests that check kernel version. -m4_define([OVS_CHECK_KERNEL], +m4_define([OVS_CHECK_MIN_KERNEL], [ AT_SKIP_IF([:]) ]) |