Skip to content
Commit 05401936 authored by Brendan Jackman's avatar Brendan Jackman Committed by Sean Christopherson
Browse files

KVM: selftests: Avoid assuming "sudo" exists in NX hugepage test



Writing various root-only files, omit "sudo" when already running as root
to allow running the NX hugepage test on systems with a minimal rootfs,
i.e. without sudo.

Signed-off-by: default avatarBrendan Jackman <jackmanb@google.com>
Reviewed-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://lore.kernel.org/r/20240415-kvm-selftests-no-sudo-v1-1-95153ad5f470@google.com
[sean: name the helper do_sudo() instead of maybe_sudo(), massage changelog]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 72cd4de0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment