Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initramfs update to LVM tests and conftest #1589

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion test/functional/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions test/functional/tests/volumes/test_many_cores_on_many_lvms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions test/functional/tests/volumes/test_many_lvms_on_many_cores.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Loading