DAMOS_FILTER_TYPE_AGE_MS is core filter, not ops filter. Add kunit test covering this rejection. Reviewed-by: SJ Park Signed-off-by: Jason Angelov --- 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 0eb5dcdba0ae..156f74832c40 100644 --- a/mm/damon/tests/core-kunit.h +++ b/mm/damon/tests/core-kunit.h @@ -1832,6 +1832,12 @@ 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 +2599,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