Merge pull request #617 from robertbaldyga/update-after-tf-api-changes
tests: Update tests after test-framework API changes
This commit is contained in:
commit
58438c3a5d
@ -65,7 +65,7 @@ def test_multistream_seq_cutoff_functional(threshold, streams_number):
|
|||||||
TestRun.LOGGER.info(f"Statistics before I/O:\n{core_statistics_before}")
|
TestRun.LOGGER.info(f"Statistics before I/O:\n{core_statistics_before}")
|
||||||
|
|
||||||
offset = Size(offsets[i], Unit.KibiByte)
|
offset = Size(offsets[i], Unit.KibiByte)
|
||||||
run_dd(core.system_path, count=int(threshold.get_value(Unit.Blocks4096) - 1),
|
run_dd(core.path, count=int(threshold.get_value(Unit.Blocks4096) - 1),
|
||||||
seek=int(offset.get_value(Unit.Blocks4096)))
|
seek=int(offset.get_value(Unit.Blocks4096)))
|
||||||
|
|
||||||
core_statistics_after = core.get_statistics()
|
core_statistics_after = core.get_statistics()
|
||||||
@ -85,7 +85,7 @@ def test_multistream_seq_cutoff_functional(threshold, streams_number):
|
|||||||
additional_4k_blocks_writes = random.randint(1, kib_between_streams / 4)
|
additional_4k_blocks_writes = random.randint(1, kib_between_streams / 4)
|
||||||
offset = Size(offsets[i], Unit.KibiByte)
|
offset = Size(offsets[i], Unit.KibiByte)
|
||||||
run_dd(
|
run_dd(
|
||||||
core.system_path, count=additional_4k_blocks_writes,
|
core.path, count=additional_4k_blocks_writes,
|
||||||
seek=int(offset.get_value(Unit.Blocks4096)
|
seek=int(offset.get_value(Unit.Blocks4096)
|
||||||
+ threshold.get_value(Unit.Blocks4096) - 1))
|
+ threshold.get_value(Unit.Blocks4096) - 1))
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ def test_multistream_seq_cutoff_stress_raw(streams_seq_rand):
|
|||||||
for i in range(0, sequential_streams + random_streams):
|
for i in range(0, sequential_streams + random_streams):
|
||||||
fio_job = fio.add_job(job_name=f"stream_{i}")
|
fio_job = fio.add_job(job_name=f"stream_{i}")
|
||||||
fio_job.size(stream_size)
|
fio_job.size(stream_size)
|
||||||
fio_job.target(core.system_path)
|
fio_job.target(core.path)
|
||||||
if i < sequential_streams:
|
if i < sequential_streams:
|
||||||
fio_job.read_write(ReadWrite.write)
|
fio_job.read_write(ReadWrite.write)
|
||||||
else:
|
else:
|
||||||
|
@ -42,9 +42,9 @@ def test_fault_power_hit_init(cache_mode):
|
|||||||
power_control.power_cycle()
|
power_control.power_cycle()
|
||||||
|
|
||||||
with TestRun.step("Start cache with re-initialization."):
|
with TestRun.step("Start cache with re-initialization."):
|
||||||
cache_dev.system_path = cache_device_link.get_target()
|
cache_dev.path = cache_device_link.get_target()
|
||||||
TestRun.executor.run_expect_success(cli.start_cmd(
|
TestRun.executor.run_expect_success(cli.start_cmd(
|
||||||
cache_dev=str(cache_dev.system_path),
|
cache_dev=str(cache_dev.path),
|
||||||
cache_mode=str(cache_mode.name.lower()),
|
cache_mode=str(cache_mode.name.lower()),
|
||||||
force=True,
|
force=True,
|
||||||
load=False))
|
load=False))
|
||||||
|
@ -43,7 +43,7 @@ def test_io_engines(cache_mode, filesystem, io_engine):
|
|||||||
|
|
||||||
cache = casadm.start_cache(cache_dev, cache_mode, force=True)
|
cache = casadm.start_cache(cache_dev, cache_mode, force=True)
|
||||||
|
|
||||||
TestRun.LOGGER.info(f"Create filesystem '{filesystem}' on '{core_dev.system_path}'")
|
TestRun.LOGGER.info(f"Create filesystem '{filesystem}' on '{core_dev.path}'")
|
||||||
core_dev.create_filesystem(filesystem)
|
core_dev.create_filesystem(filesystem)
|
||||||
core = cache.add_core(core_dev)
|
core = cache.add_core(core_dev)
|
||||||
core.mount(mount_point)
|
core.mount(mount_point)
|
||||||
|
@ -38,7 +38,7 @@ def test_ioclass_eviction_priority(cache_line_size):
|
|||||||
Udev.disable()
|
Udev.disable()
|
||||||
|
|
||||||
with TestRun.step(
|
with TestRun.step(
|
||||||
f"Preparing filesystem and mounting {core.system_path} at {mountpoint}"
|
f"Preparing filesystem and mounting {core.path} at {mountpoint}"
|
||||||
):
|
):
|
||||||
filesystem = Filesystem.xfs
|
filesystem = Filesystem.xfs
|
||||||
core.create_filesystem(filesystem)
|
core.create_filesystem(filesystem)
|
||||||
|
@ -41,7 +41,7 @@ def test_ioclass_occupancy_directory_write(io_size_multiplication, cache_mode, c
|
|||||||
with TestRun.step("Disable udev"):
|
with TestRun.step("Disable udev"):
|
||||||
Udev.disable()
|
Udev.disable()
|
||||||
|
|
||||||
with TestRun.step(f"Prepare filesystem and mount {core.system_path} at {mountpoint}"):
|
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||||
filesystem = Filesystem.xfs
|
filesystem = Filesystem.xfs
|
||||||
core.create_filesystem(filesystem)
|
core.create_filesystem(filesystem)
|
||||||
core.mount(mountpoint)
|
core.mount(mountpoint)
|
||||||
@ -168,7 +168,7 @@ def test_ioclass_occupancy_directory_read(io_size_multiplication, cache_line_siz
|
|||||||
with TestRun.step("Disable udev"):
|
with TestRun.step("Disable udev"):
|
||||||
Udev.disable()
|
Udev.disable()
|
||||||
|
|
||||||
with TestRun.step(f"Prepare filesystem and mount {core.system_path} at {mountpoint}"):
|
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||||
filesystem = Filesystem.xfs
|
filesystem = Filesystem.xfs
|
||||||
core.create_filesystem(filesystem)
|
core.create_filesystem(filesystem)
|
||||||
core.mount(mountpoint)
|
core.mount(mountpoint)
|
||||||
@ -297,7 +297,7 @@ def test_ioclass_occupancy_sum_cache():
|
|||||||
with TestRun.step("Disable udev"):
|
with TestRun.step("Disable udev"):
|
||||||
Udev.disable()
|
Udev.disable()
|
||||||
|
|
||||||
with TestRun.step(f"Prepare filesystem and mount {core.system_path} at {mountpoint}"):
|
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||||
filesystem = Filesystem.xfs
|
filesystem = Filesystem.xfs
|
||||||
core.create_filesystem(filesystem)
|
core.create_filesystem(filesystem)
|
||||||
core.mount(mountpoint)
|
core.mount(mountpoint)
|
||||||
|
@ -40,7 +40,7 @@ def test_ioclass_occuppancy_load(cache_line_size):
|
|||||||
Udev.disable()
|
Udev.disable()
|
||||||
|
|
||||||
with TestRun.step(
|
with TestRun.step(
|
||||||
f"Prepare filesystem and mount {core.system_path} at {mountpoint}"
|
f"Prepare filesystem and mount {core.path} at {mountpoint}"
|
||||||
):
|
):
|
||||||
filesystem = Filesystem.xfs
|
filesystem = Filesystem.xfs
|
||||||
core.create_filesystem(filesystem)
|
core.create_filesystem(filesystem)
|
||||||
@ -121,7 +121,7 @@ def test_ioclass_occuppancy_load(cache_line_size):
|
|||||||
original_usage_stats[io_class.id] = get_io_class_usage(cache, io_class.id)
|
original_usage_stats[io_class.id] = get_io_class_usage(cache, io_class.id)
|
||||||
|
|
||||||
original_ioclass_list = cache.list_io_classes()
|
original_ioclass_list = cache.list_io_classes()
|
||||||
cache_disk_path = cache.cache_device.system_path
|
cache_disk_path = cache.cache_device.path
|
||||||
core.unmount()
|
core.unmount()
|
||||||
cache.stop(no_data_flush=True)
|
cache.stop(no_data_flush=True)
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ def test_ioclass_repart(cache_mode, cache_line_size, ioclass_size_multiplicatior
|
|||||||
with TestRun.step("Disable udev"):
|
with TestRun.step("Disable udev"):
|
||||||
Udev.disable()
|
Udev.disable()
|
||||||
|
|
||||||
with TestRun.step(f"Prepare filesystem and mount {core.system_path} at {mountpoint}"):
|
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||||
filesystem = Filesystem.xfs
|
filesystem = Filesystem.xfs
|
||||||
core.create_filesystem(filesystem)
|
core.create_filesystem(filesystem)
|
||||||
core.mount(mountpoint)
|
core.mount(mountpoint)
|
||||||
|
@ -36,7 +36,7 @@ def test_ioclass_resize(cache_line_size, new_occupancy):
|
|||||||
with TestRun.step("Disable udev"):
|
with TestRun.step("Disable udev"):
|
||||||
Udev.disable()
|
Udev.disable()
|
||||||
|
|
||||||
with TestRun.step(f"Prepare filesystem and mount {core.system_path} at {mountpoint}"):
|
with TestRun.step(f"Prepare filesystem and mount {core.path} at {mountpoint}"):
|
||||||
filesystem = Filesystem.xfs
|
filesystem = Filesystem.xfs
|
||||||
core.create_filesystem(filesystem)
|
core.create_filesystem(filesystem)
|
||||||
core.mount(mountpoint)
|
core.mount(mountpoint)
|
||||||
|
Loading…
Reference in New Issue
Block a user