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>
This commit is contained in:
committed by
Andrew Morton
parent
62b7b1ffa2
commit
da5973a0b8
@@ -252,6 +252,20 @@ def main():
|
||||
|
||||
assert_ctxs_committed(kdamonds.kdamonds[0].contexts, status['contexts'])
|
||||
|
||||
# test online commitment of minimum context.
|
||||
context = _damon_sysfs.DamonCtx()
|
||||
context.idx = 0
|
||||
context.kdamond = kdamonds.kdamonds[0]
|
||||
kdamonds.kdamonds[0].contexts = [context]
|
||||
kdamonds.kdamonds[0].commit()
|
||||
|
||||
status, err = dump_damon_status_dict(kdamonds.kdamonds[0].pid)
|
||||
if err is not None:
|
||||
print(err)
|
||||
exit(1)
|
||||
|
||||
assert_ctxs_committed(kdamonds.kdamonds[0].contexts, status['contexts'])
|
||||
|
||||
kdamonds.stop()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user