Skip to contentSkip to conversation

selftests/damon: misc fixes for test bugs

PATCH Superseded Kunwu Chan 2 participants 16 messages May 31 – Jun 1

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kunwu Chan

author
#0 lore raw

cover selftests/damon: misc fixes for test bugs

From: Kunwu Chan <[email protected]>

This series fixes several bugs in the DAMON selftests. Most are trivial but cause tests to silently pass when they shouldn't, or fail prematurely on slow machines.

Patch 1 fixes mutable default arguments in DamonCtx.__init__() that cause state to leak between test instances.

Patch 2 fixes a trailing comma in DamosFilter that turns memcg_path from a string into a tuple, silently breaking memcg filter setup.

Patch 3-4 fix bugs in damos_tried_regions.py: wrong operator precedence drops the "not met" prefix from failure output, and empty early aggregation cycles cause premature test failure.

Patch 5 fixes several wrong strings that produce dead elif branches, skipped file existence checks, and broken dict key lookups.

Based on next-20260529.
base-commit: 7da7f07112610a520567421dd2ffcb51beaefbcc

Kunwu Chan (5):
selftests/damon: prevent cross-context state pollution in DamonCtx selftests/damon: fix memcg filter path handling selftests/damon/damos_tried_regions: fix expectation output and join
TypeError
selftests/damon/damos_tried_regions: handle empty tried regions in
early cycles
selftests/damon: fix dead code, skipped checks, and broken lookups

 tools/testing/selftests/damon/_damon_sysfs.py | 14 +++++++++----
 .../selftests/damon/damos_apply_interval.py   |  2 +-
 .../selftests/damon/damos_quota_goal.py       |  2 +-
 .../selftests/damon/damos_tried_regions.py    | 20 ++++++++++---------
 .../selftests/damon/drgn_dump_damon_status.py |  2 +-
 tools/testing/selftests/damon/sysfs.py        |  4 ++--
 tools/testing/selftests/damon/sysfs.sh        |  6 +++---
 ...te_schemes_tried_regions_wss_estimation.py |  2 +-
 8 files changed, 30 insertions(+), 22 deletions(-)
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 1/5 selftests/damon: prevent cross-context state pollution in DamonCtx

From: Kunwu Chan <[email protected]>

DamonCtx.__init__() uses mutable default values for monitoring_attrs, targets, and schemes. In Python these are evaluated once at function definition time, so multiple DamonCtx instances can unintentionally share the same lists and DamonAttrs instance.

Replace the mutable defaults with None sentinels and initialize the objects when needed.

---
 tools/testing/selftests/damon/_damon_sysfs.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
tools/testing/selftests/damon/_damon_sysfs.py +8 -2
index 8b12cc048440..2f6f2699db25 100644
@@ -624,17 +624,23 @@ class DamonCtx:
     pause = None
     idx = None
 
-    def __init__(self, ops='paddr', monitoring_attrs=DamonAttrs(), targets=[],
-            schemes=[], pause=False):
+    def __init__(self, ops='paddr', monitoring_attrs=None, targets=None,
+            schemes=None, pause=False):
         self.ops = ops
+        if monitoring_attrs is None:
+            monitoring_attrs = DamonAttrs()
         self.monitoring_attrs = monitoring_attrs
         self.monitoring_attrs.context = self
 
+        if targets is None:
+            targets = []
         self.targets = targets
         for idx, target in enumerate(self.targets):
             target.idx = idx
             target.context = self
 
+        if schemes is None:
+            schemes = []
         self.schemes = schemes
         for idx, scheme in enumerate(self.schemes):
             scheme.idx = idx
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH 2/5 selftests/damon: fix memcg filter path handling

From: Kunwu Chan <[email protected]>

A trailing comma in the memcg_path assignment makes memcg_path a single-element tuple instead of a string.

As a result, an invalid value is written to sysfs and memcg filter configuration fails.

Remove the comma.

---
 tools/testing/selftests/damon/_damon_sysfs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/damon/_damon_sysfs.py +1 -1
index 2f6f2699db25..006c92a76ebe 100644
@@ -271,7 +271,7 @@ class DamosFilter:
         self.type_ = type_
         self.matching = matching
         self.allow = allow
