]> git.hungrycats.org Git - linux/commit
selftests/damon/sysfs.py: pause DAMON before dumping status
authorSeongJae Park <sj@kernel.org>
Mon, 27 Apr 2026 15:12:29 +0000 (08:12 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 May 2026 04:05:00 +0000 (21:05 -0700)
commitcb1a7622c90c169b1dabdd680711f85b6fde7319
treee7d58b2be61aab97aa89ec43ace478c1e751a9ce
parente88be73275e9bff727977499066606e35fa8db13
selftests/damon/sysfs.py: pause DAMON before dumping status

The sysfs.py test commits DAMON parameters, dump the internal DAMON state,
and show if the parameters are committed as expected using the dumped
state.  While the dumping is ongoing, DAMON is alive.  It can make
internal changes including addition and removal of regions.  It can
therefore make a race that can result in false test results.  Pause DAMON
execution during the state dumping to avoid such races.

Link: https://lore.kernel.org/20260427151231.113429-11-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/damon/sysfs.py