Skip to content

selftests/damon: add more tests for core functionalities and corner cases

SeongJae Park damon linux-kselftest linux-mm lkml 1 version Applied

Status from this message: [merged mm-stable] selftests-damon-_chk_dependency-get-debugfs-mount-point-from-proc-mounts.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesApplied 8/8

Patches in v1 All 8 applied

#Subject and filesSizeRepliesApplied
1/8selftests/damon/_damon_sysfs: support DAMOS quotatools/testing/selftests/damon/_damon_sysfs.py+33 -90 repliesApplied
2/8selftests/damon/_damon_sysfs: support DAMOS statstools/testing/selftests/damon/_damon_sysfs.py+32 -00 repliesApplied
3/8selftests/damon/_damon_sysfs: support DAMOS apply intervaltools/testing/selftests/damon/_damon_sysfs.py+8 -10 repliesApplied
4/8selftests/damon: add a test for DAMOS quotatools/testing/selftests/damon/Makefile tools/testing/selftests/damon/damos_quota.py+68 -00 repliesApplied
5/8selftests/damon: add a test for DAMOS apply intervalstools/testing/selftests/damon/Makefile tools/testing/selftests/damon/damos_apply_interval.py+68 -10 repliesApplied
6/8selftests/damon: add a test for a race between target_ids_read() and dbgfs_before_terminate()tools/testing/selftests/damon/.gitignore tools/testing/selftests/damon/Makefile tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.c +1 more+97 -00 repliesApplied
7/8selftests/damon: add a test for the pid leak of dbgfs_target_ids_write()tools/testing/selftests/damon/.gitignore tools/testing/selftests/damon/Makefile tools/testing/selftests/damon/debugfs_target_ids_pid_leak.c +1 more+93 -00 repliesApplied
8/8selftests/damon/_chk_dependency: get debugfs mount point from /proc/mountstools/testing/selftests/damon/_chk_dependency.sh+8 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] selftests/damon: add more tests for core functionalities and corner cases

Continue DAMON selftests' test coverage improvement works with a trivial improvement of the test code itself. The sequence of the patches in patchset is as follows.

The first five patches add two DAMON core functionalities tests. Those begins with three patches (patches 1-3) that update the test-purpose DAMON sysfs interface wrapper to support DAMOS quota, stats, and apply interval features, respectively. The fourth patch implements and adds a selftest for DAMOS quota feature, using the DAMON sysfs interface wrapper's newly added support of the quota and the stats feature. The fifth patch further implements and adds a selftest for DAMOS apply interval using the DAMON sysfs interface wrapper's newly added support of the apply interval and the stats feature.

Two patches (patches 6 and 7) for implementing and adding two corner cases handling selftests follow. Those try to avoid two previously fixed bugs from recurring.

Finally, a patch for making DAMON debugfs selftests dependency checker to use /proc/mounts instead of the hard-coded mount point assumption follows.

SeongJae Park (8):
selftests/damon/_damon_sysfs: support DAMOS quota selftests/damon/_damon_sysfs: support DAMOS stats selftests/damon/_damon_sysfs: support DAMOS apply interval selftests/damon: add a test for DAMOS quota selftests/damon: add a test for DAMOS apply intervals selftests/damon: add a test for a race between target_ids_read() and
dbgfs_before_terminate()
selftests/damon: add a test for the pid leak of
dbgfs_target_ids_write()
selftests/damon/_chk_dependency: get debugfs mount point from
/proc/mounts

 tools/testing/selftests/damon/.gitignore      |  2 +
 tools/testing/selftests/damon/Makefile        |  5 ++
 .../selftests/damon/_chk_dependency.sh        |  9 ++-
 tools/testing/selftests/damon/_damon_sysfs.py | 77 ++++++++++++++++--
 .../selftests/damon/damos_apply_interval.py   | 67 ++++++++++++++++
 tools/testing/selftests/damon/damos_quota.py  | 67 ++++++++++++++++
 .../damon/debugfs_target_ids_pid_leak.c       | 68 ++++++++++++++++
 .../damon/debugfs_target_ids_pid_leak.sh      | 22 +++++
 ...fs_target_ids_read_before_terminate_race.c | 80 +++++++++++++++++++
 ...s_target_ids_read_before_terminate_race.sh | 14 ++++
 10 files changed, 403 insertions(+), 8 deletions(-)
 create mode 100755 tools/testing/selftests/damon/damos_apply_interval.py
 create mode 100755 tools/testing/selftests/damon/damos_quota.py
 create mode 100644 tools/testing/selftests/damon/debugfs_target_ids_pid_leak.c
 create mode 100755 tools/testing/selftests/damon/debugfs_target_ids_pid_leak.sh
 create mode 100644 tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.c
 create mode 100755 tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.sh

base-commit: f51e629727d8cc526a3156a2c80489b8f050410f

Signature · 1 line
2.39.2