-        self.memcg_path = memcg_path,
+        self.memcg_path = memcg_path
         self.addr_start = addr_start
         self.addr_end = addr_end
         self.target_idx = target_idx
Signature · 1 line
2.43.0
maintainer
#3 lore raw

Re: [PATCH 2/5] selftests/damon: fix memcg filter path handling

Conventionally, this mail should be sent as a direct reply to the coverletter. But somehow this was sent as a reply to the first patch of the series. Please send all patches of a series as a direct reply to the coverletter from the next time.

Quoted 9 lines · On Sun, 31 May 2026 17:17:21 +0800 Kunwu Chan <[email protected]> wrote:

From: Kunwu Chan <[email protected]>

A trailing comma in the memcg_path assignment makes memcg_path a single-element tuple instead of a string.

As a result, an invalid value is written to sysfs and memcg filter configuration fails.

Remove the comma.

Good findinng! But, Cheng sent [1] a same patch earlier. I believe Cheng is working on revisioning it. I think we should give Cheng more time for that.

[1] https://lore.kernel.org/[email protected]

Thanks,
SJ

[...]

author
#4 lore raw

Re: [PATCH 2/5] selftests/damon: fix memcg filter path handling

Quoted 6 lines · SeongJae Park

Conventionally, this mail should be sent as a direct reply to the coverletter. But somehow this was sent as a reply to the first patch of the series. Please send all patches of a series as a direct reply to the coverletter from the next time.

Thanks, SJ.

Sorry about that. I'll make sure future revisions are sent as direct replies to the cover letter.

Quoted 8 lines · On Sun, 31 May 2026 17:17:21 +0800 Kunwu Chan <[email protected]> wrote:
Quoted 7 lines

From: Kunwu Chan <[email protected]>

A trailing comma in the memcg_path assignment makes memcg_path a single-element tuple instead of a string.

Quoted 8 lines
Quoted 5 lines

As a result, an invalid value is written to sysfs and memcg filter configuration fails.

Remove the comma.

Good findinng! But, Cheng sent [1] a same patch earlier. I believe Cheng is working on revisioning it. I think we should give Cheng more time for that.

Yes, I noticed that after sending the series and saw that Cheng had already posted the same fix.

I'll drop this patch from v2 and let Cheng continue with his version.

Thanks,
Kunwu

Quoted 7 lines

[1] https://lore.kernel.org/[email protected]

Thanks,
SJ

[...]

author
#5 lore raw

PATCH 3/5 selftests/damon/damos_tried_regions: fix expectation output and join TypeError

In reply to Kunwu Chan

From: Kunwu Chan <[email protected]>

The expectation print has wrong operator precedence: '%' binds before the conditional expression, so the else branch prints 'not met' without the prefix 'expectation (>= 14) is'. Add parentheses to fix it.

Also, '\n'.join() on the list of ints raises TypeError; convert to str in the list comprehension.

---
 tools/testing/selftests/damon/damos_tried_regions.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/damon/damos_tried_regions.py +2 -2
index 3b347eb28bd2..d6472e6a6e08 100755
@@ -55,10 +55,10 @@ def main():
     collected_nr_regions.sort()
     sample = collected_nr_regions[4]
     print('50-th percentile nr_regions: %d' % sample)
-    print('expectation (>= 14) is %s' % 'met' if sample >= 14 else 'not met')
+    print('expectation (>= 14) is %s' % ('met' if sample >= 14 else 'not met'))
     if collected_nr_regions[4] < 14:
         print('full nr_regions:')
-        print('\n'.join(collected_nr_regions))
+        print('\n'.join(['%d' % x for x in collected_nr_regions]))
         exit(1)
 
 if __name__ == '__main__':
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 3/5
#6 lore raw

Re: [PATCH 3/5] selftests/damon/damos_tried_regions: fix expectation output and join TypeError

Quoted 9 lines · On Sun, 31 May 2026 17:17:22 +0800 Kunwu Chan <[email protected]> wrote:

From: Kunwu Chan <[email protected]>

The expectation print has wrong operator precedence: '%' binds before the conditional expression, so the else branch prints 'not met' without the prefix 'expectation (>= 14) is'. Add parentheses to fix it.

Also, '\n'.join() on the list of ints raises TypeError; convert to str in the list comprehension.

Nice findings and fixes, thank you!

