]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: set TEST_NESTED_KVM as default
authorThomas Blume <Thomas.Blume@suse.com>
Thu, 19 Sep 2024 10:02:27 +0000 (12:02 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 7 Oct 2024 09:40:17 +0000 (11:40 +0200)
test/README.testsuite
test/test-functions

index 60dc03498b90c7fdd69aa8359bb1d4031365e7c9..8cacbb40af01d690c611bf19e1b732799b7373de 100644 (file)
@@ -202,10 +202,6 @@ systemd-nspawn.
 `TEST_NO_KVM=1`: Disable qemu KVM auto-detection (may be necessary when you're
 trying to run the *vanilla* qemu and have both qemu and qemu-kvm installed)
 
-`TEST_NESTED_KVM=1`:  Allow tests to run with nested KVM. By default, the
-testsuite disables nested KVM if the host machine already runs under KVM.
-Setting this variable disables such checks.
-
 `QEMU_MEM=512M`: Configure amount of memory for qemu VMs (defaults to 512M).
 
 `QEMU_SMP=1`: Configure number of CPUs for qemu VMs (defaults to 1).
index 64a664b69efaa898d62e2852d5abe7d97a6e6def..269cd8812bfe588dde23d9641324f43537b4d407 100644 (file)
@@ -84,14 +84,12 @@ add_at_exit_handler() {
 }
 
 # Decide if we can (and want to) run qemu with KVM acceleration.
-# Check if nested KVM is explicitly enabled (TEST_NESTED_KVM). If not,
-# 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 -qv); then
-    QEMU_KVM=yes
-else
+# Check if KVM is not explicitly disabled (TEST_NO_KVM), otherwise
+# enable KVM (and possibly nested KVM).
+if get_bool "${TEST_NO_KVM:=}"; then
     QEMU_KVM=no
+else
+    QEMU_KVM=yes
 fi
 
 if ! ROOTLIBDIR=$(pkg-config --variable=systemdutildir systemd); then