diff options
| author | SJ Park <sj@kernel.org> | 2026-09-17 07:22:07 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-12 21:26:24 -0700 |
| commit | 844eaab7a11bc6491193e683f78c2b69f9705cec (patch) | |
| tree | 9d860d5a8af421709460c5a432f67b487d53fb63 /tools/testing | |
| parent | 85368c3750ac6bd70a4b93b8dceab5b67fb5c749 (diff) | |
| download | linux-next-844eaab7a11bc6491193e683f78c2b69f9705cec.tar.gz linux-next-844eaab7a11bc6491193e683f78c2b69f9705cec.zip | |
selftests/damon/sysfs_memcg_path_leak: fail only for real DAMON leak
The selftest can fail for any leak if it happens while the test is
running. Remove the false positive test failures by further checking if
the expected leaking function is called out on the report.
Link: https://lore.kernel.org/20260917142210.90829-10-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Asier Gutierrez <gutierrez.asier@huawei-partners.com>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@davidgow.net>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Diffstat (limited to 'tools/testing')
| -rwxr-xr-x | tools/testing/selftests/damon/sysfs_memcg_path_leak.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh b/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh index 33a7ff43ed6c..34c37129c49f 100755 --- a/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh +++ b/tools/testing/selftests/damon/sysfs_memcg_path_leak.sh @@ -41,5 +41,12 @@ if [ "$kmemleak_report" = "" ] then exit 0 fi +if ! echo "$kmemleak_report" | grep "memcg_path_store" --quiet +then + echo "[WARN] memleak found; apparently not from DAMON, though" + echo "$kmemleak_report" + exit 0 +fi + echo "$kmemleak_report" exit 1 |
