Skip to contentSkip to conversation

mm-damon-tests-core-kunit-add-damos_commit_quota-test.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Nov 20, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/damon/tests/core-kunit: add damos_commit_quota() test
has been removed from the -mm tree. Its filename was
mm-damon-tests-core-kunit-add-damos_commit_quota-test.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <[email protected]>
Subject: mm/damon/tests/core-kunit: add damos_commit_quota() test
Date: Tue, 11 Nov 2025 10:44:06 -0800

Add a new unit test for damos_commit_quota().

---

 mm/damon/tests/core-kunit.h |   33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
mm/damon/tests/core-kunit.h renamed from mm/damon/tests/core-kunit.h~mm-damon-tests-core-kunit-add-damos_commit_quota-test +33 -0
@@ -660,6 +660,38 @@ static void damos_test_commit_quota_goal
 			(struct damos_quota_goal[]){}, 0);
 }
 
+static void damos_test_commit_quota(struct kunit *test)
+{
+	struct damos_quota dst = {
+		.reset_interval = 1,
+		.ms = 2,
+		.sz = 3,
+		.weight_sz = 4,
+		.weight_nr_accesses = 5,
+		.weight_age = 6,
+	};
+	struct damos_quota src = {
+		.reset_interval = 7,
+		.ms = 8,
+		.sz = 9,
+		.weight_sz = 10,
+		.weight_nr_accesses = 11,
+		.weight_age = 12,
+	};
+
+	INIT_LIST_HEAD(&dst.goals);
+	INIT_LIST_HEAD(&src.goals);
+
+	damos_commit_quota(&dst, &src);
+
+	KUNIT_EXPECT_EQ(test, dst.reset_interval, src.reset_interval);
+	KUNIT_EXPECT_EQ(test, dst.ms, src.ms);
+	KUNIT_EXPECT_EQ(test, dst.sz, src.sz);
+	KUNIT_EXPECT_EQ(test, dst.weight_sz, src.weight_sz);
+	KUNIT_EXPECT_EQ(test, dst.weight_nr_accesses, src.weight_nr_accesses);
+	KUNIT_EXPECT_EQ(test, dst.weight_age, src.weight_age);
+}
+
 static void damos_test_commit_filter_for(struct kunit *test,
 		struct damos_filter *dst, struct damos_filter *src)
 {
@@ -947,6 +979,7 @@ static struct kunit_case damon_test_case
 	KUNIT_CASE(damos_test_new_filter),
 	KUNIT_CASE(damos_test_commit_quota_goal),
 	KUNIT_CASE(damos_test_commit_quota_goals),
+	KUNIT_CASE(damos_test_commit_quota),
 	KUNIT_CASE(damos_test_commit_filter),
 	KUNIT_CASE(damos_test_filter_out),
 	KUNIT_CASE(damon_test_feed_loop_next_input),

_

Patches currently in -mm which might be from [email protected] are