aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
authorSeongJae Park <sj@kernel.org>2026-04-27 08:12:25 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-05-28 21:04:59 -0700
commiteb1ae61075f3c9e4e395f23993b5f3593a2e8ff1 (patch)
tree220338995093a4cb4457205df67002be38c34da9 /mm
parentf0cefc367686a5fb1de0b9b0a3bcd179ef5e67ee (diff)
downloadlinux-next-history-eb1ae61075f3c9e4e395f23993b5f3593a2e8ff1.tar.gz
mm/damon/tests/core-kunit: test pause commitment
Add a kunit test for commitment of damon_ctx->pause parameter that can be done using damon_commit_ctx(). Link: https://lore.kernel.org/20260427151231.113429-7-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Brendan Higgins <brendan.higgins@linux.dev> Cc: David Hildenbrand <david@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/damon/tests/core-kunit.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
index 6de622a2fd799..1b23a22ac04c4 100644
--- a/mm/damon/tests/core-kunit.h
+++ b/mm/damon/tests/core-kunit.h
@@ -1083,6 +1083,10 @@ static void damon_test_commit_ctx(struct kunit *test)
KUNIT_EXPECT_EQ(test, damon_commit_ctx(dst, src), 0);
src->min_region_sz = 4095;
KUNIT_EXPECT_EQ(test, damon_commit_ctx(dst, src), -EINVAL);
+ src->min_region_sz = 4096;
+ src->pause = true;
+ KUNIT_EXPECT_EQ(test, damon_commit_ctx(dst, src), 0);
+ KUNIT_EXPECT_TRUE(test, dst->pause);
damon_destroy_ctx(src);
damon_destroy_ctx(dst);
}