Merge pull request #1362 from arutk/fcet

tests: do not run test_core_device_error in lazy write cache modes
This commit is contained in:
Robert Baldyga 2022-09-27 10:10:44 +02:00 committed by GitHub
commit abb48a9cc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -60,6 +60,12 @@ class CacheMode(Enum):
m for m in CacheMode if all(map(lambda t: t in CacheMode.get_traits(m), flags))
]
@staticmethod
def without_traits(flags: CacheModeTrait):
return [
m for m in CacheMode if not any(map(lambda t: t in CacheMode.get_traits(m), flags))
]
@staticmethod
def with_any_trait(flags: CacheModeTrait):
return [

View File

@ -12,6 +12,7 @@ from core.test_run import TestRun
from api.cas import casadm
from api.cas.cache_config import (
CacheMode,
CacheModeTrait,
CacheLineSize,
SeqCutOffPolicy,
CleaningPolicy,
@ -22,7 +23,7 @@ from test_utils.size import Size, Unit
@pytest.mark.parametrizex("cache_line_size", CacheLineSize)
@pytest.mark.parametrizex("cache_mode", CacheMode)
@pytest.mark.parametrizex("cache_mode", CacheMode.without_traits(CacheModeTrait.LazyWrites))
@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"))