[PATCH 2/3] mm/damon/tests/core-kunit: test DAMOS_FILTER_TYPE_AGE_MS in damos_filter_for_ops()
From: Jason Angelov
Date: Fri Nov 13 2026 - 11:49:56 EST
DAMOS_FILTER_TYPE_AGE_MS is core filter, not ops filter.
add kunit test covering this rejection.
Signed-off-by: Jason Angelov <jasonangelov@xxxxxxxx>
---
mm/damon/tests/core-kunit.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
index 0eb5dcdba0ae..fb84d30a712d 100644
--- a/mm/damon/tests/core-kunit.h
+++ b/mm/damon/tests/core-kunit.h
@@ -1832,6 +1832,11 @@ static void damon_test_valid_probe_params(struct kunit *test)
damon_destroy_ctx(ctx);
}
+static void damos_test_age_ms_filter_is_core(struct kunit *test)
+{
+ KUNIT_EXPECT_FALSE(test, damos_filter_for_ops(DAMOS_FILTER_TYPE_AGE_MS));
+}
+
static void damos_test_filter_out(struct kunit *test)
{
struct damon_target *t;
@@ -2593,6 +2598,7 @@ static struct kunit_case damon_test_cases[] = {
KUNIT_CASE(damon_test_commit_ctx),
KUNIT_CASE(damon_test_commit_ctx_keeps_quota),
KUNIT_CASE(damon_test_valid_probe_params),
+ KUNIT_CASE(damos_test_age_ms_filter_is_core),
KUNIT_CASE(damos_test_filter_out),
KUNIT_CASE(damos_test_apply_scheme_filtered_sz),
KUNIT_CASE(damos_test_apply_scheme_filter_sz_unchanged),
--
2.53.0