From nobody Mon Feb 9 09:43:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1558352290; cv=none; d=zoho.com; s=zohoarc; b=CjGWDld2jODlZR8Yu7ZMoS1ztCTKVw9uiTpjSJIJG03SJbvvnu5OGErEfSYhsyLYkqotnNtgfC7td/RSjDTmO3M2ed5GNeJZTHKNzq1tk4YKwcSM5Bmy76udHuezP1qiO1ScrFVsiQCeT8hlc9INi0tEq366CojRLkNmJ77Um2U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558352290; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=cS3wFGcsBq5xKQk37Gs0yhvRQIpr84YVw6pyEeCGkEw=; b=WOsGhg8rXwktzsL1Hk0iYcGGQsVhvdhU0vLelFE8dKrrja8zNmDQvng6Ww0JF0A3IR+oHPqsUCqGUkknusZZL+6s0VrPDLywQOmEGfQDh/3W+5QPBJ9UKLNCciivdQ6jUlLRlnGitugwsiFlCVwetVSd0IiL/wEEYJT1Jo0ylaI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1558352290360244.894855864051; Mon, 20 May 2019 04:38:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B5D2487630; Mon, 20 May 2019 11:38:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8AC2C5D9D1; Mon, 20 May 2019 11:38:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 50CEE1806B1C; Mon, 20 May 2019 11:38:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4KBc1gs019641 for ; Mon, 20 May 2019 07:38:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 31C1D5DD8F; Mon, 20 May 2019 11:38:01 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-17.brq.redhat.com [10.40.204.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 716F55DD8A for ; Mon, 20 May 2019 11:38:00 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 20 May 2019 13:37:48 +0200 Message-Id: <20190520113753.12345-4-abologna@redhat.com> In-Reply-To: <20190520113753.12345-1-abologna@redhat.com> References: <20190520113753.12345-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/8] tests: Add negative test for Intel IOMMU X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 20 May 2019 11:38:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Make sure validation is working as intended by trying to use Intel IOMMU with the i440fx machine type, though we know it's q35 only, and expecting an error to be returned. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n 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/q= emuxml2argvdata/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 1c2a2b3905..0e83acac86 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); =20 DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); DO_TEST_PARSE_ERROR("cpu-hotplug-granularity", --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list