From 69a8c64f4b875f0e61f59faa605c31573b06a62a Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Fri, 17 May 2019 16:37:56 +0200 Subject: [PATCH] tests: Add negative test for Intel IOMMU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../intel-iommu-wrong-machine.xml | 24 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 2 files changed, 25 insertions(+) create mode 100644 tests/qemuxml2argvdata/intel-iommu-wrong-machine.xml 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", -- GitLab