[PATCH 1/4] mm/damon/tests/core-kunit: test committing psi goal to psi goal
From: SJ Park
Date: Tue Sep 01 2026 - 20:27:49 EST
damon_test_commit_quota_goal_for() is set to test committing a new psi
goal on an existing psi goal. However, damon_test_commit_quota_goal()
is mistakenly not covering the test case. Add the test case.
Fixes: 99f89debafc5 ("mm/damon/tests/core-kunit: add damos_commit_quota_goal() test")
Cc: <stable@xxxxxxxxxxxxxxx> # 6.19.x
Signed-off-by: SJ Park <sj@xxxxxxxxxx>
---
mm/damon/tests/core-kunit.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
index 7071ec277b007..f1e11548c771b 100644
--- a/mm/damon/tests/core-kunit.h
+++ b/mm/damon/tests/core-kunit.h
@@ -793,6 +793,13 @@ static void damos_test_commit_quota_goal(struct kunit *test)
.last_psi_total = 456,
};
+ damos_test_commit_quota_goal_for(test, &dst,
+ &(struct damos_quota_goal) {
+ .metric = DAMOS_QUOTA_SOME_MEM_PSI_US,
+ .target_value = 234,
+ .current_value = 345,
+ .last_psi_total = 567,
+ });
damos_test_commit_quota_goal_for(test, &dst,
&(struct damos_quota_goal){
.metric = DAMOS_QUOTA_USER_INPUT,
--
2.47.3