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: <[email protected]> # 6.19.x
Signed-off-by: SJ Park <[email protected]>
---
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 4a536d41cdb2d..b643f9a83f14a 100644
--- a/mm/damon/tests/core-kunit.h
+++ b/mm/damon/tests/core-kunit.h
@@ -787,6 +787,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