Skip to content

RFC selftests/damon: add python and drgn based DAMON sysfs functionality tests

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6selftests/damon: add drgn script for extracting damon statustools/testing/selftests/damon/drgn_dump_damon_status.py+161 -00 replies
2/6selftests/damon/_damon_sysfs: set Kdamond.pid in start()tools/testing/selftests/damon/_damon_sysfs.py+3 -00 replies
3/6selftests/damon: add python and drgn-based DAMON sysfs testtools/testing/selftests/damon/Makefile tools/testing/selftests/damon/sysfs.py+43 -00 replies
4/6selftests/damon/sysfs.py: test monitoring attribute parameterstools/testing/selftests/damon/sysfs.py+32 -20 replies
5/6selftests/damon/sysfs.py: test adaptive targets parametertools/testing/selftests/damon/sysfs.py+6 -30 replies
6/6selftests/damon/sysfs.py: test DAMOS schemes parameters setuptools/testing/selftests/damon/sysfs.py+43 -30 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH 0/6] selftests/damon: add python and drgn based DAMON sysfs functionality tests

DAMON sysfs interface is the bridge between the user space and the kernel space for DAMON parameters. There is no good and simple test to see if the parameters are set as expected. Existing DAMON selftests therefore test end-to-end features. For example, damos_quota_goal.py runs a DAMOS scheme with quota goal set against a test program running an artificial access pattern, and see if the result is as expected. Such tests cover only a few part of DAMON. Adding more tests is also complicated. Finally, the reliability of the test itself on different systems is bad.

'drgn' is a tool that can extract kernel internal data structures like DAMON parameters. Add a test that passes specific DAMON parameters via DAMON sysfs reusing _damon_sysfs.py, extract resulting DAMON parameters via 'drgn', and compare those. Note that this test is not adding exhaustive tests of all DAMON parameters and input combinations but very basic things. Advancing the test infrastructure and adding more tests are future works.

SeongJae Park (6):
selftests/damon: add drgn script for extracting damon status selftests/damon/_damon_sysfs: set Kdamond.pid in start() selftests/damon: add python and drgn-based DAMON sysfs test selftests/damon/sysfs.py: test monitoring attribute parameters selftests/damon/sysfs.py: test adaptive targets parameter selftests/damon/sysfs.py: test DAMOS schemes parameters setup

 tools/testing/selftests/damon/Makefile        |   1 +
 tools/testing/selftests/damon/_damon_sysfs.py |   3 +
 .../selftests/damon/drgn_dump_damon_status.py | 161 ++++++++++++++++++
 tools/testing/selftests/damon/sysfs.py        | 115 +++++++++++++
 4 files changed, 280 insertions(+)
 create mode 100755 tools/testing/selftests/damon/drgn_dump_damon_status.py
 create mode 100755 tools/testing/selftests/damon/sysfs.py

base-commit: 59f618c718d036132b59bcf997943d4f5520149f

Signature · 1 line
2.39.5