mbox series

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

Message ID 20240207203134.69976-1-sj@kernel.org
Headers show
Series selftests/damon: add more tests for core functionalities and corner cases | expand

Message

SeongJae Park Feb. 7, 2024, 8:31 p.m. UTC
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