Re: [PATCH v3] selftests/cgroup: test_zswap: skip test_no_kmem_bypass if debugfs is unavailable
SJ Park <[email protected]>
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-kselftest,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 12 Aug 2026 05:07:55 +0000 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. Looks good to me! > > Signed-off-by: Wilson Felipe Pereira <[email protected]> > Acked-by: Yosry Ahmed <[email protected]> > Acked-by: Nhat Pham <[email protected]> > Reviewed-by: Anshuman Khandual <[email protected]> Reviewed-by: SJ Park <[email protected]> Thanks, SJ [...]