Skip to content

Commit

Permalink
Merge pull request #1589 from katlapinka/kasiat/initramfs-tests-update
Browse files Browse the repository at this point in the history
Add initramfs update to LVM tests and conftest
  • Loading branch information
katlapinka authored Nov 27, 2024
2 parents c3bb599 + 809a9e4 commit baa1f37
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
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

0 comments on commit baa1f37

Please sign in to comment.