Quoted 4 lines

checkpatch.pl may warn here like below, and it should be fixed.

WARNING: From:/Signed-off-by: email address mismatch: 'From: Kunwu Chan <[email protected]>' != 'Signed-off-by: Kunwu Chan <[email protected]>'

Other than that,

Thanks,
SJ

[...]

author
#7 lore raw

PATCH 4/5 selftests/damon/damos_tried_regions: handle empty tried regions in early cycles

In reply to Kunwu Chan

From: Kunwu Chan <[email protected]>

The test aborts if the initial aggregation cycles produce zero tried regions. This can happen on slow machines, causing false failures. Skip empty cycles and retry up to 200 times before giving up. Also check that enough samples were collected before computing the 50th percentile.

---
 .../selftests/damon/damos_tried_regions.py       | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
tools/testing/selftests/damon/damos_tried_regions.py +9 -7
index d6472e6a6e08..cc6895c56820 100755
@@ -28,7 +28,9 @@ def main():
         exit(1)
 
     collected_nr_regions = []
-    while proc.poll() is None:
+    nr_retries = 0
+    while proc.poll() is None and nr_retries < 200:
+        nr_retries += 1
         time.sleep(0.1)
         err = kdamonds.kdamonds[0].update_schemes_tried_regions()
         if err is not None:
@@ -38,20 +40,20 @@ def main():
 
         scheme = kdamonds.kdamonds[0].contexts[0].schemes[0]
         if scheme.tried_regions is None:
-            proc.terminate()
-            print('tried regions is not collected')
-            exit(1)
+            continue
 
         nr_tried_regions = len(scheme.tried_regions)
         if nr_tried_regions <= 0:
-            proc.terminate()
-            print('tried regions is not created')
-            exit(1)
+            continue
         collected_nr_regions.append(nr_tried_regions)
         if len(collected_nr_regions) > 10:
             break
     proc.terminate()
 
+    if len(collected_nr_regions) <= 4:
+        print('too few tried regions samples collected')
+        exit(1)
+
     collected_nr_regions.sort()
     sample = collected_nr_regions[4]
     print('50-th percentile nr_regions: %d' % sample)
Signature · 1 line
2.43.0
maintainer
#8 lore raw

Re: [PATCH 4/5] selftests/damon/damos_tried_regions: handle empty tried regions in early cycles

Quoted 7 lines · On Sun, 31 May 2026 17:17:23 +0800 Kunwu Chan <[email protected]> wrote:

From: Kunwu Chan <[email protected]>

The test aborts if the initial aggregation cycles produce zero tried regions. This can happen on slow machines, causing false failures. Skip empty cycles and retry up to 200 times before giving up. Also check that enough samples were collected before computing the 50th percentile.

I agree this will make the test be more reliable. I'm bit concerned if 200 times retry can make the test run too long, though.

Also, could you further elaborate why this can fail on slow machines? That is, DAMON will check the access of 'access_memory_even' process every 5ms. Are you thinking the 5ms is too short for 'access_memory_event' to make the expected access (accessing the 7 regins of 10 MiB size) within? If so, should we increase the sampling interval before retrying?

I also suspect if the unreliable results you seen is due to the fact that DAMON is not flushing TLB, like we discussed before. If that's the case, could we increase the working set size of this test, similar to the wss_estimation test?

[1] https://lore.kernel.org/[email protected]

Thanks,
SJ

[...]

author
#9 lore raw

Re: [PATCH 4/5] selftests/damon/damos_tried_regions: handle empty tried regions in early cycles

Quoted 21 lines · SeongJae Park
Quoted 9 lines · On Sun, 31 May 2026 17:17:23 +0800 Kunwu Chan <[email protected]> wrote:

From: Kunwu Chan <[email protected]>

The test aborts if the initial aggregation cycles produce zero tried regions. This can happen on slow machines, causing false failures. Skip empty cycles and retry up to 200 times before giving up. Also check that enough samples were collected before computing the 50th percentile.

I agree this will make the test be more reliable. I'm bit concerned if 200 times retry can make the test run too long, though.

Also, could you further elaborate why this can fail on slow machines? That is, DAMON will check the access of 'access_memory_even' process every 5ms. Are you thinking the 5ms is too short for 'access_memory_event' to make the expected access (accessing the 7 regins of 10 MiB size) within? If so, should we increase the sampling interval before retrying?

