From 31fda78be45af6abd0e96cc0826d47729e669e44 Mon Sep 17 00:00:00 2001 From: Jan Musial Date: Mon, 10 Aug 2020 14:26:40 +0200 Subject: [PATCH] Use parametrizex in tests Signed-off-by: Jan Musial --- .../tests/cache_ops/test_seq_cutoff.py | 10 ++++---- .../tests/cli/test_set_get_params.py | 6 ++--- .../test_cache_insert_error.py | 8 +++---- .../test_fault_injection_interrupts.py | 24 +++++++++---------- .../test_fault_injection_opencas_load.py | 4 ++-- .../test_fault_injection_with_mounted_core.py | 6 ++--- .../test_primary_device_error.py | 6 ++--- .../test_soft_hot_plug_device.py | 4 ++-- .../incremental_load/test_incremental_load.py | 2 +- .../tests/incremental_load/test_udev.py | 2 +- .../tests/initialize/test_initialize_load.py | 20 ++++++++-------- .../initialize/test_initialize_runlevel.py | 4 ++-- .../initialize/test_startup_init_config.py | 4 ++-- test/functional/tests/io/test_write_fetch.py | 8 +++---- .../tests/io_class/test_io_class_cli.py | 2 +- .../tests/io_class/test_io_class_core_id.py | 2 +- .../tests/io_class/test_io_class_directory.py | 6 ++--- .../tests/io_class/test_io_class_file.py | 2 +- .../tests/io_class/test_io_classification.py | 12 +++++----- .../lazy_writes/cleaning_policy/acp_params.py | 8 +++---- .../lazy_writes/cleaning_policy/test_acp.py | 2 +- .../recovery/test_recovery_all_options.py | 8 +++---- .../recovery/test_recovery_flush_reset.py | 6 ++--- .../recovery/test_recovery_unplug.py | 12 +++++----- .../lazy_writes/test_lazy_writes_clean.py | 8 +++---- .../lazy_writes/test_lazy_writes_signals.py | 6 ++--- test/functional/tests/stats/test_stat_max.py | 2 +- .../stress/test_stress_io_small_device.py | 2 +- .../tests/stress/test_stress_shutdown.py | 6 ++--- .../tests/stress/test_stress_without_io.py | 12 +++++----- .../tests/volumes/test_volume_partitions.py | 12 +++++----- 31 files changed, 108 insertions(+), 108 deletions(-) diff --git a/test/functional/tests/cache_ops/test_seq_cutoff.py b/test/functional/tests/cache_ops/test_seq_cutoff.py index 9104f2d..de4d194 100644 --- a/test/functional/tests/cache_ops/test_seq_cutoff.py +++ b/test/functional/tests/cache_ops/test_seq_cutoff.py @@ -37,7 +37,7 @@ class VerifyType(Enum): (CacheMode.WT, ReadWrite.write, ReadWrite.randwrite), (CacheMode.WA, ReadWrite.read, ReadWrite.randread), (CacheMode.WO, ReadWrite.write, ReadWrite.randwrite)]) -@pytest.mark.parametrize("cls", CacheLineSize) +@pytest.mark.parametrizex("cls", CacheLineSize) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_seq_cutoff_multi_core(thresholds_list, cache_mode, io_type, io_type_last, cls): @@ -109,11 +109,11 @@ def test_seq_cutoff_multi_core(thresholds_list, cache_mode, io_type, io_type_las @pytest.mark.parametrize("threshold_param", [ random.randint(1, int(SEQ_CUTOFF_THRESHOLD_MAX.get_value(Unit.KibiByte))) ]) -@pytest.mark.parametrize("cls", CacheLineSize) -@pytest.mark.parametrize("io_dir", [ReadWrite.write, ReadWrite.read]) @pytest.mark.parametrize("policy, verify_type", [(SeqCutOffPolicy.never, VerifyType.NEGATIVE), (SeqCutOffPolicy.always, VerifyType.POSITIVE), (SeqCutOffPolicy.full, VerifyType.NEGATIVE)]) +@pytest.mark.parametrizex("cls", CacheLineSize) +@pytest.mark.parametrizex("io_dir", [ReadWrite.write, ReadWrite.read]) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_seq_cutoff_thresh(threshold_param, cls, io_dir, policy, verify_type): @@ -161,8 +161,8 @@ def test_seq_cutoff_thresh(threshold_param, cls, io_dir, policy, verify_type): @pytest.mark.parametrize("threshold_param", [ random.randint(1, int(SEQ_CUTOFF_THRESHOLD_MAX.get_value(Unit.KibiByte))) ]) -@pytest.mark.parametrize("cls", CacheLineSize) -@pytest.mark.parametrize("io_dir", [ReadWrite.write, ReadWrite.read]) +@pytest.mark.parametrizex("cls", CacheLineSize) +@pytest.mark.parametrizex("io_dir", [ReadWrite.write, ReadWrite.read]) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_seq_cutoff_thresh_fill(threshold_param, cls, io_dir): diff --git a/test/functional/tests/cli/test_set_get_params.py b/test/functional/tests/cli/test_set_get_params.py index 205a950..42c9117 100644 --- a/test/functional/tests/cli/test_set_get_params.py +++ b/test/functional/tests/cli/test_set_get_params.py @@ -32,7 +32,7 @@ cores_per_cache = 2 number_of_checks = 10 -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_set_get_seqcutoff_params(cache_mode): @@ -112,8 +112,8 @@ def test_set_get_seqcutoff_params(cache_mode): ) -@pytest.mark.parametrize("cache_mode", CacheMode) -@pytest.mark.parametrize("cleaning_policy", [CleaningPolicy.alru, CleaningPolicy.acp]) +@pytest.mark.parametrizex("cache_mode", CacheMode) +@pytest.mark.parametrizex("cleaning_policy", [CleaningPolicy.alru, CleaningPolicy.acp]) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_set_get_cleaning_params(cache_mode, cleaning_policy): diff --git a/test/functional/tests/fault_injection/test_cache_insert_error.py b/test/functional/tests/fault_injection/test_cache_insert_error.py index 8ecefa3..1078245 100644 --- a/test/functional/tests/fault_injection/test_cache_insert_error.py +++ b/test/functional/tests/fault_injection/test_cache_insert_error.py @@ -24,8 +24,8 @@ from storage_devices.device import Device from test_utils.os_utils import Udev -@pytest.mark.parametrize("cache_line_size", CacheLineSize) -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_line_size", CacheLineSize) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_cache_insert_error(cache_mode, cache_line_size): @@ -83,8 +83,8 @@ def test_cache_insert_error(cache_mode, cache_line_size): fio_cmd.target(core_device).verify_only().run() -@pytest.mark.parametrize("cache_line_size", CacheLineSize) -@pytest.mark.parametrize("cache_mode", [CacheMode.WB, CacheMode.WO]) +@pytest.mark.parametrizex("cache_line_size", CacheLineSize) +@pytest.mark.parametrizex("cache_mode", [CacheMode.WB, CacheMode.WO]) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_cache_write_lazy_insert_error(cache_mode, cache_line_size): diff --git a/test/functional/tests/fault_injection/test_fault_injection_interrupts.py b/test/functional/tests/fault_injection/test_fault_injection_interrupts.py index d8a3a6d..460b6a8 100644 --- a/test/functional/tests/fault_injection/test_fault_injection_interrupts.py +++ b/test/functional/tests/fault_injection/test_fault_injection_interrupts.py @@ -21,8 +21,8 @@ iterations_per_config = 10 cache_size = Size(16, Unit.GibiByte) -@pytest.mark.parametrize("filesystem", Filesystem) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_interrupt_core_flush(cache_mode, filesystem): @@ -100,8 +100,8 @@ def test_interrupt_core_flush(cache_mode, filesystem): core_part.unmount() -@pytest.mark.parametrize("filesystem", Filesystem) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_interrupt_cache_flush(cache_mode, filesystem): @@ -179,8 +179,8 @@ def test_interrupt_cache_flush(cache_mode, filesystem): core_part.unmount() -@pytest.mark.parametrize("filesystem", Filesystem) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_interrupt_core_remove(cache_mode, filesystem): @@ -271,8 +271,8 @@ def test_interrupt_core_remove(cache_mode, filesystem): core_part.unmount() -@pytest.mark.parametrize("filesystem", Filesystem) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_interrupt_cache_mode_switch_immediately(cache_mode, filesystem): @@ -352,8 +352,8 @@ def test_interrupt_cache_mode_switch_immediately(cache_mode, filesystem): core_part.unmount() -@pytest.mark.parametrize("filesystem", Filesystem) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_interrupt_cache_mode_switch_delayed(cache_mode, filesystem): @@ -428,8 +428,8 @@ def test_interrupt_cache_mode_switch_delayed(cache_mode, filesystem): core_part.unmount() -@pytest.mark.parametrize("filesystem", Filesystem) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_interrupt_cache_stop(cache_mode, filesystem): diff --git a/test/functional/tests/fault_injection/test_fault_injection_opencas_load.py b/test/functional/tests/fault_injection/test_fault_injection_opencas_load.py index b6c0f42..8d0c09e 100644 --- a/test/functional/tests/fault_injection/test_fault_injection_opencas_load.py +++ b/test/functional/tests/fault_injection/test_fault_injection_opencas_load.py @@ -19,8 +19,8 @@ mount_point = "/mnt/cas" test_file_path = f"{mount_point}/test_file" -@pytest.mark.parametrize("filesystem", Filesystem) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_stop_no_flush_load_cache(cache_mode, filesystem): diff --git a/test/functional/tests/fault_injection/test_fault_injection_with_mounted_core.py b/test/functional/tests/fault_injection/test_fault_injection_with_mounted_core.py index 742f62c..7771613 100644 --- a/test/functional/tests/fault_injection/test_fault_injection_with_mounted_core.py +++ b/test/functional/tests/fault_injection/test_fault_injection_with_mounted_core.py @@ -17,7 +17,7 @@ mount_point = "/mnt/cas" test_file_path = f"{mount_point}/test_file" -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_load_cache_with_mounted_core(cache_mode): @@ -78,7 +78,7 @@ def test_load_cache_with_mounted_core(cache_mode): casadm.stop_all_caches() -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_stop_cache_with_mounted_partition(cache_mode): @@ -122,7 +122,7 @@ def test_stop_cache_with_mounted_partition(cache_mode): casadm.stop_all_caches() -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_add_cached_core(cache_mode): diff --git a/test/functional/tests/fault_injection/test_primary_device_error.py b/test/functional/tests/fault_injection/test_primary_device_error.py index 1732d10..db75bc5 100644 --- a/test/functional/tests/fault_injection/test_primary_device_error.py +++ b/test/functional/tests/fault_injection/test_primary_device_error.py @@ -21,9 +21,9 @@ from test_utils.os_utils import Udev from test_utils.size import Size, Unit -@pytest.mark.parametrize("cache_line_size", CacheLineSize) -@pytest.mark.parametrize("cache_mode", CacheMode) -@pytest.mark.parametrize("io_dir", [ReadWrite.randread, ReadWrite.randwrite]) +@pytest.mark.parametrizex("cache_line_size", CacheLineSize) +@pytest.mark.parametrizex("cache_mode", CacheMode) +@pytest.mark.parametrizex("io_dir", [ReadWrite.randread, ReadWrite.randwrite]) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_core_device_error(io_dir, cache_mode, cache_line_size): diff --git a/test/functional/tests/fault_injection/test_soft_hot_plug_device.py b/test/functional/tests/fault_injection/test_soft_hot_plug_device.py index 332973c..a79797f 100644 --- a/test/functional/tests/fault_injection/test_soft_hot_plug_device.py +++ b/test/functional/tests/fault_injection/test_soft_hot_plug_device.py @@ -18,7 +18,7 @@ from test_tools.fio.fio import Fio from test_tools.fio.fio_param import ReadWrite, IoEngine, ErrorFilter -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_soft_hot_plug_cache(cache_mode): @@ -94,7 +94,7 @@ def test_soft_hot_plug_cache(cache_mode): cache_dev.plug() -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core1", DiskTypeLowerThan("cache")) @pytest.mark.require_disk("core2", DiskTypeLowerThan("cache")) diff --git a/test/functional/tests/incremental_load/test_incremental_load.py b/test/functional/tests/incremental_load/test_incremental_load.py index c1aad57..114adcc 100644 --- a/test/functional/tests/incremental_load/test_incremental_load.py +++ b/test/functional/tests/incremental_load/test_incremental_load.py @@ -336,7 +336,7 @@ def test_preserve_data_for_inactive_device(): cache.stop() -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core1", DiskTypeSet([DiskType.sata, DiskType.hdd, DiskType.hdd4k])) @pytest.mark.require_disk("core2", DiskTypeSet([DiskType.sata, DiskType.hdd, DiskType.hdd4k])) diff --git a/test/functional/tests/incremental_load/test_udev.py b/test/functional/tests/incremental_load/test_udev.py index f13e203..89500db 100644 --- a/test/functional/tests/incremental_load/test_udev.py +++ b/test/functional/tests/incremental_load/test_udev.py @@ -98,7 +98,7 @@ def test_udev_core(): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) def test_udev_cache_load(cache_mode): """ title: CAS udev rule execution after unplugging and plugging cache device. diff --git a/test/functional/tests/initialize/test_initialize_load.py b/test/functional/tests/initialize/test_initialize_load.py index da868b3..73b26ad 100644 --- a/test/functional/tests/initialize/test_initialize_load.py +++ b/test/functional/tests/initialize/test_initialize_load.py @@ -19,10 +19,10 @@ from test_tools.fio.fio_param import * from test_utils.size import Size, Unit -@pytest.mark.parametrize("cores_amount", [1, 4]) -@pytest.mark.parametrize("cleaning_policy", CleaningPolicy) -@pytest.mark.parametrize("cache_mode", CacheMode) -@pytest.mark.parametrize("cache_line_size", CacheLineSize) +@pytest.mark.parametrizex("cores_amount", [1, 4]) +@pytest.mark.parametrizex("cleaning_policy", CleaningPolicy) +@pytest.mark.parametrizex("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_line_size", CacheLineSize) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_load_x_to_one_without_params(cache_mode, cleaning_policy, cache_line_size, cores_amount): @@ -145,10 +145,10 @@ def test_load_x_to_one_without_params(cache_mode, cleaning_policy, cache_line_si casadm.stop_all_caches() -@pytest.mark.parametrize("cores_amount", [1, 4]) -@pytest.mark.parametrize("cleaning_policy", CleaningPolicy) -@pytest.mark.parametrize("cache_mode", CacheMode) -@pytest.mark.parametrize("cache_line_size", CacheLineSize) +@pytest.mark.parametrizex("cores_amount", [1, 4]) +@pytest.mark.parametrizex("cleaning_policy", CleaningPolicy) +@pytest.mark.parametrizex("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_line_size", CacheLineSize) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_load_x_to_one_with_params(cache_mode, cleaning_policy, cache_line_size, cores_amount): @@ -272,13 +272,13 @@ def test_load_x_to_one_with_params(cache_mode, cleaning_policy, cache_line_size, casadm.stop_all_caches() -@pytest.mark.parametrize("cores_amount", [1, 4]) -@pytest.mark.parametrize("cleaning_policy", CleaningPolicy) @pytest.mark.parametrize("cache_mode", [[CacheMode.WT, CacheMode.WB], [CacheMode.WB, CacheMode.WA], [CacheMode.WA, CacheMode.PT], [CacheMode.PT, CacheMode.WO], [CacheMode.WO, CacheMode.WT]]) +@pytest.mark.parametrizex("cores_amount", [1, 4]) +@pytest.mark.parametrizex("cleaning_policy", CleaningPolicy) @pytest.mark.parametrize("cache_line_size", [[CacheLineSize.LINE_4KiB, CacheLineSize.LINE_8KiB], [CacheLineSize.LINE_8KiB, CacheLineSize.LINE_16KiB], [CacheLineSize.LINE_16KiB, CacheLineSize.LINE_32KiB], diff --git a/test/functional/tests/initialize/test_initialize_runlevel.py b/test/functional/tests/initialize/test_initialize_runlevel.py index 7444a7e..3f9cf88 100644 --- a/test/functional/tests/initialize/test_initialize_runlevel.py +++ b/test/functional/tests/initialize/test_initialize_runlevel.py @@ -24,8 +24,8 @@ mount_point = "/mnt/test" @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("runlevel", [Runlevel.runlevel5, Runlevel.runlevel3]) -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("runlevel", [Runlevel.runlevel5, Runlevel.runlevel3]) +@pytest.mark.parametrizex("cache_mode", CacheMode) def test_init_reboot_runlevels(runlevel, cache_mode): """ title: Initialize CAS devices after reboot diff --git a/test/functional/tests/initialize/test_startup_init_config.py b/test/functional/tests/initialize/test_startup_init_config.py index 5943994..e404187 100644 --- a/test/functional/tests/initialize/test_startup_init_config.py +++ b/test/functional/tests/initialize/test_startup_init_config.py @@ -25,8 +25,8 @@ filepath = f"{mountpoint}/file" @pytest.mark.remote_only @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("cache_mode", CacheMode) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode) +@pytest.mark.parametrizex("filesystem", Filesystem) def test_cas_startup(cache_mode, filesystem): """ title: Test for starting CAS on system startup. diff --git a/test/functional/tests/io/test_write_fetch.py b/test/functional/tests/io/test_write_fetch.py index 2d3cbb4..2149354 100644 --- a/test/functional/tests/io/test_write_fetch.py +++ b/test/functional/tests/io/test_write_fetch.py @@ -17,9 +17,9 @@ from test_utils.size import Size, Unit @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("cache_mode", [mode for mode in CacheMode if +@pytest.mark.parametrizex("cache_mode", [mode for mode in CacheMode if CacheModeTrait.InsertWrite & mode.get_traits(mode)]) -@pytest.mark.parametrize("cache_line_size", CacheLineSize) +@pytest.mark.parametrizex("cache_line_size", CacheLineSize) def test_write_fetch_full_misses(cache_mode, cache_line_size): """ title: No caching of full write miss operations with block size smaller than cache line size @@ -61,9 +61,9 @@ def test_write_fetch_full_misses(cache_mode, cache_line_size): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("cache_mode", [mode for mode in CacheMode if +@pytest.mark.parametrizex("cache_mode", [mode for mode in CacheMode if CacheModeTrait.InsertWrite & CacheMode.get_traits(mode)]) -@pytest.mark.parametrize("cache_line_size", CacheLineSize) +@pytest.mark.parametrizex("cache_line_size", CacheLineSize) def test_write_fetch_partial_misses(cache_mode, cache_line_size): """ title: No caching of partial write miss operations diff --git a/test/functional/tests/io_class/test_io_class_cli.py b/test/functional/tests/io_class/test_io_class_cli.py index 64ab41d..e72b5d5 100644 --- a/test/functional/tests/io_class/test_io_class_cli.py +++ b/test/functional/tests/io_class/test_io_class_cli.py @@ -20,7 +20,7 @@ ioclass_config_path = "/tmp/opencas_ioclass.conf" @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) def test_ioclass_export_configuration(cache_mode): """ title: Export IO class configuration to a file diff --git a/test/functional/tests/io_class/test_io_class_core_id.py b/test/functional/tests/io_class/test_io_class_core_id.py index 2dbeec3..e1e9d43 100644 --- a/test/functional/tests/io_class/test_io_class_core_id.py +++ b/test/functional/tests/io_class/test_io_class_core_id.py @@ -25,7 +25,7 @@ not_cached_mountpoint = "/tmp/ioclass_core_id_test/not_cached" @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", [fs for fs in Filesystem] + [None]) +@pytest.mark.parametrizex("filesystem", [fs for fs in Filesystem] + [None]) def test_ioclass_core_id(filesystem): """ title: Test for `core_id` classification rule diff --git a/test/functional/tests/io_class/test_io_class_directory.py b/test/functional/tests/io_class/test_io_class_directory.py index 203e9e0..4007994 100644 --- a/test/functional/tests/io_class/test_io_class_directory.py +++ b/test/functional/tests/io_class/test_io_class_directory.py @@ -20,7 +20,7 @@ from .io_class_common import * @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("filesystem", Filesystem) def test_ioclass_directory_depth(filesystem): """ Test if directory classification works properly for deeply nested directories for read and @@ -111,7 +111,7 @@ def test_ioclass_directory_depth(filesystem): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("filesystem", Filesystem) def test_ioclass_directory_dir_operations(filesystem): """ Test if directory classification works properly after directory operations like move or rename. @@ -283,7 +283,7 @@ def test_ioclass_directory_dir_operations(filesystem): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("filesystem", Filesystem) def test_ioclass_directory_file_operations(filesystem): """ Test if directory classification works properly after file operations like move or rename. diff --git a/test/functional/tests/io_class/test_io_class_file.py b/test/functional/tests/io_class/test_io_class_file.py index cfa67e9..1b3d3b2 100644 --- a/test/functional/tests/io_class/test_io_class_file.py +++ b/test/functional/tests/io_class/test_io_class_file.py @@ -305,7 +305,7 @@ def test_ioclass_file_offset(): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("filesystem", Filesystem) def test_ioclass_file_size(filesystem): """ File size IO class rules are configured in a way that each tested file size is unambiguously diff --git a/test/functional/tests/io_class/test_io_classification.py b/test/functional/tests/io_class/test_io_classification.py index c797e79..f72ae62 100644 --- a/test/functional/tests/io_class/test_io_classification.py +++ b/test/functional/tests/io_class/test_io_classification.py @@ -161,7 +161,7 @@ def test_ioclass_request_size(): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", list(Filesystem) + [False]) +@pytest.mark.parametrizex("filesystem", list(Filesystem) + [False]) def test_ioclass_direct(filesystem): """ Perform buffered/direct IO to/from files or raw block device. @@ -246,7 +246,7 @@ def test_ioclass_direct(filesystem): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("filesystem", Filesystem) def test_ioclass_metadata(filesystem): """ Perform operations on files that cause metadata update. @@ -336,7 +336,7 @@ def test_ioclass_metadata(filesystem): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("filesystem", Filesystem) def test_ioclass_id_as_condition(filesystem): """ Load config in which IO class ids are used as conditions in other IO class definitions. @@ -475,7 +475,7 @@ def test_ioclass_id_as_condition(filesystem): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("filesystem", Filesystem) def test_ioclass_conditions_or(filesystem): """ Load config with IO class combining 5 contradicting conditions connected by OR operator. @@ -523,7 +523,7 @@ def test_ioclass_conditions_or(filesystem): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("filesystem", Filesystem) def test_ioclass_conditions_and(filesystem): """ Load config with IO class combining 5 conditions contradicting at least one other condition @@ -572,7 +572,7 @@ def test_ioclass_conditions_and(filesystem): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("filesystem", Filesystem) def test_ioclass_effective_ioclass(filesystem): """ title: Effective IO class with multiple non-exclusive conditions diff --git a/test/functional/tests/lazy_writes/cleaning_policy/acp_params.py b/test/functional/tests/lazy_writes/cleaning_policy/acp_params.py index 512d0f5..9361806 100644 --- a/test/functional/tests/lazy_writes/cleaning_policy/acp_params.py +++ b/test/functional/tests/lazy_writes/cleaning_policy/acp_params.py @@ -27,11 +27,11 @@ from api.cas.cache_config import ( from test_tools.blktrace import BlkTrace, BlkTraceMask, ActionKind, RwbsKind -@pytest.mark.parametrize( +@pytest.mark.parametrizex( "cache_line_size", [CacheLineSize.LINE_4KiB, CacheLineSize.LINE_16KiB, CacheLineSize.LINE_64KiB], ) -@pytest.mark.parametrize( +@pytest.mark.parametrizex( "cache_mode", CacheMode.with_any_trait(CacheModeTrait.LazyWrites) ) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @@ -125,11 +125,11 @@ def test_acp_param_flush_max_buffers(cache_line_size, cache_mode): casadm.stop_all_caches() -@pytest.mark.parametrize( +@pytest.mark.parametrizex( "cache_line_size", [CacheLineSize.LINE_4KiB, CacheLineSize.LINE_16KiB, CacheLineSize.LINE_64KiB], ) -@pytest.mark.parametrize( +@pytest.mark.parametrizex( "cache_mode", CacheMode.with_any_trait(CacheModeTrait.LazyWrites) ) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) diff --git a/test/functional/tests/lazy_writes/cleaning_policy/test_acp.py b/test/functional/tests/lazy_writes/cleaning_policy/test_acp.py index 6fe215d..068c786 100644 --- a/test/functional/tests/lazy_writes/cleaning_policy/test_acp.py +++ b/test/functional/tests/lazy_writes/cleaning_policy/test_acp.py @@ -21,7 +21,7 @@ from test_utils.size import Size, Unit @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) def test_acp_functional(cache_mode): """ title: Validate ACP behavior. diff --git a/test/functional/tests/lazy_writes/recovery/test_recovery_all_options.py b/test/functional/tests/lazy_writes/recovery/test_recovery_all_options.py index ae989c9..6293fc8 100644 --- a/test/functional/tests/lazy_writes/recovery/test_recovery_all_options.py +++ b/test/functional/tests/lazy_writes/recovery/test_recovery_all_options.py @@ -29,10 +29,10 @@ other_pattern = "0x0000" @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) -@pytest.mark.parametrize("cleaning_policy", CleaningPolicy) -@pytest.mark.parametrize("cache_line_size", CacheLineSize) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cleaning_policy", CleaningPolicy) +@pytest.mark.parametrizex("cache_line_size", CacheLineSize) +@pytest.mark.parametrizex("filesystem", Filesystem) @pytest.mark.require_plugin("power_control") def test_recovery_all_options(cache_mode, cache_line_size, cleaning_policy, filesystem): """ diff --git a/test/functional/tests/lazy_writes/recovery/test_recovery_flush_reset.py b/test/functional/tests/lazy_writes/recovery/test_recovery_flush_reset.py index 1b70003..95e84b3 100644 --- a/test/functional/tests/lazy_writes/recovery/test_recovery_flush_reset.py +++ b/test/functional/tests/lazy_writes/recovery/test_recovery_flush_reset.py @@ -24,7 +24,7 @@ test_file_size = Size(1.5, Unit.GibiByte) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_plugin("power_control") def test_recovery_flush_reset_raw(cache_mode): """ @@ -103,8 +103,8 @@ def test_recovery_flush_reset_raw(cache_mode): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) -@pytest.mark.parametrize("fs", [Filesystem.xfs, Filesystem.ext4]) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("fs", [Filesystem.xfs, Filesystem.ext4]) @pytest.mark.require_plugin("power_control") def test_recovery_flush_reset_fs(cache_mode, fs): """ diff --git a/test/functional/tests/lazy_writes/recovery/test_recovery_unplug.py b/test/functional/tests/lazy_writes/recovery/test_recovery_unplug.py index 508605f..59c2056 100644 --- a/test/functional/tests/lazy_writes/recovery/test_recovery_unplug.py +++ b/test/functional/tests/lazy_writes/recovery/test_recovery_unplug.py @@ -22,10 +22,10 @@ test_file_path = os.path.join(mount_point, "test_file") @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) -@pytest.mark.parametrize("cls", [CacheLineSize.LINE_4KiB, CacheLineSize.LINE_64KiB]) -@pytest.mark.parametrize("filesystem", Filesystem) -@pytest.mark.parametrize("direct", [True, False]) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cls", [CacheLineSize.LINE_4KiB, CacheLineSize.LINE_64KiB]) +@pytest.mark.parametrizex("filesystem", Filesystem) +@pytest.mark.parametrizex("direct", [True, False]) @pytest.mark.require_plugin("power_control") def test_recovery_unplug_cache_fs(cache_mode, cls, filesystem, direct): """ @@ -102,8 +102,8 @@ def test_recovery_unplug_cache_fs(cache_mode, cls, filesystem, direct): @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) -@pytest.mark.parametrize("cls", [CacheLineSize.LINE_4KiB, CacheLineSize.LINE_64KiB]) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cls", [CacheLineSize.LINE_4KiB, CacheLineSize.LINE_64KiB]) @pytest.mark.require_plugin("power_control") def test_recovery_unplug_cache_raw(cache_mode, cls): """ diff --git a/test/functional/tests/lazy_writes/test_lazy_writes_clean.py b/test/functional/tests/lazy_writes/test_lazy_writes_clean.py index 9754f2c..de6d5aa 100644 --- a/test/functional/tests/lazy_writes/test_lazy_writes_clean.py +++ b/test/functional/tests/lazy_writes/test_lazy_writes_clean.py @@ -22,7 +22,7 @@ bs = Size(512, Unit.KibiByte) mnt_point = "/mnt/cas/" -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_clean_stop_cache(cache_mode): @@ -152,8 +152,8 @@ def test_clean_stop_cache(cache_mode): test_file_3.remove(True) -@pytest.mark.parametrize("fs", Filesystem) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("fs", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_clean_remove_core_with_fs(cache_mode, fs): @@ -238,7 +238,7 @@ def test_clean_remove_core_with_fs(cache_mode, fs): remove(mnt_point, True, True, True) -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_clean_remove_core_without_fs(cache_mode): diff --git a/test/functional/tests/lazy_writes/test_lazy_writes_signals.py b/test/functional/tests/lazy_writes/test_lazy_writes_signals.py index 669a980..2f0670c 100644 --- a/test/functional/tests/lazy_writes/test_lazy_writes_signals.py +++ b/test/functional/tests/lazy_writes/test_lazy_writes_signals.py @@ -25,7 +25,7 @@ syslog_path = "/var/log/messages" @pytest.mark.require_plugin("scsi_debug_fua_signals", dev_size_mb="4096", opts="1") -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) def test_flush_signal_core(cache_mode): """ @@ -122,7 +122,7 @@ def test_flush_signal_core(cache_mode): @pytest.mark.require_plugin("scsi_debug_fua_signals", dev_size_mb="2048", opts="1") -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("core", DiskTypeSet([DiskType.hdd, DiskType.hdd4k, DiskType.sata])) def test_flush_signal_cache(cache_mode): """ @@ -219,7 +219,7 @@ def test_flush_signal_cache(cache_mode): @pytest.mark.require_plugin("scsi_debug_fua_signals", dev_size_mb="2048", opts="1") -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) def test_flush_signal_multilevel_cache(cache_mode): """ diff --git a/test/functional/tests/stats/test_stat_max.py b/test/functional/tests/stats/test_stat_max.py index 05765fd..cd81bcc 100644 --- a/test/functional/tests/stats/test_stat_max.py +++ b/test/functional/tests/stats/test_stat_max.py @@ -93,7 +93,7 @@ def test_stat_max_cache(): stats_compare(cache_stats, cores_stats, cores_per_cache, fail_message) -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_stat_max_core(cache_mode): diff --git a/test/functional/tests/stress/test_stress_io_small_device.py b/test/functional/tests/stress/test_stress_io_small_device.py index bb1aded..a9a6f50 100644 --- a/test/functional/tests/stress/test_stress_io_small_device.py +++ b/test/functional/tests/stress/test_stress_io_small_device.py @@ -27,7 +27,7 @@ stress_time = timedelta(minutes=30) (CacheMode.WO, CleaningPolicy.acp), (CacheMode.WO, CleaningPolicy.alru), (CacheMode.WO, CleaningPolicy.nop)]) -@pytest.mark.parametrize("cache_line_size", CacheLineSize) +@pytest.mark.parametrizex("cache_line_size", CacheLineSize) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_stress_small_cas_device(cache_line_size, cores_number, cache_config): diff --git a/test/functional/tests/stress/test_stress_shutdown.py b/test/functional/tests/stress/test_stress_shutdown.py index c30a8ec..ac0bd43 100644 --- a/test/functional/tests/stress/test_stress_shutdown.py +++ b/test/functional/tests/stress/test_stress_shutdown.py @@ -19,9 +19,9 @@ cores_number = 2 iterations_per_config = 5 -@pytest.mark.parametrize("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) -@pytest.mark.parametrize("cleaning_policy", CleaningPolicy) -@pytest.mark.parametrize("cache_line_size", CacheLineSize) +@pytest.mark.parametrizex("cache_mode", CacheMode.with_traits(CacheModeTrait.LazyWrites)) +@pytest.mark.parametrizex("cleaning_policy", CleaningPolicy) +@pytest.mark.parametrizex("cache_line_size", CacheLineSize) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) @pytest.mark.require_plugin("power_control") diff --git a/test/functional/tests/stress/test_stress_without_io.py b/test/functional/tests/stress/test_stress_without_io.py index 2ad19ca..611015f 100644 --- a/test/functional/tests/stress/test_stress_without_io.py +++ b/test/functional/tests/stress/test_stress_without_io.py @@ -21,7 +21,7 @@ mount_point = "/mnt/cas" test_file_path = f"{mount_point}/test_file" -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_stress_load(cache_mode): @@ -60,7 +60,7 @@ def test_stress_load(cache_mode): casadm.stop_all_caches() -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_stress_service(cache_mode): @@ -108,7 +108,7 @@ def test_stress_service(cache_mode): InitConfig.create_default_init_config() -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_stress_start(cache_mode): @@ -144,7 +144,7 @@ def test_stress_start(cache_mode): casadm.stop_all_caches() -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_stress_reload_cache(cache_mode): @@ -188,7 +188,7 @@ def test_stress_reload_cache(cache_mode): casadm.stop_all_caches() -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_stress_add_remove_core(cache_mode): @@ -233,7 +233,7 @@ def test_stress_add_remove_core(cache_mode): casadm.stop_all_caches() -@pytest.mark.parametrize("cache_mode", CacheMode) +@pytest.mark.parametrizex("cache_mode", CacheMode) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_stress_reload_module(cache_mode): diff --git a/test/functional/tests/volumes/test_volume_partitions.py b/test/functional/tests/volumes/test_volume_partitions.py index 08529ca..872bf29 100644 --- a/test/functional/tests/volumes/test_volume_partitions.py +++ b/test/functional/tests/volumes/test_volume_partitions.py @@ -18,9 +18,9 @@ mount_point = "/mnt/cas" cores_number = 16 -@pytest.mark.parametrize("cache_mode", CacheMode) -@pytest.mark.parametrize("partition_table", PartitionTable) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode) +@pytest.mark.parametrizex("partition_table", PartitionTable) +@pytest.mark.parametrizex("filesystem", Filesystem) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_cas_preserves_partitions(partition_table, filesystem, cache_mode): @@ -92,9 +92,9 @@ def test_cas_preserves_partitions(partition_table, filesystem, cache_mode): TestRun.fail("Md5 sums are different.") -@pytest.mark.parametrize("cache_mode", CacheMode) -@pytest.mark.parametrize("partition_table", PartitionTable) -@pytest.mark.parametrize("filesystem", Filesystem) +@pytest.mark.parametrizex("cache_mode", CacheMode) +@pytest.mark.parametrizex("partition_table", PartitionTable) +@pytest.mark.parametrizex("filesystem", Filesystem) @pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand])) @pytest.mark.require_disk("core", DiskTypeLowerThan("cache")) def test_partition_create_cas(partition_table, filesystem, cache_mode):