summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2026-03-10 04:05:27 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-04-05 23:53:26 +0300
commitddac713da3bcd117a4ee4d184a34f02582495e7d (patch)
treedaf3c667ad29051de97f125c0f8f28c7e271893f /tools/testing
parentc2b0cb96e787a2f053003f4ea966cecdcc41e5d9 (diff)
downloadlinux-ddac713da3bcd117a4ee4d184a34f02582495e7d.tar.xz
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 <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-xtools/testing/selftests/damon/sysfs.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/damon/sysfs.py b/tools/testing/selftests/damon/sysfs.py
index 9cca71eb0325..3aa5c91548a5 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,