Re: [PATCH v1 2/2] mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region

From: SJ Park

Date: Wed Sep 16 2026 - 21:27:07 EST


On Thu, 17 Sep 2026 09:35:53 +0900 Donggeun Yoo <donggeunyoo.kernel@xxxxxxxxx> wrote:

> damos_test_filter_out() checks that an address range filter splits a
> region at the filter boundary, and stops there. Nothing checks what
> damos_apply_scheme() then charges to the quota and reports as tried.
>
> damos_test_apply_scheme_filtered_sz() covers the two ways such a filter
> trims a region: one that starts before the filter's range, and one that
> starts inside it.
>
> damos_test_apply_scheme_filter_sz_unchanged() and
> damos_test_apply_scheme_quota_sz() cover the cases whose accounting must
> not change: a region wholly inside a reject range, one wholly inside an
> allow range, two filters trimming in a single call, a filter type that
> never splits, no filter at all, a region the quota trims, and a quota
> remainder too small for one region.

Thank you for adding these tests! I to be honestly would prefer making the
code shorter, but I wouldn't block this. We could cleanup later if it turns
out causing real readability issues.

>
> Signed-off-by: Donggeun Yoo <donggeunyoo.kernel@xxxxxxxxx>

Reviewed-by: SJ Park <sj@xxxxxxxxxx>


Thanks,
SJ

[...]