Skip to content

Commit

Permalink
tests: add dirty data check to acp test
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
  • Loading branch information
Kamil Gierszewski committed Oct 3, 2024
1 parent 22a1c8f commit ab8b208
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/functional/tests/lazy_writes/cleaning_policy/test_acp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#
# Copyright(c) 2020-2022 Intel Corporation
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#

Expand Down Expand Up @@ -233,6 +234,9 @@ def test_acp_param_flush_max_buffers(cache_line_size, cache_mode):
fio = get_fio_cmd(core, core_size)
fio.run_in_background()
time.sleep(10)
cache_stats = cache.get_statistics()
if cache_stats.usage_stats.dirty == Size.zero():
TestRun.fail("There are no dirty data on cache")

with TestRun.step("Set cleaning policy to ACP."):
cache.set_cleaning_policy(CleaningPolicy.acp)
Expand Down

0 comments on commit ab8b208

Please sign in to comment.