Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions test/functional/api/cas/cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Copyright(c) 2019-2021 Intel Corporation
# Copyright(c) 2024-2025 Huawei Technologies Co., Ltd.
# Copyright(c) 2024-2026 Huawei Technologies Co., Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#

Expand Down Expand Up @@ -30,7 +30,7 @@
from connection.utils.output import Output
from storage_devices.device import Device
from test_tools.os_tools import sync
from type_def.size import Size
from type_def.size import Size, Unit


class Cache:
Expand Down Expand Up @@ -210,7 +210,11 @@ def set_params_alru(self, alru_params: FlushParametersAlru) -> Output:
else None
),
(alru_params.dirty_ratio_threshold if alru_params.dirty_ratio_threshold else None),
(alru_params.dirty_ratio_inertia if alru_params.dirty_ratio_inertia else None),
(
int(alru_params.dirty_ratio_inertia.get_value(Unit.MebiByte))
if alru_params.dirty_ratio_inertia
else None
),
)

def set_promotion_policy(self, policy: PromotionPolicy) -> Output:
Expand Down
6 changes: 3 additions & 3 deletions test/functional/api/cas/casadm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Copyright(c) 2019-2022 Intel Corporation
# Copyright(c) 2024-2025 Huawei Technologies Co., Ltd.
# Copyright(c) 2024-2026 Huawei Technologies Co., Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#

Expand Down Expand Up @@ -187,15 +187,15 @@ def set_param_cleaning_alru(
flush_max_buffers: int | None = None,
activity_threshold: int | None = None,
dirty_ratio_threshold: int | None = None,
dirty_ratio_inertia: Size | None = None,
dirty_ratio_inertia: int | None = None,
shortcut: bool = False,
) -> Output:
_wake_up = str(wake_up) if wake_up is not None else None
_staleness_time = str(staleness_time) if staleness_time is not None else None
_flush_max_buffers = str(flush_max_buffers) if flush_max_buffers is not None else None
_activity_threshold = str(activity_threshold) if activity_threshold is not None else None
_dirty_ratio_threshold = str(dirty_ratio_threshold) if dirty_ratio_threshold is not None else None
_dirty_ratio_inertia = str(dirty_ratio_inertia.get_value(Unit.MebiByte)) if dirty_ratio_inertia is not None else None
_dirty_ratio_inertia = str(dirty_ratio_inertia) if dirty_ratio_inertia is not None else None
output = TestRun.executor.run(
set_param_cleaning_alru_cmd(
cache_id=str(cache_id),
Expand Down
5 changes: 4 additions & 1 deletion test/functional/api/cas/ioclass_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright(c) 2019-2022 Intel Corporation
# Copyright(c) 2024-2025 Huawei Technologies Co., Ltd.
# Copyright(c) 2026 Unvertical
# SPDX-License-Identifier: BSD-3-Clause
#

Expand Down Expand Up @@ -166,7 +167,9 @@ def set_random_rule(self):
"file_offset",
"request_size",
]
if get_kernel_version() >= version.Version("4.13"):
if (version.Version("4.13") <= get_kernel_version() <= version.Version("5.17") or
version.Version("6.9") <= get_kernel_version()
):
rules.append("wlth")

rule = random.choice(rules)
Expand Down
3 changes: 2 additions & 1 deletion test/functional/tests/cache_ops/test_seq_cutoff.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright(c) 2019-2021 Intel Corporation
# Copyright(c) 2024-2025 Huawei Technologies Co., Ltd.
# Copyright(c) 2026 Unvertical
# SPDX-License-Identifier: BSD-3-Clause
#

Expand Down Expand Up @@ -407,7 +408,7 @@ def test_seq_cutoff_thresh_fill(cache_line_size, io_dir):
fio_additional_size = Size(10, Unit.Blocks4096)
threshold = Size.generate_random_size(
min_size=1,
max_size=SEQ_CUTOFF_THRESHOLD_MAX.get_value(Unit.KibiByte),
max_size=int(SEQ_CUTOFF_THRESHOLD_MAX.get_value(Unit.KibiByte)),
unit=Unit.KibiByte,
)
io_size = (threshold + fio_additional_size).align_down(0x1000)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright(c) 2020-2021 Intel Corporation
# Copyright(c) 2024-2025 Huawei Technologies Co., Ltd.
# Copyright(c) 2026 Unvertical
# SPDX-License-Identifier: BSD-3-Clause
#

Expand All @@ -15,7 +16,7 @@
from core.test_run import TestRun
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
from test_tools.dd import Dd
from test_utils.size import Size, Unit
from type_def.size import Size, Unit

iterations = 4
cache_size = Size(4, Unit.GibiByte)
Expand Down