From 1e0122d570b5ae4e7c5ff4cedf64d4662cba9092 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Thu, 7 May 2026 00:58:36 +0200 Subject: [PATCH] tests: Update after adding prefetch ioclass Signed-off-by: Robert Baldyga --- test/functional/api/cas/ioclass_config.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/functional/api/cas/ioclass_config.py b/test/functional/api/cas/ioclass_config.py index d6a5594d5..bb9f7587a 100644 --- a/test/functional/api/cas/ioclass_config.py +++ b/test/functional/api/cas/ioclass_config.py @@ -25,6 +25,8 @@ DEFAULT_IO_CLASS_ID = 0 DEFAULT_IO_CLASS_PRIORITY = 255 DEFAULT_IO_CLASS_RULE = "unclassified" +PREFETCH_IO_CLASS_ID = 33 +PREFETCH_IO_CLASS_RULE = "prefetch" MAX_CLASSIFICATION_DELAY = timedelta(seconds=6) IO_CLASS_CONFIG_HEADER = "IO class id,IO class name,Eviction priority,Allocation" @@ -117,6 +119,10 @@ def save_list_to_config_file( def default(priority=DEFAULT_IO_CLASS_PRIORITY, allocation="1.00"): return IoClass(DEFAULT_IO_CLASS_ID, DEFAULT_IO_CLASS_RULE, priority, allocation) + @staticmethod + def prefetch(priority=DEFAULT_IO_CLASS_PRIORITY, allocation="1.00"): + return IoClass(PREFETCH_IO_CLASS_ID, PREFETCH_IO_CLASS_RULE, priority, allocation) + @staticmethod def default_header_dict(): return { @@ -140,9 +146,13 @@ def generate_random_ioclass_list(count: int, max_priority: int = MAX_IO_CLASS_PR IoClass.default( priority=random.randint(0, max_priority), allocation=f"{random.randint(0, 100) / 100:0.2f}", - ) + ), + IoClass.prefetch( + priority=random.randint(0, max_priority), + allocation=f"{random.randint(0, 100) / 100:0.2f}", + ), ] - for i in range(1, count): + for i in range(1, count - 1): random_list.append( IoClass( i,