From: Andrea Bolognani Date: Fri, 17 May 2019 14:37:56 +0000 (+0200) Subject: tests: Add negative test for Intel IOMMU X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=69a8c64f4b875f0e61f59faa605c31573b06a62a;p=libvirt.git tests: Add negative test for Intel IOMMU Make sure validation is working as intended by trying to use Intel IOMMU with the i440fx machine type, though we know it's a q35-only feature, and expecting an error to be returned. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- diff --git a/tests/qemuxml2argvdata/intel-iommu-wrong-machine.xml b/tests/qemuxml2argvdata/intel-iommu-wrong-machine.xml new file mode 100644 index 0000000000..ab116f83b3 --- /dev/null +++ b/tests/qemuxml2argvdata/intel-iommu-wrong-machine.xml @@ -0,0 +1,24 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 09d37eb454..de74aa91fe 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2812,6 +2812,7 @@ mymain(void) DO_TEST_CAPS_LATEST("intel-iommu-caching-mode"); DO_TEST_CAPS_LATEST("intel-iommu-eim"); DO_TEST_CAPS_LATEST("intel-iommu-device-iotlb"); + DO_TEST_FAILURE("intel-iommu-wrong-machine", NONE); DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); DO_TEST_PARSE_ERROR("cpu-hotplug-granularity",