]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests: cachestat: add tests for mmap, refactor and enhance mmap test for cachesta...
authorSuresh K C <suresh.k.chandrappa@gmail.com>
Wed, 9 Jul 2025 17:46:57 +0000 (23:16 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 2 Aug 2025 19:06:09 +0000 (12:06 -0700)
commitd6a511dea45ce3e851326b6bdc63f827ebb3e765
treed7b85267fd321bf9b9c4105cf4a38784e969764a
parent881388f34338197f4ea3adf4d08dc6374c3420c8
selftests: cachestat: add tests for mmap, refactor and enhance mmap test for cachestat validation

Add a cohesive test case that verifies cachestat behavior with
memory-mapped files using mmap().  Also refactor the test logic to reduce
redundancy, improve error reporting, and clarify failure messages for both
shmem and mmap file types.

[akpm@linux-foundation.org: coding-style cleanups]
Link: https://lkml.kernel.org/r/20250709174657.6916-1-suresh.k.chandrappa@gmail.com
Signed-off-by: Suresh K C <suresh.k.chandrappa@gmail.com>
Reviewed-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Tested-by: Nhat Pham <nphamcs@gmail.com>
Acked-by: Nhat Pham <nphamcs@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/cachestat/test_cachestat.c