tests: Update tests after test-framework API changes

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2021-01-05 20:35:58 +01:00
parent 5d5b6ae594
commit 22b4288f3d
8 changed files with 14 additions and 14 deletions

View File

@ -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}")
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)))
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)
offset = Size(offsets[i], Unit.KibiByte)
run_dd(
core.system_path, count=additional_4k_blocks_writes,
core.path, count=additional_4k_blocks_writes,
seek=int(offset.get_value(Unit.Blocks4096)
+ 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):
fio_job = fio.add_job(job_name=f"stream_{i}")
fio_job.size(stream_size)
fio_job.target(core.system_path)
fio_job.target(core.path)
if i < sequential_streams:
fio_job.read_write(ReadWrite.write)
else:

View File

@ -42,9 +42,9 @@ def test_fault_power_hit_init(cache_mode):
power_control.power_cycle()
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(
cache_dev=str(cache_dev.system_path),
cache_dev=str(cache_dev.path),
cache_mode=str(cache_mode.name.lower()),
force=True,
load=False))

View File

@ -43,7 +43,7 @@ def test_io_engines(cache_mode, filesystem, io_engine):
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 = cache.add_core(core_dev)
core.mount(mount_point)

View File

@ -38,7 +38,7 @@ def test_ioclass_eviction_priority(cache_line_size):
Udev.disable()
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
core.create_filesystem(filesystem)

View File

@ -41,7 +41,7 @@ def test_ioclass_occupancy_directory_write(io_size_multiplication, cache_mode, c
with TestRun.step("Disable udev"):
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
core.create_filesystem(filesystem)
core.mount(mountpoint)
@ -168,7 +168,7 @@ def test_ioclass_occupancy_directory_read(io_size_multiplication, cache_line_siz
with TestRun.step("Disable udev"):
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
core.create_filesystem(filesystem)
core.mount(mountpoint)
@ -297,7 +297,7 @@ def test_ioclass_occupancy_sum_cache():
with TestRun.step("Disable udev"):
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
core.create_filesystem(filesystem)
core.mount(mountpoint)

View File

@ -40,7 +40,7 @@ def test_ioclass_occuppancy_load(cache_line_size):
Udev.disable()
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
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_ioclass_list = cache.list_io_classes()
cache_disk_path = cache.cache_device.system_path
cache_disk_path = cache.cache_device.path
core.unmount()
cache.stop(no_data_flush=True)

View File

@ -40,7 +40,7 @@ def test_ioclass_repart(cache_mode, cache_line_size, ioclass_size_multiplicatior
with TestRun.step("Disable udev"):
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
core.create_filesystem(filesystem)
core.mount(mountpoint)

View File

@ -36,7 +36,7 @@ def test_ioclass_resize(cache_line_size, new_occupancy):
with TestRun.step("Disable udev"):
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
core.create_filesystem(filesystem)
core.mount(mountpoint)