Skip to content

Commit 349db08

Browse files
sjp38akpm00
authored andcommitted
selftests/damon/damos_quota_goal: handle minimum quota that cannot be further reduced
damos_quota_goal.py selftest see if DAMOS quota goals tuning feature increases or reduces the effective size quota for given score as expected. The tuning feature sets the minimum quota size as one byte, so if the effective size quota is already one, we cannot expect it further be reduced. However the test is not aware of the edge case, and fails since it shown no expected change of the effective quota. Handle the case by updating the failure logic for no change to see if it was the case, and simply skips to next test input. Link: https://lkml.kernel.org/r/[email protected] Fixes: f1c07c0 ("selftests/damon: add a test for DAMOS quota goal") Signed-off-by: SeongJae Park <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Cc: Shuah Khan <[email protected]> Cc: <[email protected]> [6.10.x] Signed-off-by: Andrew Morton <[email protected]>
1 parent 0a7565e commit 349db08

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/testing/selftests/damon/damos_quota_goal.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def main():
6363
if last_effective_bytes != 0 else -1.0))
6464

6565
if last_effective_bytes == goal.effective_bytes:
66+
# effective quota was already minimum that cannot be more reduced
67+
if expect_increase is False and last_effective_bytes == 1:
68+
continue
6669
print('efective bytes not changed: %d' % goal.effective_bytes)
6770
exit(1)
6871

0 commit comments

Comments
 (0)