From: SeongJae Park Date: Tue, 10 Mar 2026 01:05:27 +0000 (-0700) Subject: selftests/damon/sysfs.py: test goal_tuner commit X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ddac713da3bcd117a4ee4d184a34f02582495e7d;p=thirdparty%2Fkernel%2Flinux.git selftests/damon/sysfs.py: test goal_tuner commit Extend the near-full DAMON parameters commit selftest to commit goal_tuner and confirm the internal status is updated as expected. Link: https://lkml.kernel.org/r/20260310010529.91162-12-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton --- diff --git a/tools/testing/selftests/damon/sysfs.py b/tools/testing/selftests/damon/sysfs.py index 9cca71eb0325e..3aa5c91548a53 100755 --- a/tools/testing/selftests/damon/sysfs.py +++ b/tools/testing/selftests/damon/sysfs.py @@ -67,6 +67,12 @@ def assert_quota_committed(quota, dump): assert_true(dump['sz'] == quota.sz, 'sz', dump) for idx, qgoal in enumerate(quota.goals): assert_quota_goal_committed(qgoal, dump['goals'][idx]) + tuner_val = { + 'consist': 0, + 'temporal': 1, + } + assert_true(dump['goal_tuner'] == tuner_val[quota.goal_tuner], + 'goal_tuner', dump) assert_true(dump['weight_sz'] == quota.weight_sz_permil, 'weight_sz', dump) assert_true(dump['weight_nr_accesses'] == quota.weight_nr_accesses_permil, 'weight_nr_accesses', dump) @@ -231,6 +237,7 @@ def main(): metric='node_mem_used_bp', target_value=9950, nid=1)], + goal_tuner='temporal', reset_interval_ms=1500, weight_sz_permil=20, weight_nr_accesses_permil=200,