Re: [PATCH v2] selftests/cgroup: test_zswap: skip test_no_kmem_bypass if debugfs is unavailable
Yosry Ahmed <[email protected]>
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-kselftest,org.kvack.linux-mm |
|---|---|
| Message-ID | <CAO9r8zM0K_--=jMxuapkFxnbqBj6zqvz3GB9wmEjgDThQpzZkw@mail.gmail.com> |
On Mon, Aug 10, 2026 at 10:14 PM Wilson Felipe Pereira <[email protected]> wrote: > > test_no_kmem_bypass() needs to read > /sys/kernel/debug/zswap/stored_pages via get_zswap_stored_pages() to > verify that compressed pages are charged to the memcg. > > When running in an environment where debugfs is not mounted or > CONFIG_DEBUG_FS is disabled, get_zswap_stored_pages() fails, causing the > loop to terminate early and report a false negative (KSFT_FAIL). > > Selftests should not fail if debugfs is unavailable, and it should print > a message when it is skipped. > > While I'm here, also add a warning message if the test is being skipped > due to totalram size and make the check for totalram more readable. > > Signed-off-by: Wilson Felipe Pereira <[email protected]> Acked-by: Yosry Ahmed <[email protected]>