Use parametrizex in tests

Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
Jan Musial 2020-08-10 14:26:40 +02:00
parent d75c49aced
commit 31fda78be4
31 changed files with 108 additions and 108 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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"))

View File

@ -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]))

View File

@ -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.

View File

@ -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],

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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]))

View File

@ -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.

View File

@ -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):
"""

View File

@ -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):
"""

View File

@ -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):
"""

View File

@ -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):

View File

@ -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):
"""

View File

@ -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):

View File

@ -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):

View File

@ -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")

View File

@ -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):

View File

@ -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):