From 3953e8b0f87a77a6cf8cb1c1215f29a4cf8645c8 Mon Sep 17 00:00:00 2001 From: Katarzyna Treder Date: Mon, 25 Nov 2024 14:40:37 +0100 Subject: [PATCH 1/2] Add initramfs update to LVM tests and conftest Signed-off-by: Katarzyna Treder --- test/functional/tests/conftest.py | 10 +++++++++- .../tests/volumes/test_many_cores_on_many_lvms.py | 4 ++++ .../tests/volumes/test_many_lvms_on_many_cores.py | 4 ++++ .../tests/volumes/test_many_lvms_on_single_core.py | 4 ++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/test/functional/tests/conftest.py b/test/functional/tests/conftest.py index d710f376d..ab00408f9 100644 --- a/test/functional/tests/conftest.py +++ b/test/functional/tests/conftest.py @@ -30,6 +30,7 @@ from test_tools.device_mapper import DeviceMapper from test_tools.mdadm import Mdadm from test_tools.fs_utils import remove +from test_tools import initramfs from log.logger import create_log, Log from test_utils.singleton import Singleton from storage_devices.lvm import Lvm, LvmConfiguration @@ -166,7 +167,8 @@ def base_prepare(item): lvms = Lvm.discover() if lvms: Lvm.remove_all() - LvmConfiguration.remove_filters_from_config() + LvmConfiguration.remove_filters_from_config() + initramfs.update() raids = Raid.discover() if len(TestRun.disks): @@ -240,6 +242,12 @@ def pytest_runtest_teardown(): elif Drbd.is_installed(): Drbd.down_all() + lvms = Lvm.discover() + if lvms: + Lvm.remove_all() + LvmConfiguration.remove_filters_from_config() + initramfs.update() + DeviceMapper.remove_all() RamDisk.remove_all() except Exception as ex: diff --git a/test/functional/tests/volumes/test_many_cores_on_many_lvms.py b/test/functional/tests/volumes/test_many_cores_on_many_lvms.py index e3a5db89d..dc023aee4 100644 --- a/test/functional/tests/volumes/test_many_cores_on_many_lvms.py +++ b/test/functional/tests/volumes/test_many_cores_on_many_lvms.py @@ -11,6 +11,7 @@ from api.cas import casadm from core.test_run import TestRun from storage_devices.disk import DiskType, DiskTypeSet +from test_tools import initramfs from test_tools.fio.fio import Fio from test_tools.fio.fio_param import ReadWrite, IoEngine, VerifyMethod from test_utils.size import Size, Unit @@ -56,6 +57,9 @@ def test_many_cores_on_many_lvms(): for lvm in lvms: cores.append(cache.add_core(lvm)) + with TestRun.step("Update initramfs"): + initramfs.update() + with TestRun.step("Run FIO with verification on LVM."): fio_run = (Fio().create_command() .read_write(ReadWrite.randrw) diff --git a/test/functional/tests/volumes/test_many_lvms_on_many_cores.py b/test/functional/tests/volumes/test_many_lvms_on_many_cores.py index a782b0b6c..66183957e 100644 --- a/test/functional/tests/volumes/test_many_lvms_on_many_cores.py +++ b/test/functional/tests/volumes/test_many_lvms_on_many_cores.py @@ -11,6 +11,7 @@ from api.cas import casadm from core.test_run import TestRun from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan +from test_tools import initramfs from test_tools.fio.fio import Fio from test_tools.fio.fio_param import ReadWrite, IoEngine, VerifyMethod from test_utils.size import Size, Unit @@ -64,6 +65,9 @@ def test_many_lvms_on_many_cores(): lvms = Lvm.create_specific_lvm_configuration(cores, config) + with TestRun.step("Update initramfs"): + initramfs.update() + with TestRun.step("Run FIO with verification on LVM."): fio_run = (Fio().create_command() .read_write(ReadWrite.randrw) diff --git a/test/functional/tests/volumes/test_many_lvms_on_single_core.py b/test/functional/tests/volumes/test_many_lvms_on_single_core.py index d027a65e6..acb613205 100644 --- a/test/functional/tests/volumes/test_many_lvms_on_single_core.py +++ b/test/functional/tests/volumes/test_many_lvms_on_single_core.py @@ -11,6 +11,7 @@ from api.cas import casadm from core.test_run import TestRun from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan +from test_tools import initramfs from test_tools.fio.fio import Fio from test_tools.fio.fio_param import ReadWrite, IoEngine, VerifyMethod from test_utils.size import Size, Unit @@ -53,6 +54,9 @@ def test_many_lvms_on_single_core(): lvms = Lvm.create_specific_lvm_configuration(core, config) + with TestRun.step("Update initramfs"): + initramfs.update() + with TestRun.step("Run FIO with verification on LVM."): fio_run = (Fio().create_command() .read_write(ReadWrite.randrw) From 809a9e407ec1818ffc106ed68e7a6f09ba8ff21a Mon Sep 17 00:00:00 2001 From: Katarzyna Treder Date: Wed, 27 Nov 2024 10:26:35 +0100 Subject: [PATCH 2/2] TF update Signed-off-by: Katarzyna Treder --- test/functional/test-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/test-framework b/test/functional/test-framework index 5d8afd3fb..072c72b08 160000 --- a/test/functional/test-framework +++ b/test/functional/test-framework @@ -1 +1 @@ -Subproject commit 5d8afd3fba17a89d820b60a366419730745ed1b7 +Subproject commit 072c72b08c9d5657c131b5cd325175a19a5417df