]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: selftests: Add __open_path_or_exit() variant to provide extra help info
authorSean Christopherson <seanjc@google.com>
Fri, 16 May 2025 21:59:07 +0000 (14:59 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:39:10 +0000 (13:39 -0700)
commit6e1cce7cda1b69e455f89dbc0eeec128506fe969
treeb0bb55632d4c5efd308a20631399f121f26d6030
parentfcab107abe1ab5be9dbe874baa722372da8f4f73
KVM: selftests: Add __open_path_or_exit() variant to provide extra help info

Add an inner __open_path_or_exit() API to let the caller provide additional
information on ENOENT to try and help the user figure out why the test is
being skipped, e.g. for files like the page_idle bitmap needed by the
access tracking perf, which is dependent on a Kconfig.

Immediately convert /dev/kvm to the new API, both as an example and because
users might not know that some architectures/setups require loading KVM.

Link: https://lore.kernel.org/r/20250516215909.2551628-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/lib/kvm_util.c