Quoted 4 lines

I also suspect if the unreliable results you seen is due to the fact that DAMON is not flushing TLB, like we discussed before. If that's the case, could we increase the working set size of this test, similar to the wss_estimation test?

Thanks, SJ.

Good points.

I don't yet have enough evidence to say whether this is primarily due to scheduling delays, a too-short sampling interval, or effects from not flushing TLB.

I'll investigate the root cause and see if increasing the working set size or adjusting the test configuration may be a cleaner solution than adding retries.

I'll drop this patch from v2 for now and revisit it once I better understand the root cause.

Thanks,
Kunwu

Quoted 7 lines

[1] https://lore.kernel.org/[email protected]

Thanks,
SJ

[...]

author
#10 lore raw

PATCH 5/5 selftests/damon: fix dead code, skipped checks, and broken lookups

In reply to Kunwu Chan

From: Kunwu Chan <[email protected]>

'hugeapge_size' in drgn_dump_damon_status.py was a dead elif branch. $fail_reason in sysfs.sh was undefined, silently emptying the error message. 'exit' instead of 'exist' in sysfs.sh skipped a file existence check. 'nohugeapge' in sysfs.py broke an action dict lookup.

Fix other wrong strings in the same files.

---
 tools/testing/selftests/damon/_damon_sysfs.py               | 2 +-
 tools/testing/selftests/damon/damos_apply_interval.py       | 2 +-
 tools/testing/selftests/damon/damos_quota_goal.py           | 2 +-
 tools/testing/selftests/damon/drgn_dump_damon_status.py     | 2 +-
 tools/testing/selftests/damon/sysfs.py                      | 4 ++--
 tools/testing/selftests/damon/sysfs.sh                      | 6 +++---
 .../sysfs_update_schemes_tried_regions_wss_estimation.py    | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)
tools/testing/selftests/damon/_damon_sysfs.py +1 -1
index 006c92a76ebe..c197ab99bcc0 100644
@@ -837,7 +837,7 @@ class Kdamond:
                 for goal in scheme.quota.goals:
                     err = goal.stage()
                     if err is not None:
