From nobody Mon Feb 9 23:00:59 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=1562081130; cv=none; d=zoho.com; s=zohoarc; b=gBGvLl2uqWcEunQqF/1DMcAS13/kc8C3SuOJVHOdXhaGlOc1UdHa9C+Luvd6cm5tt9fdHN3ElX8Ykdga68nsgggzTCao9aXoL81lUbJRd5A+ZoX39KRHf7lW3Dj4GOX3HekgPtGtYS7jTrGpuvg6CtUoE+g+n5iPPBoHlhlDRTA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562081130; 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=8/20gtBQR/gV8jNycRDbvkkgMTUiavuT7PPQmf19XLc=; b=UMVfXUBEWDp9QeFKwj9W1C5nv+mgNOS3QP0QJ0fzWnmI1pOmqU4GSp2gd5lv/wBiExITLbch5xvw23T6fNdQ0wPfoGx/UuVJtP1mUQ/eUghcm9w1wF6ozHHRVBnkZkKWqJXmpHL4VsAIqu4VxeONDARMvjtToHVuXloh8wZaf9Q= 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 1562081130792303.0410007040226; Tue, 2 Jul 2019 08:25:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 50747307D864; Tue, 2 Jul 2019 15:25:18 +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 04C501001DEA; Tue, 2 Jul 2019 15:25:10 +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 A424518433A1; Tue, 2 Jul 2019 15:25:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x62FNnAq032111 for ; Tue, 2 Jul 2019 11:23:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 34EA318C78; Tue, 2 Jul 2019 15:23:49 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B17D018250 for ; Tue, 2 Jul 2019 15:23:48 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 2 Jul 2019 17:23:43 +0200 Message-Id: <20190702152343.30295-3-abologna@redhat.com> In-Reply-To: <20190702152343.30295-1-abologna@redhat.com> References: <20190702152343.30295-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] tests: Use the new DO_TEST_CAPS_*() macros 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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 02 Jul 2019 15:25:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" There are probably more situations where they could be taken advantage of, but these are very obvious scenarios because we either manage to get rid of a bunch of explicit capabilities, or we make a bunch of related test cases all use the macros by switching the only odd one out. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvtest.c | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 8d725040d3..08697e91d6 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2849,7 +2849,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_PARSE_ERROR("intel-iommu-wrong-machine", NONE); + DO_TEST_CAPS_LATEST_PARSE_ERROR("intel-iommu-wrong-machine"); DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64"); =20 DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); @@ -2915,29 +2915,9 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-virtio-scsi-reservations"); =20 DO_TEST_CAPS_LATEST("tseg-explicit-size"); - DO_TEST_PARSE_ERROR("tseg-i440fx", - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_ICH9_AHCI, - QEMU_CAPS_MACHINE_SMM_OPT, - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_MCH_EXTENDED_TSEG_MBYTES); - DO_TEST_PARSE_ERROR("tseg-explicit-size", - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_ICH9_AHCI, - QEMU_CAPS_MACHINE_SMM_OPT, - QEMU_CAPS_VIRTIO_SCSI); - DO_TEST_PARSE_ERROR("tseg-invalid-size", - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_ICH9_AHCI, - QEMU_CAPS_MACHINE_SMM_OPT, - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_MCH_EXTENDED_TSEG_MBYTES); + DO_TEST_CAPS_LATEST_PARSE_ERROR("tseg-i440fx"); + DO_TEST_CAPS_VER_PARSE_ERROR("tseg-explicit-size", "2.10.0"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("tseg-invalid-size"); =20 DO_TEST("video-virtio-gpu-ccw", QEMU_CAPS_CCW, QEMU_CAPS_DEVICE_VIRTIO_GPU, @@ -2971,10 +2951,7 @@ mymain(void) DO_TEST_CAPS_VER("virtio-non-transitional", "3.1.0"); DO_TEST_CAPS_LATEST("virtio-transitional"); DO_TEST_CAPS_LATEST("virtio-non-transitional"); - DO_TEST_PARSE_ERROR("virtio-transitional-not-supported", - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420); + DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-transitional-not-supported"); =20 /* Simple headless guests for various architectures */ DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-headless", "aarch64"); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list