Looks good to me, thanks. Reviewed-by: Yifeng Sun <[email protected]>
On Sat, Mar 16, 2019 at 11:50 AM Darrell Ball <[email protected]> wrote: > 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. > > Signed-off-by: Darrell Ball <[email protected]> > --- > tests/system-kmod-macros.at | 12 +++++------- > tests/system-traffic.at | 12 ++++++------ > 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 87f99a6..554a61e 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 b124181..a358744 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 5cebe58..92ffbf6 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([:]) > ]) > -- > 1.9.1 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
