From 18a1f5032284d7c4e6be2ff1ebe4c3c8db9e82b9 Mon Sep 17 00:00:00 2001 From: libhe Date: Mon, 23 Sep 2024 16:43:09 +0800 Subject: [PATCH 1/2] Update for RHEL 10.0 version check. --- os_tests/tests/test_rhel_guest_image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os_tests/tests/test_rhel_guest_image.py b/os_tests/tests/test_rhel_guest_image.py index 608c11cd..5dbda767 100644 --- a/os_tests/tests/test_rhel_guest_image.py +++ b/os_tests/tests/test_rhel_guest_image.py @@ -880,7 +880,7 @@ def test_check_redhat_release(self): msg="cat /etc/redhat-release") match = re.search(r"\d+\.?\d+", output).group(0) self.assertEqual( - self.vm.rhel_ver, match, + float(self.vm.rhel_ver), float(match), "Release version mismatch in /etc/redhat-release -> %s" % output) if float(self.vm.rhel_ver) >= 8.0: cmd = "rpm -q redhat-release" @@ -908,7 +908,7 @@ def test_check_redhat_release(self): output).group(1) self.assertEqual( - self.vm.rhel_ver, match, + float(self.vm.rhel_ver), float(match), "Release version mismatch on redhat-release-server -> %s" % output) def tearDown(self): From eff3885bdc665879cc6184e667ee64d255d2bb2e Mon Sep 17 00:00:00 2001 From: libhe Date: Mon, 23 Sep 2024 17:28:58 +0800 Subject: [PATCH 2/2] Skip the check for net.ifnames=0 for RHEL 10 or higher. --- os_tests/tests/test_rhel_guest_image.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/os_tests/tests/test_rhel_guest_image.py b/os_tests/tests/test_rhel_guest_image.py index 5dbda767..8fecbe19 100644 --- a/os_tests/tests/test_rhel_guest_image.py +++ b/os_tests/tests/test_rhel_guest_image.py @@ -663,7 +663,12 @@ def test_check_boot_cmdline_parameters(self): expect_ret=0, msg="cat /proc/cmdline") for line in lines: + if line == "net.ifnames=0" and float(product_id) >= 10.0: + # Skip the check for net.ifnames=0 if the product is RHEL 10 or higher + self.log.info("Skipping check for net.ifnames=0 as it is removed in RHEL 10 and later") + continue self.assertIn(line, output, "%s is not in boot parameters" % line) + # crashkernel product_id = utils_lib.get_product_id(self) if float(product_id) >= 9.0: