Skip to content

selftests/damon: misc fixes for test bugs

Kunwu Chan damon linux-kselftest linux-mm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesIn review
  2. v15 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- Fix From:/Signed-off-by mismatch.
- Add Reviewed-by tags from SeongJae Park.
- Drop the duplicate memcg_path fix.
- Drop the empty aggregation-cycle retry fix pending root-cause investigation.
- No code change

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3selftests/damon: prevent cross-context state pollution in DamonCtxtools/testing/selftests/damon/_damon_sysfs.py+8 -20 replies
2/3selftests/damon/damos_tried_regions: fix expectation output and join TypeErrortools/testing/selftests/damon/damos_tried_regions.py+2 -20 replies
3/3selftests/damon: fix dead code, skipped checks, and broken lookupstools/testing/selftests/damon/_damon_sysfs.py tools/testing/selftests/damon/damos_apply_interval.py tools/testing/selftests/damon/damos_quota_goal.py +4 more+10 -100 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchSeongJae Park
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] 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 wrong operator precedence and join TypeError in damos_tried_regions.py.

Patch 3 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
---
Changes in v2:
- Fix From:/Signed-off-by mismatch.
- Add Reviewed-by tags from SeongJae Park.
- Drop the duplicate memcg_path fix.
- Drop the empty aggregation-cycle retry fix pending root-cause investigation.
- No code change

Kunwu Chan (3):
selftests/damon: prevent cross-context state pollution in DamonCtx selftests/damon/damos_tried_regions: fix expectation output and join
TypeError
selftests/damon: fix dead code, skipped checks, and broken lookups

 tools/testing/selftests/damon/_damon_sysfs.py        | 12 +++++++++---
 .../testing/selftests/damon/damos_apply_interval.py  |  2 +-
 tools/testing/selftests/damon/damos_quota_goal.py    |  2 +-
 tools/testing/selftests/damon/damos_tried_regions.py |  4 ++--
 .../selftests/damon/drgn_dump_damon_status.py        |  2 +-
 tools/testing/selftests/damon/sysfs.py               |  4 ++--
 tools/testing/selftests/damon/sysfs.sh               |  6 +++---
 ...fs_update_schemes_tried_regions_wss_estimation.py |  2 +-
 8 files changed, 20 insertions(+), 14 deletions(-)
Signature · 1 line
2.43.0