[PATCH v3] selftests: cachestat: add tests for mmap Refactor and enhance mmap test for cachestat validation

2025-07-09 Thread Suresh K C
From: Suresh K C This patch merges the previous two patches into a single, cohesive test case that verifies cachestat behavior with memory-mapped files using mmap(). It also refactors the test logic to reduce redundancy, improve error reporting, and clarify failure messages for both shmem and

[PATCH v2 2/2] selftest: improve mmap test clarity

2025-07-07 Thread Suresh K C
From: Suresh K C This patch refactors the mmap test logic to remove redundancy and improve error reporting. It also removes leftover test code that is no longer needed. Changes since v1: - Refactored mmap logic into a switch statement as suggested - Removed the last-character difference, which

[PATCH v2 1/2] selftests: cachestat: add tests for mmap

2025-07-07 Thread Suresh K C
From: Suresh K C Add a test case to verify cachestat behavior with memory-mapped files using mmap(). This ensures that pages accessed via mmap are correctly accounted for in the page cache. Tested on x86_64 with default kernel config Signed-off-by: Suresh K C --- .../selftests/cachestat

[PATCH v2 2/2] selftest: improve mmap test clarity

2025-07-01 Thread Suresh K C
From: Suresh K C This patch refactors the mmap test logic to remove redundancy and improve error reporting. It also removes leftover test code that is no longer needed. Changes since v1: - Refactored mmap logic into a switch statement as suggested - Removed the last-character difference, which

[PATCH v2 1/2] selftests: cachestat: add tests for mmap

2025-07-01 Thread Suresh K C
From: Suresh K C Add a test case to verify cachestat behavior with memory-mapped files using mmap(). This ensures that pages accessed via mmap are correctly accounted for in the page cache. Tested on x86_64 with default kernel config Signed-off-by: Suresh K C --- .../selftests/cachestat

[PATCH] selftests: cachestat: add tests for mmap

2025-06-30 Thread Suresh K C
From: Suresh K C Add a test case to verify cachestat behavior with memory-mapped files using mmap(). This ensures that pages accessed via mmap are correctly accounted for in the page cache. Tested on x86_64 with default kernel config Signed-off-by: Suresh K C --- .../selftests/cachestat

[PATCH v2] selftests: cachestat: Refactor test to remove duplication

2025-06-11 Thread Suresh K C
From: Suresh K C Refactored the mmap and shmem test logic into a common function to reduce code duplication and improve maintainability Changes in v2: Refactored mmap and shmem tests into a common function Renamed test function to run_cachestat_test() Removed test for /proc/cpuinfo

[PATCH] selftests: cachestat: add tests for mmap and /proc/cpuinfo

2025-05-24 Thread Suresh K C
From: Suresh K C Add a test case to verify cachestat behavior with memory-mapped files using mmap(). This ensures that pages accessed via mmap are correctly accounted for in the page cache. Also add a test for /proc/cpuinfo to validate cachestat's handling of virtual files in pseudo-filesy