summaryrefslogtreecommitdiffstats
path: root/tools/accounting
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-03-14 08:35:16 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2023-03-14 10:20:06 -0400
commit3dc40cf89b9b763910cb0540a35f9d66a067475d (patch)
tree59d66ed8ade392cd3f45bd815cdee6d1acb4a8dc /tools/accounting
parent53293cb81be6db06306666d51e85778725934be5 (diff)
downloadlinux-stable-3dc40cf89b9b763910cb0540a35f9d66a067475d.tar.gz
linux-stable-3dc40cf89b9b763910cb0540a35f9d66a067475d.tar.bz2
linux-stable-3dc40cf89b9b763910cb0540a35f9d66a067475d.zip
selftests: KVM: skip hugetlb tests if huge pages are not available
Right now, if KVM memory stress tests are run with hugetlb sources but hugetlb is not available (either in the kernel or because /proc/sys/vm/nr_hugepages is 0) the test will fail with a memory allocation error. This makes it impossible to add tests that default to hugetlb-backed memory, because on a machine with a default configuration they will fail. Therefore, check HugePages_Total as well and, if zero, direct the user to enable hugepages in procfs. Furthermore, return KSFT_SKIP whenever hugetlb is not available. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/accounting')
0 files changed, 0 insertions, 0 deletions