On Tue, Jul 30, 2024 at 07:13:04PM -0400, David Finkel wrote:
Extend two existing tests to cover extracting memory usage through the newly mutable memory.peak and memory.swap.peak handlers.
In particular, make sure to exercise adding and removing watchers with overlapping lifetimes so the less-trivial logic gets tested.
The new/updated tests attempt to detect a lack of the write handler by fstat'ing the memory.peak and memory.swap.peak files and skip the tests if that's the case. Additionally, skip if the file doesn't exist at all.
Signed-off-by: David Finkel davidf@vimeo.com
Reviewed-by: Roman Gushchin roman.gushchin@linux.dev