From 406a6497546480f3493ce9d9f55a62052c213297 Mon Sep 17 00:00:00 2001 From: Umang Francis <164182179+umfranci@users.noreply.github.com> Date: Fri, 20 Sep 2024 07:54:01 +0530 Subject: [PATCH] Updates to address Semver value errors in verify_device_rss_hash_key_change (#3429) * converting mimimum version to semver object before comparison * Removing extra line to comply with Black --- microsoft/testsuites/network/networksettings.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/microsoft/testsuites/network/networksettings.py b/microsoft/testsuites/network/networksettings.py index 9d99d44b39..e45d11ffb1 100644 --- a/microsoft/testsuites/network/networksettings.py +++ b/microsoft/testsuites/network/networksettings.py @@ -368,15 +368,11 @@ def verify_device_rss_hash_key_change(self, node: Node, log: Logger) -> None: uname = node.tools[Uname] linux_info = uname.get_linux_information() + min_supported_kernel = linux_info.kernel_version if isinstance(node.os, Debian) or isinstance(node.os, Redhat): - min_supported_kernel = "5.0.0" + min_supported_kernel = parse_version("5.0.0") elif isinstance(node.os, Suse): - min_supported_kernel = "4.12.14" - else: - # For other OS, it is not known which minimum kernel version - # supports RSS Hash key change. This can be found and later - # enhanced after running tests. - min_supported_kernel = str(linux_info.kernel_version) + min_supported_kernel = parse_version("4.12.14") if linux_info.kernel_version < min_supported_kernel: raise SkippedException(