]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: check for other hypervisors as well
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 25 Aug 2022 11:51:15 +0000 (13:51 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 26 Aug 2022 13:40:34 +0000 (15:40 +0200)
EC2 machines run on Xen, so account for that as well when checking KVM
availability.

test/test-functions

index 3cdfd800f08c5db96956a98646321366dcff99de..14344a4d1eed956ca8b0a05e0ca06cf36bf2651e 100644 (file)
@@ -92,7 +92,7 @@ add_at_exit_handler() {
 # check if it's not explicitly disabled (TEST_NO_KVM) and we're not already
 # running under KVM. If these conditions are met, enable KVM (and possibly
 # nested KVM), otherwise disable it.
-if get_bool "${TEST_NESTED_KVM:=}" || (! get_bool "${TEST_NO_KVM:=}" && [[ "$(systemd-detect-virt -v)" != kvm ]]); then
+if get_bool "${TEST_NESTED_KVM:=}" || (! get_bool "${TEST_NO_KVM:=}" && ! systemd-detect-virt -v); then
     QEMU_KVM=yes
 else
     QEMU_KVM=no