From 22b4288f3d2e1231a4fd492f0e9a9cfed6f9fe8d Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Tue, 5 Jan 2021 20:35:58 +0100 Subject: [PATCH] tests: Update tests after test-framework API changes Signed-off-by: Robert Baldyga --- .../tests/cache_ops/test_multistream_seq_cutoff.py | 6 +++--- .../tests/fault_injection/test_fault_power_hit_init.py | 4 ++-- test/functional/tests/io/test_io_engines.py | 2 +- .../tests/io_class/test_io_class_eviction_priority.py | 2 +- test/functional/tests/io_class/test_io_class_occupancy.py | 6 +++--- .../tests/io_class/test_io_class_occupancy_load.py | 4 ++-- .../tests/io_class/test_io_class_occupancy_repart.py | 2 +- .../tests/io_class/test_io_class_occupancy_resize.py | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/test/functional/tests/cache_ops/test_multistream_seq_cutoff.py b/test/functional/tests/cache_ops/test_multistream_seq_cutoff.py index cb0323c..1f71a08 100644 --- a/test/functional/tests/cache_ops/test_multistream_seq_cutoff.py +++ b/test/functional/tests/cache_ops/test_multistream_seq_cutoff.py @@ -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: diff --git a/test/functional/tests/fault_injection/test_fault_power_hit_init.py b/test/functional/tests/fault_injection/test_fault_power_hit_init.py index 83e6f6a..d968ecb 100644 --- a/test/functional/tests/fault_injection/test_fault_power_hit_init.py +++ b/test/functional/tests/fault_injection/test_fault_power_hit_init.py @@ -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)) diff --git a/test/functional/tests/io/test_io_engines.py b/test/functional/tests/io/test_io_engines.py index 5821920..a7f65e2 100644 --- a/test/functional/tests/io/test_io_engines.py +++ b/test/functional/tests/io/test_io_engines.py @@ -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) diff --git a/test/functional/tests/io_class/test_io_class_eviction_priority.py b/test/functional/tests/io_class/test_io_class_eviction_priority.py index 2591cea..0f77656 100644 --- a/test/functional/tests/io_class/test_io_class_eviction_priority.py +++ b/test/functional/tests/io_class/test_io_class_eviction_priority.py @@ -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) diff --git a/test/functional/tests/io_class/test_io_class_occupancy.py b/test/functional/tests/io_class/test_io_class_occupancy.py index 2b08953..c782b69 100644 --- a/test/functional/tests/io_class/test_io_class_occupancy.py +++ b/test/functional/tests/io_class/test_io_class_occupancy.py @@ -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) diff --git a/test/functional/tests/io_class/test_io_class_occupancy_load.py b/test/functional/tests/io_class/test_io_class_occupancy_load.py index 834ed78..40fcc17 100644 --- a/test/functional/tests/io_class/test_io_class_occupancy_load.py +++ b/test/functional/tests/io_class/test_io_class_occupancy_load.py @@ -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) diff --git a/test/functional/tests/io_class/test_io_class_occupancy_repart.py b/test/functional/tests/io_class/test_io_class_occupancy_repart.py index 5c44106..eb2ea07 100644 --- a/test/functional/tests/io_class/test_io_class_occupancy_repart.py +++ b/test/functional/tests/io_class/test_io_class_occupancy_repart.py @@ -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) diff --git a/test/functional/tests/io_class/test_io_class_occupancy_resize.py b/test/functional/tests/io_class/test_io_class_occupancy_resize.py index 01039c4..77e1f37 100644 --- a/test/functional/tests/io_class/test_io_class_occupancy_resize.py +++ b/test/functional/tests/io_class/test_io_class_occupancy_resize.py @@ -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)