Skip to contentSkip to conversation

selftests-damon-sysfspy-clean-up-sh-processes-used-for-obsolete_target-test.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 7

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftests/damon/sysfs.py: clean up sh processes used for obsolete_target test
has been removed from the -mm tree. Its filename was
selftests-damon-sysfspy-clean-up-sh-processes-used-for-obsolete_target-test.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Hari Mishal <[email protected]>
Subject: selftests/damon/sysfs.py: clean up sh processes used for obsolete_target test
Date: Mon, 31 Aug 2026 07:26:06 -0700

The obsolete_target test spawns three sh processes and uses their pids as DAMON monitoring targets. These processes are never terminated or waited on, so they are left running (or become zombies) as orphaned children after the test program exits.

Terminate each process and communicate() with it after the targets are no longer needed, so it exits and gets reaped instead of being leaked.

---

 tools/testing/selftests/damon/sysfs.py |    4 ++++
 1 file changed, 4 insertions(+)
tools/testing/selftests/damon/sysfs.py renamed from tools/testing/selftests/damon/sysfs.py~selftests-damon-sysfspy-clean-up-sh-processes-used-for-obsolete_target-test +4 -0
@@ -385,6 +385,10 @@ def main():
     assert_ctxs_committed(kdamonds)
     kdamonds.stop()
 
+    for proc in (proc1, proc2, proc3):
+        proc.terminate()
+        proc.communicate()
+
     test_memcg_filter_memcg_path_staging()
 
 if __name__ == '__main__':

_

Patches currently in -mm which might be from [email protected] are