Skip to contentSkip to conversation

selftests-damon-sysfspy-generalize-damos-schemes-commit-assertion.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 26, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftests/damon/sysfs.py: generalize DAMOS schemes commit assertion
has been removed from the -mm tree. Its filename was
selftests-damon-sysfspy-generalize-damos-schemes-commit-assertion.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <[email protected]>
Subject: selftests/damon/sysfs.py: generalize DAMOS schemes commit assertion
Date: Sun, 20 Jul 2025 10:16:48 -0700

DAMOS schemes commitment assertion is hard-coded for a specific test case. Split it out into a general version that can be reused for different test cases.

---

 tools/testing/selftests/damon/sysfs.py |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
tools/testing/selftests/damon/sysfs.py renamed from tools/testing/selftests/damon/sysfs.py~selftests-damon-sysfspy-generalize-damos-schemes-commit-assertion +6 -4
@@ -136,6 +136,11 @@ def assert_scheme_committed(scheme, dump
     for idx, f in enumerate(scheme.ops_filters.filters):
         assert_filter_committed(f, dump['ops_filters'][idx])
 
+def assert_schemes_committed(schemes, dump):
+    assert_true(len(schemes) == len(dump), 'len_schemes', dump)
+    for idx, scheme in enumerate(schemes):
+        assert_scheme_committed(scheme, dump[idx])
+
 def main():
     kdamonds = _damon_sysfs.Kdamonds(
             [_damon_sysfs.Kdamond(
@@ -180,10 +185,7 @@ def main():
             { 'pid': 0, 'nr_regions': 0, 'regions_list': []}]:
         fail('adaptive targets', status)
 
-    if len(ctx['schemes']) != 1:
-        fail('number of schemes', status)
-
-    assert_scheme_committed(_damon_sysfs.Damos(), ctx['schemes'][0])
+    assert_schemes_committed([_damon_sysfs.Damos()], ctx['schemes'])
 
     kdamonds.stop()
 

_

Patches currently in -mm which might be from [email protected] are