Re: [RFC PATCH v1.1 08/10] selftests/damon/sysfs.sh: test hugepage_mem_bp quota goal
[email protected] Wed, 29 Jul 2026 03:45:05 +0000
| Newsgroups | dev.linux.lists.damon |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The selftest script expects the kernel to accept the 'hugepage_mem_bp' metric for the DAMON sysfs quota goal, but the corresponding kernel feature implementation is missing from this patch series. Writing this value to the `target_metric` sysfs file will return `-EINVAL`, causing the test to unconditionally fail and exit. -- --- Patch [8]: [RFC PATCH v1.1 08/10] selftests/damon/sysfs.sh: test hugepage_mem_bp quota goal --- commit 6c11ff9f30e87caf7ac58e12f507a641d985aebc Author: SJ Park <[email protected]> selftests/damon/sysfs.sh: test hugepage_mem_bp quota goal This commit updates the DAMON sysfs selftest to verify that the quota goal target_metric file accepts the new hugepage_mem_bp input. > diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh > index f7fb94b84e716..8690aef1e436c 100755 > --- a/tools/testing/selftests/damon/sysfs.sh > +++ b/tools/testing/selftests/damon/sysfs.sh > @@ -210,6 +210,7 @@ test_goal() > ensure_write_succ "$fpath" "active_mem_bp" "valid input" > ensure_write_succ "$fpath" "inactive_mem_bp" "valid input" > ensure_write_succ "$fpath" "node_eligible_mem_bp" "valid input" > + ensure_write_succ "$fpath" "hugepage_mem_bp" "valid input" [Severity: Medium] Will this test reliably fail because the kernel implementation for the hugepage_mem_bp metric is missing from this patch series? If the corresponding kernel feature isn't included, writing this value to the target_metric sysfs file in test_goal() will return -EINVAL. This would cause ensure_write_succ() to unconditionally fail and abort the selftest. > ensure_write_fail "$fpath" "foo" "invalid input" > ensure_file "$goal_dir/nid" "exist" "600" > ensure_file "$goal_dir/path" "exist" "600" -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=8