From eb5e807234ae269614887097507f7a82206478e3 Mon Sep 17 00:00:00 2001 From: naveen Date: Wed, 12 Aug 2020 11:15:57 +0530 Subject: [PATCH 1/4] tests: Kernel version check for topojson scripts. 1. Added linux kernel version check to avoid failures in CI systems if matching kernel version not found. Signed-off-by: naveen --- .../test_bgp_basic_functionality.py | 3 ++- tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py | 9 +++++++-- tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py | 9 +++++++-- tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py | 9 +++++++-- .../bgp_communities_topo1/test_bgp_communities.py | 8 +++++++- .../test_bgp_gr_functionality_topo1.py | 8 +++++++- .../test_bgp_gr_functionality_topo2.py | 8 +++++++- .../test_bgp_large_community_topo_1.py | 8 +++++++- .../test_bgp_large_community_topo_2.py | 9 +++++++-- .../bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py | 8 +++++++- .../bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py | 8 +++++++- 11 files changed, 72 insertions(+), 15 deletions(-) diff --git a/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py b/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py index 69e050caed..7e7155e8fa 100755 --- a/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py +++ b/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py @@ -46,8 +46,9 @@ import sys import json import time import pytest +import platform from copy import deepcopy - +from lib.topotest import version_cmp # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) diff --git a/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py b/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py index 948f641afb..6059060729 100755 --- a/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py +++ b/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py @@ -41,7 +41,7 @@ import sys import time import json import pytest - +import platform # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) @@ -51,7 +51,7 @@ sys.path.append(os.path.join(CWD, "../../")) # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen from mininet.topo import Topo - +from lib.topotest import version_cmp from lib.common_config import ( start_topology, write_test_header, @@ -124,6 +124,11 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) + if version_cmp(platform.release(), '4.19') < 0: + error_msg = ('These tests will not run. (have kernel "{}", ' + 'requires kernel >= 4.19)'.format(platform.release())) + pytest.skip(error_msg) + # Don't run this test if we have any failure. if tgen.routers_have_failure(): pytest.skip(tgen.errors) diff --git a/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py b/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py index 5b997fdd16..81486dd2a1 100755 --- a/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py +++ b/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py @@ -41,7 +41,7 @@ import sys import time import json import pytest - +import platform # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) @@ -51,7 +51,7 @@ sys.path.append(os.path.join(CWD, "../../")) # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen from mininet.topo import Topo - +from lib.topotest import version_cmp from lib.common_config import ( start_topology, write_test_header, @@ -124,6 +124,11 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) + if version_cmp(platform.release(), '4.19') < 0: + error_msg = ('These tests will not run. (have kernel "{}", ' + 'requires kernel >= 4.19)'.format(platform.release())) + pytest.skip(error_msg) + # Don't run this test if we have any failure. if tgen.routers_have_failure(): pytest.skip(tgen.errors) diff --git a/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py b/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py index 89b15c46d3..197a2619aa 100755 --- a/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py +++ b/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py @@ -43,7 +43,7 @@ import sys import time import json import pytest - +import platform # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) @@ -53,7 +53,7 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topogen and topotest helpers from mininet.topo import Topo from lib.topogen import Topogen, get_topogen - +from lib.topotest import version_cmp # Import topoJson from lib, to create topology and initial configuration from lib.common_config import ( start_topology, @@ -129,6 +129,11 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) + if version_cmp(platform.release(), '4.19') < 0: + error_msg = ('These tests will not run. (have kernel "{}", ' + 'requires kernel >= 4.19)'.format(platform.release())) + pytest.skip(error_msg) + # Checking BGP convergence global BGP_CONVERGENCE global ADDR_TYPES diff --git a/tests/topotests/bgp_communities_topo1/test_bgp_communities.py b/tests/topotests/bgp_communities_topo1/test_bgp_communities.py index 7d960d6916..2726f65ad9 100644 --- a/tests/topotests/bgp_communities_topo1/test_bgp_communities.py +++ b/tests/topotests/bgp_communities_topo1/test_bgp_communities.py @@ -31,6 +31,7 @@ import sys import time import json import pytest +import platform # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -40,7 +41,7 @@ sys.path.append(os.path.join(CWD, "../")) # Import topogen and topotest helpers from mininet.topo import Topo from lib.topogen import Topogen, get_topogen - +from lib.topotest import version_cmp # Import topoJson from lib, to create topology and initial configuration from lib.common_config import ( start_topology, @@ -119,6 +120,11 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) + if version_cmp(platform.release(), '4.19') < 0: + error_msg = ('These tests will not run. (have kernel "{}", ' + 'requires kernel >= 4.19)'.format(platform.release())) + pytest.skip(error_msg) + # Checking BGP convergence global BGP_CONVERGENCE global ADDR_TYPES diff --git a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py index fdc1bed522..fc6c528f71 100755 --- a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py +++ b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py @@ -91,6 +91,7 @@ import json import time import inspect import pytest +import platform from time import sleep # Save the Current Working Directory to find configuration files. @@ -103,7 +104,7 @@ sys.path.append(os.path.join("../lib/")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger - +from lib.topotest import version_cmp # Required to instantiate the topology builder class. from mininet.topo import Topo @@ -206,6 +207,11 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) + if version_cmp(platform.release(), '4.19') < 0: + error_msg = ('These tests will not run. (have kernel "{}", ' + 'requires kernel >= 4.19)'.format(platform.release())) + pytest.skip(error_msg) + # Don't run this test if we have any failure. if tgen.routers_have_failure(): pytest.skip(tgen.errors) diff --git a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py index 83a04f491f..49045f2bb6 100755 --- a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py +++ b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py @@ -87,6 +87,7 @@ import sys import json import time import pytest +import platform from time import sleep from copy import deepcopy @@ -100,7 +101,7 @@ sys.path.append(os.path.join("../lib/")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger - +from lib.topotest import version_cmp # Required to instantiate the topology builder class. from mininet.topo import Topo @@ -202,6 +203,11 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) + if version_cmp(platform.release(), '4.19') < 0: + error_msg = ('These tests will not run. (have kernel "{}", ' + 'requires kernel >= 4.19)'.format(platform.release())) + pytest.skip(error_msg) + # Api call verify whether BGP is converged ADDR_TYPES = check_address_types() diff --git a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py index 334aaebb4b..baa0653dc2 100755 --- a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py +++ b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py @@ -51,7 +51,8 @@ import time from os import path as os_path import sys from json import load as json_load - +import platform +from lib.topotest import version_cmp # Required to instantiate the topology builder class. from lib.topogen import Topogen, get_topogen from mininet.topo import Topo @@ -160,6 +161,11 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) + if version_cmp(platform.release(), '4.19') < 0: + error_msg = ('These tests will not run. (have kernel "{}", ' + 'requires kernel >= 4.19)'.format(platform.release())) + pytest.skip(error_msg) + # Checking BGP convergence global bgp_convergence diff --git a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py index 502a9a9ec4..5ec663c633 100755 --- a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py +++ b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py @@ -64,7 +64,7 @@ import sys import json import pytest import time - +import platform # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) @@ -75,7 +75,7 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topoJson from lib, to create topology and initial configuration from lib.topogen import Topogen, get_topogen from mininet.topo import Topo - +from lib.topotest import version_cmp from lib.common_config import ( start_topology, write_test_header, @@ -150,6 +150,11 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) + if version_cmp(platform.release(), '4.19') < 0: + error_msg = ('These tests will not run. (have kernel "{}", ' + 'requires kernel >= 4.19)'.format(platform.release())) + pytest.skip(error_msg) + # Checking BGP convergence global bgp_convergence, ADDR_TYPES diff --git a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py index a37e3f36a3..74cbda6a25 100755 --- a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py +++ b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py @@ -102,6 +102,7 @@ import sys import json import time import pytest +import platform from copy import deepcopy # Save the Current Working Directory to find configuration files. @@ -115,7 +116,7 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen from mininet.topo import Topo - +from lib.topotest import version_cmp from lib.common_config import ( step, verify_rib, @@ -230,6 +231,11 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) + if version_cmp(platform.release(), '4.19') < 0: + error_msg = ('These tests will not run. (have kernel "{}", ' + 'requires kernel >= 4.19)'.format(platform.release())) + pytest.skip(error_msg) + global BGP_CONVERGENCE global ADDR_TYPES ADDR_TYPES = check_address_types() diff --git a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py index c36e66a60e..f1522c2a99 100755 --- a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py +++ b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py @@ -43,9 +43,10 @@ import sys import json import time import pytest +import platform from copy import deepcopy from time import sleep - +from lib.topotest import version_cmp # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -162,6 +163,11 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) + if version_cmp(platform.release(), '4.19') < 0: + error_msg = ('These tests will not run. (have kernel "{}", ' + 'requires kernel >= 4.19)'.format(platform.release())) + pytest.skip(error_msg) + global BGP_CONVERGENCE global ADDR_TYPES ADDR_TYPES = check_address_types() From 3dfd384ec4f3d7cdcc43373c6ff6c197fe81c81b Mon Sep 17 00:00:00 2001 From: naveen Date: Tue, 18 Aug 2020 19:52:45 +0530 Subject: [PATCH 2/4] tests: Moving kernel version check to API. Signed-off-by: naveen --- .../test_bgp_basic_functionality.py | 12 +++++-- .../bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py | 15 ++++----- .../bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py | 15 ++++----- .../bgp_as_allow_in/test_bgp_as_allow_in.py | 15 ++++----- .../test_bgp_communities.py | 14 ++++----- .../test_bgp_gr_functionality_topo1.py | 14 ++++----- .../test_bgp_gr_functionality_topo2.py | 14 ++++----- .../test_bgp_large_community_topo_1.py | 14 ++++----- .../test_bgp_large_community_topo_2.py | 15 ++++----- .../test_bgp_multi_vrf_topo1.py | 13 ++++---- .../test_bgp_multi_vrf_topo2.py | 13 ++++---- tests/topotests/lib/common_config.py | 31 ++++++++++++++++++- 12 files changed, 112 insertions(+), 73 deletions(-) diff --git a/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py b/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py index 7e7155e8fa..b34c001ca2 100755 --- a/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py +++ b/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py @@ -46,9 +46,8 @@ import sys import json import time import pytest -import platform from copy import deepcopy -from lib.topotest import version_cmp + # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) @@ -70,6 +69,7 @@ from lib.common_config import ( create_static_routes, verify_rib, verify_admin_distance_for_static_routes, +<<<<<<< ff9ae8fbb8f14b1cf5679d3278341edd09e7d8bf check_address_types, apply_raw_config, addKernelRoute, @@ -77,6 +77,9 @@ from lib.common_config import ( create_prefix_lists, create_route_maps, verify_bgp_community, +======= + required_linux_kernel_version +>>>>>>> tests: Moving kernel version check to API. ) from lib.topolog import logger from lib.bgp import ( @@ -138,6 +141,11 @@ def setup_module(mod): * `mod`: module name """ + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.15') + if result: + pytest.skip(result) + testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) logger.info("=" * 40) diff --git a/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py b/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py index 6059060729..63e5a9f9b2 100755 --- a/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py +++ b/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py @@ -41,7 +41,7 @@ import sys import time import json import pytest -import platform + # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) @@ -51,7 +51,7 @@ sys.path.append(os.path.join(CWD, "../../")) # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen from mininet.topo import Topo -from lib.topotest import version_cmp + from lib.common_config import ( start_topology, write_test_header, @@ -61,6 +61,7 @@ from lib.common_config import ( check_address_types, interface_status, reset_config_on_routers, + required_linux_kernel_version ) from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp @@ -108,6 +109,11 @@ def setup_module(mod): global NEXT_HOPS, INTF_LIST_R3, INTF_LIST_R2, TEST_STATIC global ADDR_TYPES + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.15') + if result: + pytest.skip(result) + testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) logger.info("=" * 40) @@ -124,11 +130,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - # Don't run this test if we have any failure. if tgen.routers_have_failure(): pytest.skip(tgen.errors) diff --git a/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py b/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py index 81486dd2a1..883dc92438 100755 --- a/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py +++ b/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py @@ -41,7 +41,7 @@ import sys import time import json import pytest -import platform + # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) @@ -51,7 +51,7 @@ sys.path.append(os.path.join(CWD, "../../")) # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen from mininet.topo import Topo -from lib.topotest import version_cmp + from lib.common_config import ( start_topology, write_test_header, @@ -61,6 +61,7 @@ from lib.common_config import ( check_address_types, interface_status, reset_config_on_routers, + required_linux_kernel_version ) from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp @@ -108,6 +109,11 @@ def setup_module(mod): global NEXT_HOPS, INTF_LIST_R3, INTF_LIST_R2, TEST_STATIC global ADDR_TYPES + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.15') + if result: + pytest.skip(result) + testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) logger.info("=" * 40) @@ -124,11 +130,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - # Don't run this test if we have any failure. if tgen.routers_have_failure(): pytest.skip(tgen.errors) diff --git a/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py b/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py index 197a2619aa..4db4d1a8b9 100755 --- a/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py +++ b/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py @@ -43,7 +43,7 @@ import sys import time import json import pytest -import platform + # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) @@ -53,7 +53,7 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topogen and topotest helpers from mininet.topo import Topo from lib.topogen import Topogen, get_topogen -from lib.topotest import version_cmp + # Import topoJson from lib, to create topology and initial configuration from lib.common_config import ( start_topology, @@ -65,6 +65,7 @@ from lib.common_config import ( create_route_maps, check_address_types, step, + required_linux_kernel_version ) from lib.topolog import logger from lib.bgp import ( @@ -112,6 +113,11 @@ def setup_module(mod): * `mod`: module name """ + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.15') + if result: + pytest.skip(result) + testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) logger.info("=" * 40) @@ -129,11 +135,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - # Checking BGP convergence global BGP_CONVERGENCE global ADDR_TYPES diff --git a/tests/topotests/bgp_communities_topo1/test_bgp_communities.py b/tests/topotests/bgp_communities_topo1/test_bgp_communities.py index 2726f65ad9..88c5e0df19 100644 --- a/tests/topotests/bgp_communities_topo1/test_bgp_communities.py +++ b/tests/topotests/bgp_communities_topo1/test_bgp_communities.py @@ -31,7 +31,6 @@ import sys import time import json import pytest -import platform # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -41,7 +40,7 @@ sys.path.append(os.path.join(CWD, "../")) # Import topogen and topotest helpers from mininet.topo import Topo from lib.topogen import Topogen, get_topogen -from lib.topotest import version_cmp + # Import topoJson from lib, to create topology and initial configuration from lib.common_config import ( start_topology, @@ -55,6 +54,7 @@ from lib.common_config import ( create_route_maps, create_prefix_lists, create_route_maps, + required_linux_kernel_version ) from lib.topolog import logger from lib.bgp import ( @@ -103,6 +103,11 @@ def setup_module(mod): * `mod`: module name """ + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.15') + if result: + pytest.skip(result) + testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) logger.info("=" * 40) @@ -120,11 +125,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - # Checking BGP convergence global BGP_CONVERGENCE global ADDR_TYPES diff --git a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py index fc6c528f71..30757809c4 100755 --- a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py +++ b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py @@ -91,7 +91,6 @@ import json import time import inspect import pytest -import platform from time import sleep # Save the Current Working Directory to find configuration files. @@ -104,7 +103,7 @@ sys.path.append(os.path.join("../lib/")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.topotest import version_cmp + # Required to instantiate the topology builder class. from mininet.topo import Topo @@ -136,6 +135,7 @@ from lib.common_config import ( kill_mininet_routers_process, get_frr_ipv6_linklocal, create_route_maps, + required_linux_kernel_version ) # Reading the data from JSON File for topology and configuration creation @@ -187,6 +187,11 @@ def setup_module(mod): global ADDR_TYPES + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.15') + if result: + pytest.skip(result) + testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) logger.info("=" * 40) @@ -207,11 +212,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - # Don't run this test if we have any failure. if tgen.routers_have_failure(): pytest.skip(tgen.errors) diff --git a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py index 49045f2bb6..8bec22c577 100755 --- a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py +++ b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py @@ -87,7 +87,6 @@ import sys import json import time import pytest -import platform from time import sleep from copy import deepcopy @@ -101,7 +100,7 @@ sys.path.append(os.path.join("../lib/")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.topotest import version_cmp + # Required to instantiate the topology builder class. from mininet.topo import Topo @@ -136,6 +135,7 @@ from lib.common_config import ( kill_mininet_routers_process, get_frr_ipv6_linklocal, create_route_maps, + required_linux_kernel_version ) # Reading the data from JSON File for topology and configuration creation @@ -184,6 +184,11 @@ def setup_module(mod): * `mod`: module name """ + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.15') + if result: + pytest.skip(result) + global ADDR_TYPES testsuite_run_time = time.asctime(time.localtime(time.time())) @@ -203,11 +208,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - # Api call verify whether BGP is converged ADDR_TYPES = check_address_types() diff --git a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py index baa0653dc2..fe9e8504ad 100755 --- a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py +++ b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py @@ -51,8 +51,7 @@ import time from os import path as os_path import sys from json import load as json_load -import platform -from lib.topotest import version_cmp + # Required to instantiate the topology builder class. from lib.topogen import Topogen, get_topogen from mininet.topo import Topo @@ -68,6 +67,7 @@ from lib.common_config import ( verify_bgp_community, step, check_address_types, + required_linux_kernel_version ) from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp_and_verify @@ -143,6 +143,11 @@ def setup_module(mod): * `mod`: module name """ + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.15') + if result: + pytest.skip(result) + global ADDR_TYPES testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) @@ -161,11 +166,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - # Checking BGP convergence global bgp_convergence diff --git a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py index 5ec663c633..d890fe127d 100755 --- a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py +++ b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py @@ -64,7 +64,7 @@ import sys import json import pytest import time -import platform + # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) @@ -75,7 +75,7 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topoJson from lib, to create topology and initial configuration from lib.topogen import Topogen, get_topogen from mininet.topo import Topo -from lib.topotest import version_cmp + from lib.common_config import ( start_topology, write_test_header, @@ -91,6 +91,7 @@ from lib.common_config import ( verify_route_maps, create_static_routes, check_address_types, + required_linux_kernel_version ) from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp_and_verify @@ -133,6 +134,11 @@ def setup_module(mod): * `mod`: module name """ + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.15') + if result: + pytest.skip(result) + testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) logger.info("=" * 40) @@ -150,11 +156,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - # Checking BGP convergence global bgp_convergence, ADDR_TYPES diff --git a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py index 74cbda6a25..6ecc11119f 100755 --- a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py +++ b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py @@ -102,7 +102,6 @@ import sys import json import time import pytest -import platform from copy import deepcopy # Save the Current Working Directory to find configuration files. @@ -116,7 +115,7 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen from mininet.topo import Topo -from lib.topotest import version_cmp + from lib.common_config import ( step, verify_rib, @@ -133,6 +132,7 @@ from lib.common_config import ( create_bgp_community_lists, check_router_status, apply_raw_config, + required_linux_kernel_version ) from lib.topolog import logger @@ -210,6 +210,10 @@ def setup_module(mod): * `mod`: module name """ + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.19') + if result: + pytest.skip(result) testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) @@ -231,11 +235,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - global BGP_CONVERGENCE global ADDR_TYPES ADDR_TYPES = check_address_types() diff --git a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py index f1522c2a99..18c4a5dc75 100755 --- a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py +++ b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py @@ -43,10 +43,9 @@ import sys import json import time import pytest -import platform from copy import deepcopy from time import sleep -from lib.topotest import version_cmp + # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -79,6 +78,7 @@ from lib.common_config import ( get_frr_ipv6_linklocal, check_router_status, apply_raw_config, + required_linux_kernel_version ) from lib.topolog import logger @@ -142,6 +142,10 @@ def setup_module(mod): * `mod`: module name """ + # Required linux kernel version for this suite to run. + result = required_linux_kernel_version('4.19') + if result: + pytest.skip(result) testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) @@ -163,11 +167,6 @@ def setup_module(mod): # Creating configuration from JSON build_config_from_json(tgen, topo) - if version_cmp(platform.release(), '4.19') < 0: - error_msg = ('These tests will not run. (have kernel "{}", ' - 'requires kernel >= 4.19)'.format(platform.release())) - pytest.skip(error_msg) - global BGP_CONVERGENCE global ADDR_TYPES ADDR_TYPES = check_address_types() diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index 1846d43138..5a6d3f3899 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -36,6 +36,8 @@ import ConfigParser import traceback import socket import ipaddress +import platform + if sys.version_info[0] > 2: import io @@ -46,7 +48,7 @@ else: from lib.topolog import logger, logger_config from lib.topogen import TopoRouter, get_topogen -from lib.topotest import interface_set_status +from lib.topotest import interface_set_status, version_cmp FRRCFG_FILE = "frr_json.conf" FRRCFG_BKUP_FILE = "frr_json_initial.conf" @@ -3973,3 +3975,30 @@ def verify_vrf_vni(tgen, input_dict): logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name)) return False + + +def required_linux_kernel_version(required_version): + """ + This API is used to check linux version compatibility of the test suite. + If version mentioned in required_version is higher than the linux kernel + of the system, test suite will be skipped. This API returns true or errormsg. + + Parameters + ---------- + * `required_version` : Kernel version required for the suites to run. + + Usage + ----- + result = linux_kernel_version_lowerthan('4.15') + + Returns + ------- + errormsg(str) or True + """ + system_kernel = platform.release() + if version_cmp(system_kernel, required_version) < 0: + error_msg = ('These tests will not run on kernel "{}", ' + 'they require kernel >= {})'.format(system_kernel, + required_version )) + return error_msg + return True \ No newline at end of file From 955212d91bc858349609b1ec9bff4351b2b8caf5 Mon Sep 17 00:00:00 2001 From: nguggarigoud Date: Tue, 15 Sep 2020 11:09:43 +0530 Subject: [PATCH 3/4] tests: fixing pytest.skip error. Updated scripts to handle skip on lower kernel version. Signed-off-by: naveen --- .../test_bgp_basic_functionality.py | 7 ++----- tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py | 4 ++-- tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py | 4 ++-- tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py | 4 ++-- .../bgp_communities_topo1/test_bgp_communities.py | 4 ++-- .../test_bgp_gr_functionality_topo1.py | 4 ++-- .../test_bgp_gr_functionality_topo2.py | 4 ++-- .../bgp_large_community/test_bgp_large_community_topo_1.py | 4 ++-- .../bgp_large_community/test_bgp_large_community_topo_2.py | 4 ++-- .../bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py | 6 +++--- .../bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py | 6 +++--- 11 files changed, 24 insertions(+), 27 deletions(-) diff --git a/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py b/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py index b34c001ca2..41fa7c0a09 100755 --- a/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py +++ b/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py @@ -69,7 +69,6 @@ from lib.common_config import ( create_static_routes, verify_rib, verify_admin_distance_for_static_routes, -<<<<<<< ff9ae8fbb8f14b1cf5679d3278341edd09e7d8bf check_address_types, apply_raw_config, addKernelRoute, @@ -77,9 +76,7 @@ from lib.common_config import ( create_prefix_lists, create_route_maps, verify_bgp_community, -======= required_linux_kernel_version ->>>>>>> tests: Moving kernel version check to API. ) from lib.topolog import logger from lib.bgp import ( @@ -143,8 +140,8 @@ def setup_module(mod): # Required linux kernel version for this suite to run. result = required_linux_kernel_version('4.15') - if result: - pytest.skip(result) + if result is not True: + pytest.skip("Kernel requirements are not met") testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) diff --git a/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py b/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py index 63e5a9f9b2..6068f5f831 100755 --- a/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py +++ b/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py @@ -111,8 +111,8 @@ def setup_module(mod): # Required linux kernel version for this suite to run. result = required_linux_kernel_version('4.15') - if result: - pytest.skip(result) + if result is not True: + pytest.skip("Kernel requirements are not met") testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) diff --git a/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py b/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py index 883dc92438..ae54019a0f 100755 --- a/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py +++ b/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py @@ -111,8 +111,8 @@ def setup_module(mod): # Required linux kernel version for this suite to run. result = required_linux_kernel_version('4.15') - if result: - pytest.skip(result) + if result is not True: + pytest.skip("Kernel requirements are not met") testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) diff --git a/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py b/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py index 4db4d1a8b9..f9d22a3a36 100755 --- a/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py +++ b/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py @@ -115,8 +115,8 @@ def setup_module(mod): # Required linux kernel version for this suite to run. result = required_linux_kernel_version('4.15') - if result: - pytest.skip(result) + if result is not True: + pytest.skip("Kernel requirements are not met") testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) diff --git a/tests/topotests/bgp_communities_topo1/test_bgp_communities.py b/tests/topotests/bgp_communities_topo1/test_bgp_communities.py index 88c5e0df19..57e8e0d34a 100644 --- a/tests/topotests/bgp_communities_topo1/test_bgp_communities.py +++ b/tests/topotests/bgp_communities_topo1/test_bgp_communities.py @@ -105,8 +105,8 @@ def setup_module(mod): # Required linux kernel version for this suite to run. result = required_linux_kernel_version('4.15') - if result: - pytest.skip(result) + if result is not True: + pytest.skip("Kernel requirements are not met") testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) diff --git a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py index 30757809c4..fdbd317093 100755 --- a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py +++ b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py @@ -189,8 +189,8 @@ def setup_module(mod): # Required linux kernel version for this suite to run. result = required_linux_kernel_version('4.15') - if result: - pytest.skip(result) + if result is not True: + pytest.skip("Kernel requirements are not met") testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) diff --git a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py index 8bec22c577..e1ec0ea81b 100755 --- a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py +++ b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py @@ -186,8 +186,8 @@ def setup_module(mod): # Required linux kernel version for this suite to run. result = required_linux_kernel_version('4.15') - if result: - pytest.skip(result) + if result is not True: + pytest.skip("Kernel requirements are not met") global ADDR_TYPES diff --git a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py index fe9e8504ad..dc06b7131a 100755 --- a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py +++ b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py @@ -145,8 +145,8 @@ def setup_module(mod): """ # Required linux kernel version for this suite to run. result = required_linux_kernel_version('4.15') - if result: - pytest.skip(result) + if result is not True: + pytest.skip("Kernel requirements are not met") global ADDR_TYPES testsuite_run_time = time.asctime(time.localtime(time.time())) diff --git a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py index d890fe127d..bb88e47415 100755 --- a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py +++ b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py @@ -136,8 +136,8 @@ def setup_module(mod): # Required linux kernel version for this suite to run. result = required_linux_kernel_version('4.15') - if result: - pytest.skip(result) + if result is not True: + pytest.skip("Kernel requirements are not met") testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) diff --git a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py index 6ecc11119f..c15b88d371 100755 --- a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py +++ b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py @@ -211,9 +211,9 @@ def setup_module(mod): * `mod`: module name """ # Required linux kernel version for this suite to run. - result = required_linux_kernel_version('4.19') - if result: - pytest.skip(result) + result = required_linux_kernel_version('4.15') + if result is not True: + pytest.skip("Kernel requirements are not met") testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) diff --git a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py index 18c4a5dc75..bb13d54019 100755 --- a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py +++ b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py @@ -143,9 +143,9 @@ def setup_module(mod): * `mod`: module name """ # Required linux kernel version for this suite to run. - result = required_linux_kernel_version('4.19') - if result: - pytest.skip(result) + result = required_linux_kernel_version('4.15') + if result is not True: + pytest.skip("Kernel requirements are not met") testsuite_run_time = time.asctime(time.localtime(time.time())) logger.info("Testsuite start time: {}".format(testsuite_run_time)) From f052d1fc39cdeb50d20cac4ea867e1ad24ee0594 Mon Sep 17 00:00:00 2001 From: nguggarigoud Date: Tue, 15 Sep 2020 15:51:07 +0530 Subject: [PATCH 4/4] tests: Addressing lint error. Added new line to remove git link error. Signed-off-by: naveen --- tests/topotests/lib/common_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index 5a6d3f3899..a5385b0fcb 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -4001,4 +4001,4 @@ def required_linux_kernel_version(required_version): 'they require kernel >= {})'.format(system_kernel, required_version )) return error_msg - return True \ No newline at end of file + return True