Re: [PATCH 2/2] selftests/damon/sysfs_refresh: test kdamond refresh_ms
From: SeongJae Park
Date: Tue Jun 02 2026 - 10:25:19 EST
On Tue, 2 Jun 2026 15:12:17 +0200 Ruslan Valiyev <linuxoid@xxxxxxxxx> wrote:
> Writing a non-zero value to a kdamond's 'refresh_ms' sysfs file should
> make DAMON periodically update the read-only sysfs files on its own,
> without the user writing update keywords such as 'update_schemes_stats'
> to the 'state' file. This behavior has no test coverage.
>
> Add a test that starts a kdamond with refresh_ms set and a 'stat' scheme
> whose default access pattern matches every monitored region, then polls
> the scheme's 'nr_tried' stats file directly, without requesting an
> update. The value can become non-zero only via the periodic refresh, so
> the test confirms refresh_ms works; with refresh_ms disabled the stat
> stays zero and the test fails.
Thank you for adding this nice test!
>
> Signed-off-by: Ruslan Valiyev <linuxoid@xxxxxxxxx>
Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>
Thanks,
SJ
[...]