Re: [PATCH 2/2] mm/damon/core-kunit: test damon_valid_probe_params()
From: SJ Park
Date: Tue Aug 18 2026 - 00:57:06 EST
On Tue, 18 Aug 2026 03:45:52 +0000 Jason Angelov <jasonangelov@xxxxxxxx> wrote:
> damon_valid_probe_params() makes damon_commit_ctx() reject probe
> configurations that could overflow a probe_hits counter, a single
> (weight * probe_hits) product, or the sum of those products.
>
> Add a kunit test covering each rejection at its boundary:
>
> - samples per aggregation interval: U8_MAX is allowed, one more could
> overflow a probe_hits counter
> - single weight: the largest whose product fits in unsigned int is
> allowed, one larger is rejected
> - multiple probes: each product fits, but their sum overflows
> - no weight set: the validation is skipped
Thank you for adding these tests.
>
> Signed-off-by: Jason Angelov <jasonangelov@xxxxxxxx>
Reviewed-by: SJ Park <sj@xxxxxxxxxx>
Thanks,
SJ
[...]