selftests/damon/sysfs.py: stop DAMON for dumping failures
authorSeongJae Park <sj@kernel.org>
Tue, 22 Jul 2025 06:03:30 +0000 (23:03 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 26 Jul 2025 22:08:16 +0000 (15:08 -0700)
commitcf20cb9ad1eb3bf59ede1f93a0640f06e6b9d028
treeab2679514a2864a13109224fc73e348182c75c42
parent45cd52c44e85453c9147d41b715cd03c53325cf4
selftests/damon/sysfs.py: stop DAMON for dumping failures

Commit 4ece01897627 ("selftests/damon: add python and drgn-based DAMON
sysfs test") in mm-stable tree introduced sysfs.py that runs drgn for
dumping DAMON status.  When the DAMON status dumping fails for reasons
including drgn uninstalled environment, the test fails without stopping
DAMON.  Following DAMON selftests that assumes DAMON is not running when
they executed therefore fail.  Catch dumping failures and stop DAMON for
that case.

Link: https://lkml.kernel.org/r/20250722060330.56068-1-sj@kernel.org
Fixes: 4ece01897627 ("selftests/damon: add python and drgn-based DAMON sysfs test")
Signed-off-by: SeongJae Park <sj@kernel.org>
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202507220707.9c5d6247-lkp@intel.com
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/damon/sysfs.py