From: Thomas Blume Date: Thu, 19 Sep 2024 10:02:27 +0000 (+0200) Subject: test: set TEST_NESTED_KVM as default X-Git-Tag: v257-rc1~304 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5540c37bb8b275cb58b1c936ff701d1c80503e9b;p=thirdparty%2Fsystemd.git test: set TEST_NESTED_KVM as default --- diff --git a/test/README.testsuite b/test/README.testsuite index 60dc03498b9..8cacbb40af0 100644 --- a/test/README.testsuite +++ b/test/README.testsuite @@ -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). diff --git a/test/test-functions b/test/test-functions index 64a664b69ef..269cd8812bf 100644 --- a/test/test-functions +++ b/test/test-functions @@ -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