qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC 0/3] qtest: pick tests that require KVM at runtime


From: Igor Mammedov
Subject: [RFC 0/3] qtest: pick tests that require KVM at runtime
Date: Wed, 16 Jun 2021 11:24:52 -0400

Sometimes it's necessary to execute a test that depends on KVM,
however qtest is not aware if tested QEMU binary supports KVM
on the host it the test is executed.

For an example:
 test q35 machine with intel_iommu
 This test will run only is KVM is available and fail
 to start QEMU if it fallsback to TCG, thus failing whole test.
 So if test is executed in VM where nested KVM is not enabled
 or on other than x86 host, it will break 'make check-qtest'

Series adds a lightweight qtest_has_kvm() check, which abuses
build system and should help to avoid running KVM only tests
on hosts that do not support it.

PS:
there is an alternative 'query-accels' QMP command proposal
https://patchwork.kernel.org/project/qemu-devel/patch/20210503211020.894589-3-philmd@redhat.com/
which I think is more robust compared to qtest_has_kvm() and
could be extended to take into account machine type.
But it's more complex and what I dislike about it most,
it requires execution of 'probing' QEMU instance to find
execute 'query-accels' QMP command, which is rather resource
consuming. So I'd use query-accels approach only when it's
the only possible option to minimize load on CI systems.

Igor Mammedov (2):
  tests: acpi: q35: test for x2APIC entries in SRAT
  tests: acpi: update expected tables blobs

root (1):
  tests: qtest: add qtest_has_kvm() to check if tested bynary supports
    KVM

 tests/qtest/libqos/libqtest.h    |   7 +++++++
 meson.build                      |   1 +
 tests/data/acpi/q35/APIC.numamem | Bin 0 -> 2686 bytes
 tests/data/acpi/q35/DSDT.numamem | Bin 7865 -> 35222 bytes
 tests/data/acpi/q35/FACP.numamem | Bin 0 -> 244 bytes
 tests/data/acpi/q35/SRAT.numamem | Bin 224 -> 5080 bytes
 tests/qtest/bios-tables-test.c   |  10 +++++++---
 tests/qtest/libqtest.c           |  20 ++++++++++++++++++++
 8 files changed, 35 insertions(+), 3 deletions(-)
 create mode 100644 tests/data/acpi/q35/APIC.numamem
 create mode 100644 tests/data/acpi/q35/FACP.numamem

-- 
2.27.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]