Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/damon/sysfs.py: test runtime reduction of DAMON parameters

sysfs.py is testing if non-default additional parameters can be committed.
Add a test case for further reducing the parameters to the default set.

Link: https://lkml.kernel.org/r/20250720171652.92309-23-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

SeongJae Park and committed by
Andrew Morton
da5973a0 62b7b1ff

+14
+14
tools/testing/selftests/damon/sysfs.py
··· 252 252 253 253 assert_ctxs_committed(kdamonds.kdamonds[0].contexts, status['contexts']) 254 254 255 + # test online commitment of minimum context. 256 + context = _damon_sysfs.DamonCtx() 257 + context.idx = 0 258 + context.kdamond = kdamonds.kdamonds[0] 259 + kdamonds.kdamonds[0].contexts = [context] 260 + kdamonds.kdamonds[0].commit() 261 + 262 + status, err = dump_damon_status_dict(kdamonds.kdamonds[0].pid) 263 + if err is not None: 264 + print(err) 265 + exit(1) 266 + 267 + assert_ctxs_committed(kdamonds.kdamonds[0].contexts, status['contexts']) 268 + 255 269 kdamonds.stop() 256 270 257 271 if __name__ == '__main__':