From 12cc071559f62d249231b4ca6fc0a57f2cf1c8cc Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Fri, 30 Jan 2026 00:06:57 +0100 Subject: [PATCH 1/4] tests: api: Update WLTH support kernel version range Signed-off-by: Robert Baldyga --- test/functional/api/cas/ioclass_config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/functional/api/cas/ioclass_config.py b/test/functional/api/cas/ioclass_config.py index 3326dab7b..37c674ee5 100644 --- a/test/functional/api/cas/ioclass_config.py +++ b/test/functional/api/cas/ioclass_config.py @@ -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 # @@ -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) From 8eeee1078fb16ec532f2ea60acdf05207727bb8f Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Fri, 30 Jan 2026 00:08:57 +0100 Subject: [PATCH 2/4] tests: Convert to argument to integer Size.generate_random_size() expects min_size and max_size to be integers. Convert the value to match the parameter type. Signed-off-by: Robert Baldyga --- test/functional/tests/cache_ops/test_seq_cutoff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/tests/cache_ops/test_seq_cutoff.py b/test/functional/tests/cache_ops/test_seq_cutoff.py index ae76a292c..9dbb6671d 100644 --- a/test/functional/tests/cache_ops/test_seq_cutoff.py +++ b/test/functional/tests/cache_ops/test_seq_cutoff.py @@ -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 # @@ -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) From 9021c22e1cd2612567f2680d072b959bec3d3612 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Fri, 30 Jan 2026 00:09:38 +0100 Subject: [PATCH 3/4] tests: test_consistency_between_outputs: Fix import after API changes Signed-off-by: Robert Baldyga --- .../functional/tests/stats/test_consistency_between_outputs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/tests/stats/test_consistency_between_outputs.py b/test/functional/tests/stats/test_consistency_between_outputs.py index 4fb993007..417c246ed 100644 --- a/test/functional/tests/stats/test_consistency_between_outputs.py +++ b/test/functional/tests/stats/test_consistency_between_outputs.py @@ -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 # @@ -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) From 1de3f356ef45a4469ba2dd5a3abcb01ccd8b0c16 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Thu, 16 Oct 2025 14:44:08 +0200 Subject: [PATCH 4/4] test api: cast ALRU inertia to int in cache api The casadm api expects that the ALRU params as ints, so the conversion from Size to int must happen in the higher level api Signed-off-by: Michal Mielewczyk --- test/functional/api/cas/cache.py | 10 +++++++--- test/functional/api/cas/casadm.py | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/test/functional/api/cas/cache.py b/test/functional/api/cas/cache.py index 247d2ba9d..a5b6d373d 100644 --- a/test/functional/api/cas/cache.py +++ b/test/functional/api/cas/cache.py @@ -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 # @@ -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: @@ -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: diff --git a/test/functional/api/cas/casadm.py b/test/functional/api/cas/casadm.py index 0fecccb52..6fe1dd7ac 100644 --- a/test/functional/api/cas/casadm.py +++ b/test/functional/api/cas/casadm.py @@ -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 # @@ -187,7 +187,7 @@ 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 @@ -195,7 +195,7 @@ def set_param_cleaning_alru( _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),