[RFC PATCH v2 10/10] selftests/damon/sysfs.py: test goal_tuner commit
From: SeongJae Park
Date: Tue Mar 03 2026 - 23:44:34 EST
Extend the near-full DAMON parameters commit selftest to commit
goal_tuner and confirm the internal status is updated as expected.
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
tools/testing/selftests/damon/sysfs.py | 7 +++++++
1 file changed, 7 insertions(+)
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,
--
2.47.3