cleanup framework - eviction policy

Signed-off-by: Karolina Rogowska <karolina.rogowska@intel.com>
This commit is contained in:
Karolina Rogowska
2021-07-28 14:08:10 +02:00
parent cb69102f9f
commit beb36f045c
5 changed files with 9 additions and 41 deletions

View File

@@ -5,18 +5,18 @@
import time
from datetime import timedelta
import pytest
from datetime import timedelta
from api.cas import casadm
from api.cas.cache_config import CacheMode
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
from core.test_run import TestRun
from test_utils.size import Size, Unit
from test_utils.os_utils import Udev, sync
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
from test_tools.fio.fio import Fio
from test_tools.fio.fio_param import ReadWrite, IoEngine, VerifyMethod
from test_utils.os_utils import Udev, sync
from test_utils.size import Size, Unit
io_size = Size(10000, Unit.Blocks4096)
@@ -88,11 +88,6 @@ def test_cache_stop_and_load(cache_mode):
f"Cleaning policy is: {check_cache_config.cleaning_policy}, "
f"should be: {cache.get_cleaning_policy()}\n"
)
if check_cache_config.eviction_policy != cache.get_eviction_policy():
failed_params += (
f"Eviction policy is: {check_cache_config.eviction_policy}, "
f"should be: {cache.get_eviction_policy()}\n"
)
if check_cache_config.cache_line_size != cache.get_cache_line_size():
failed_params += (
f"Cache line size is: {check_cache_config.cache_line_size}, "

View File

@@ -4,8 +4,10 @@
#
import pytest
import time
from datetime import timedelta
import pytest
from api.cas import casadm
from api.cas.cache_config import (
@@ -14,7 +16,6 @@ from api.cas.cache_config import (
CacheModeTrait,
CacheStatus,
CleaningPolicy,
EvictionPolicy,
MetadataMode,
PromotionPolicy,
)
@@ -24,13 +25,11 @@ from api.cas.statistics import (
usage_stats, request_stats, block_stats_core, block_stats_cache, error_stats
)
from core.test_run import TestRun
from datetime import timedelta
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
from test_tools.fio.fio import Fio
from test_tools.fio.fio_param import ReadWrite, IoEngine
from test_utils.size import Size, Unit
# One cache instance per every cache mode:
caches_count = len(CacheMode)
cores_per_cache = 4
@@ -275,11 +274,6 @@ def validate_cache_config_statistics(caches, after_io: bool = False):
failed_stats += (
f"For cache number {caches[i].cache_id} number of inactive core devices is "
f"{caches_stats[i].config_stats.inactive_core_dev}, should be 0\n")
if caches_stats[i].config_stats.eviction_policy.upper() != EvictionPolicy.DEFAULT.value:
failed_stats += (
f"For cache number {caches[i].cache_id} eviction policy is "
f"{caches_stats[i].config_stats.eviction_policy.upper()}, "
f"should be {EvictionPolicy.DEFAULT}\n")
if caches_stats[i].config_stats.cleaning_policy.upper() != CleaningPolicy.DEFAULT.value:
failed_stats += (
f"For cache number {caches[i].cache_id} cleaning policy is "