-                        print('commit_schemes_quota_goals failed stagign: %s'%
+                        print('commit_schemes_quota_goals failed staging: %s'%
                               err)
                         exit(1)
         return write_file(os.path.join(self.sysfs_dir(), 'state'),
tools/testing/selftests/damon/damos_apply_interval.py +1 -1
index f04d43702481..0f2f36584e48 100755
@@ -56,7 +56,7 @@ def main():
     # Because the second scheme was having the apply interval that is ten times
     # lower than that of the first scheme, the second scheme should be tried
     # about ten times more frequently than the first scheme.  For possible
-    # timing errors, check if it was at least nine times more freuqnetly tried.
+    # timing errors, check if it was at least nine times more frequently tried.
     ratio = nr_tried_stats[1] / nr_tried_stats[0]
     if ratio < 9:
         print('%d / %d = %f (< 9)' %
tools/testing/selftests/damon/damos_quota_goal.py +1 -1
index f76e0412b564..661e4ba4765a 100755
@@ -66,7 +66,7 @@ def main():
             # effective quota was already minimum that cannot be more reduced
             if expect_increase is False and last_effective_bytes == 1:
                 continue
-            print('efective bytes not changed: %d' % goal.effective_bytes)
+            print('effective bytes not changed: %d' % goal.effective_bytes)
             exit(1)
 
         increased = last_effective_bytes < goal.effective_bytes
tools/testing/selftests/damon/drgn_dump_damon_status.py +1 -1
index 972948e6215f..26b207e44268 100755
@@ -163,7 +163,7 @@ def damos_filter_to_dict(damos_filter):
                                int(damos_filter.addr_range.end)]
     elif type_ == 'target':
         dict_['target_idx'] = int(damos_filter.target_idx)
-    elif type_ == 'hugeapge_size':
+    elif type_ == 'hugepage_size':
         dict_['sz_range'] = [int(damos_filter.sz_range.min),
                              int(damos_filter.sz_range.max)]
     return dict_
tools/testing/selftests/damon/sysfs.py +2 -2
index aa03a1187489..99412f0d31f3 100755
@@ -119,7 +119,7 @@ def assert_access_pattern_committed(pattern, dump):
                 'max_nr_accesses', dump)
     assert_true(dump['min_age_region'] == pattern.age[0], 'min_age_region',
                 dump)
-    assert_true(dump['max_age_region'] == pattern.age[1], 'miaxage_region',
+    assert_true(dump['max_age_region'] == pattern.age[1], 'max_age_region',
                 dump)
 
 def assert_scheme_committed(scheme, dump):
@@ -129,7 +129,7 @@ def assert_scheme_committed(scheme, dump):
             'cold': 1,
             'pageout': 2,
             'hugepage': 3,
-            'nohugeapge': 4,
+            'nohugepage': 4,
             'collapse': 5,
             'lru_prio': 6,
             'lru_deprio': 7,
tools/testing/selftests/damon/sysfs.sh +3 -3
index 78f4badb5beb..2eaaa5ae3c5e 100755
@@ -3,7 +3,7 @@
 
 source _common.sh
 
-# Kselftest frmework requirement - SKIP code is 4.
+# Kselftest framework requirement - SKIP code is 4.
 ksft_skip=4
 
 ensure_write_succ()
@@ -28,7 +28,7 @@ ensure_write_fail()
 
 	if (echo "$content" > "$file") 2> /dev/null
 	then
-		echo "writing $content to $file succeed ($fail_reason)"
+		echo "writing $content to $file succeeded ($reason)"
 		echo "expected failure because $reason"
 		exit 1
 	fi
@@ -363,7 +363,7 @@ test_context()
 {
 	context_dir=$1
 	ensure_dir "$context_dir" "exist"
-	ensure_file "$context_dir/avail_operations" "exit" 400
+	ensure_file "$context_dir/avail_operations" "exist" 400
 	ensure_file "$context_dir/operations" "exist" 600
 	ensure_file "$context_dir/addr_unit" "exist" 600
 	ensure_file "$context_dir/pause" "exist" 600
tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_wss_estimation.py +1 -1
index 35c724a63f6c..16fdc6e7fc56 100755
@@ -7,7 +7,7 @@ import time
 import _damon_sysfs
 
 def pass_wss_estimation(sz_region):
-    # access two regions of given size, 2 seocnds per each region
+    # access two regions of given size, 2 seconds per each region
     proc = subprocess.Popen(
             ['./access_memory', '2', '%d' % sz_region, '2000', 'repeat'])
     kdamonds = _damon_sysfs.Kdamonds([_damon_sysfs.Kdamond(
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 5/5
#11 lore raw

Re: [PATCH 5/5] selftests/damon: fix dead code, skipped checks, and broken lookups

Quoted 9 lines · On Sun, 31 May 2026 17:17:24 +0800 Kunwu Chan <[email protected]> wrote:

From: Kunwu Chan <[email protected]>

'hugeapge_size' in drgn_dump_damon_status.py was a dead elif branch. $fail_reason in sysfs.sh was undefined, silently emptying the error message. 'exit' instead of 'exist' in sysfs.sh skipped a file existence check. 'nohugeapge' in sysfs.py broke an action dict lookup.

Fix other wrong strings in the same files.

Good eyes! Thank you for fixing these!

Quoted 4 lines

Checkpatch.pl will warn as below, and it should be fixed.

WARNING: From:/Signed-off-by: email address mismatch: 'From: Kunwu Chan <[email protected]>' != 'Signed-off-by: Kunwu Chan <[email protected]>'

Other than that,

Thanks,
SJ

[...]

maintainer Reviewed-by on v1 1/5
#12 lore raw

Re: [PATCH 1/5] selftests/damon: prevent cross-context state pollution in DamonCtx

In reply to Kunwu Chan
Quoted 10 lines · On Sun, 31 May 2026 17:17:20 +0800 Kunwu Chan <[email protected]> wrote:

From: Kunwu Chan <[email protected]>

DamonCtx.__init__() uses mutable default values for monitoring_attrs, targets, and schemes. In Python these are evaluated once at function definition time, so multiple DamonCtx instances can unintentionally share the same lists and DamonAttrs instance.

Replace the mutable defaults with None sentinels and initialize the objects when needed.

Nice change, thank you!

Quoted 4 lines

checkpatch.pl complains as below:

WARNING: From:/Signed-off-by: email address mismatch: 'From: Kunwu Chan <[email protected]>' != 'Signed-off-by: Kunwu Chan <[email protected]>'

Other than that,

Thanks,
SJ

[...]

author
#13 lore raw

Re: [PATCH 1/5] selftests/damon: prevent cross-context state pollution in DamonCtx

Quoted 12 lines · SeongJae Park
Quoted 9 lines · On Sun, 31 May 2026 17:17:20 +0800 Kunwu Chan <[email protected]> wrote:

From: Kunwu Chan <[email protected]>

DamonCtx.__init__() uses mutable default values for monitoring_attrs, targets, and schemes. In Python these are evaluated once at function definition time, so multiple DamonCtx instances can unintentionally share the same lists and DamonAttrs instance.

Quoted 5 lines
Quoted 3 lines

Replace the mutable defaults with None sentinels and initialize the objects when needed.

Nice change, thank you!

Thanks, SJ.

Quoted 5 lines
Quoted 5 lines
Quoted 8 lines

checkpatch.pl complains as below:

WARNING: From:/Signed-off-by: email address mismatch: 'From: Kunwu Chan <[email protected]>' != 'Signed-off-by: Kunwu Chan <[email protected]>'

Other than that,

I'll fix the email mismatch and send a v2 to make the addresses consistent.

I'll also add your Reviewed-by tag.

Thanks,
Kunwu

Quoted 5 lines

Thanks,
SJ

[...]

maintainer
#14 lore raw
In reply to Kunwu Chan
Quoted 5 lines · On Sun, 31 May 2026 16:56:28 +0800 Kunwu Chan <[email protected]> wrote:

From: Kunwu Chan <[email protected]>

This series fixes several bugs in the DAMON selftests. Most are trivial but cause tests to silently pass when they shouldn't, or fail prematurely on slow machines.

Thank you for sharing these great changes, Kunwu and Lian!

Quoted 8 lines

Patch 1 fixes mutable default arguments in DamonCtx.__init__() that cause state to leak between test instances.

Patch 2 fixes a trailing comma in DamosFilter that turns memcg_path from a string into a tuple, silently breaking memcg filter setup.

Quoted 7 lines

Patch 3-4 fix bugs in damos_tried_regions.py: wrong operator precedence drops the "not met" prefix from failure output, and empty early aggregation cycles cause premature test failure.

Patch 5 fixes several wrong strings that produce dead elif branches, skipped file existence checks, and broken dict key lookups.

I left comments to each patch. To summarize,

Patches 1, 3 and 5 look good except signer/author info mismatch.

For patches 2 and 4, I think we need more discussions.

Thanks,
SJ

[...]

author
#15 lore raw
Quoted 28 lines · SeongJae Park
Quoted 7 lines · On Sun, 31 May 2026 16:56:28 +0800 Kunwu Chan <[email protected]> wrote:

From: Kunwu Chan <[email protected]>

This series fixes several bugs in the DAMON selftests. Most are trivial but cause tests to silently pass when they shouldn't, or fail prematurely on slow machines.

Thank you for sharing these great changes, Kunwu and Lian!

Quoted 8 lines

Patch 1 fixes mutable default arguments in DamonCtx.__init__()
that cause state to leak between test instances.

Patch 2 fixes a trailing comma in DamosFilter that turns memcg_path from a string into a tuple, silently breaking memcg filter setup.

Quoted 8 lines

Patch 3-4 fix bugs in damos_tried_regions.py: wrong operator precedence drops the "not met" prefix from failure output, and empty early aggregation cycles cause premature test failure.

Patch 5 fixes several wrong strings that produce dead elif branches, skipped file existence checks, and broken dict key lookups.

Quoted 6 lines

I left comments to each patch. To summarize,

Patches 1, 3 and 5 look good except signer/author info mismatch.

For patches 2 and 4, I think we need more discussions.

Thanks, SJ.

Noted. I'll fix the signer/author mismatch in v2. As discussed in the individual replies, I'll drop patches 2 and 4 for now and revisit 4 once the underlying issues are better understood.

Thanks,
Kunwu

Quoted 5 lines

Thanks,
SJ

[...]