From nobody Sun Feb 8 06:21:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1629217577; cv=none; d=zohomail.com; s=zohoarc; b=YjHHN4MBHUHK5SXKoRq7rP6THlJq2qJWBXPvWrkmY+4I7jZL630lMCF2vLvkCIyhIIMQJEDsZk8nATmbmXYJOcrXNVHPLuE9NK3h2cFaiJ7N50/984f9inti9QKv9JtDHJI+mPOixoT7zrRQI1nAFwI7rj3O2dEe5NkgGCZ3ODo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217577; 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; bh=kk6Fm2HdKHo+JNqnma7QRqTuzS+kNGgEMv3gPQk3OjU=; b=ZiLHNX9KJrq8GdPosNQqTe0quFR2V5cyAzNKWE0g7QZ3/DfOUYCubdvBuQ0gxR4vXTm3IWCAnjhmDJaiuATfqDydiauGPkl3S4O3fwKsFCxyjlXZvLAEFZ2UYZz8pkQ5Ukv6VCoX2Pjoq44GQBao30Pner2+fI4+L/LMjHJ7xlQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1629217577829305.97161507560793; Tue, 17 Aug 2021 09:26:17 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-225-6Vw-PMeAOuO3Si4T9tkOUw-1; Tue, 17 Aug 2021 12:26:15 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 395AC100806C; Tue, 17 Aug 2021 16:26:03 +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 0EFE96A91C; Tue, 17 Aug 2021 16:26:03 +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 C81B2181A2E4; Tue, 17 Aug 2021 16:26:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17HGPf7M020271 for ; Tue, 17 Aug 2021 12:25:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 04C97421F; Tue, 17 Aug 2021 16:25:41 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 22B58620DE for ; Tue, 17 Aug 2021 16:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217576; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=kk6Fm2HdKHo+JNqnma7QRqTuzS+kNGgEMv3gPQk3OjU=; b=PCnUWhoOe5u2g6yMSue3t1mwHMj/LP3wEbsTr3MkMB7c5q9v0y4z8h1zmBIdrBpxaOE/EY fKnE9QeVMD7aTWIvySj8oFxlpxzNEM5kFfgbYjEPLGfdEl9TtnBw1Vy5slWtKYu8VmqQhL qcuzFcVe9AmKCXNIoAJsvcrSiif8nho= X-MC-Unique: 6Vw-PMeAOuO3Si4T9tkOUw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 09/23] qemuxml2argvtest: Add 'DO_TEST_NOCAPS' to replace 'DO_TEST("blah", NONE); ' Date: Tue, 17 Aug 2021 18:25:10 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1629217578720100010 Content-Type: text/plain; charset="utf-8" Add a explicit version of our test invocation macro for tests which use no capabilities. This reduces the usage of the somewhat anonymous 'NONE' macro and will lead to simplification of the code later. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 350 ++++++++++++++++++++------------------- 1 file changed, 176 insertions(+), 174 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6869eb6d86..bb2534ffc9 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1013,6 +1013,8 @@ mymain(void) * */ # define DO_TEST(name, ...) \ DO_TEST_FULL(name, "", ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG= _END) +# define DO_TEST_NOCAPS(name) \ + DO_TEST_FULL(name, "", ARG_END) # define DO_TEST_GIC(name, gic, ...) \ DO_TEST_FULL(name, "", \ @@ -1045,7 +1047,7 @@ mymain(void) g_unsetenv("QEMU_AUDIO_DRV"); g_unsetenv("SDL_AUDIODRIVER"); - DO_TEST("minimal", NONE); + DO_TEST_NOCAPS("minimal"); DO_TEST("minimal-sandbox", QEMU_CAPS_SECCOMP_BLACKLIST); DO_TEST_PARSE_ERROR("minimal-no-memory", NONE); @@ -1054,11 +1056,11 @@ mymain(void) DO_TEST_CAPS_LATEST("genid"); DO_TEST_CAPS_LATEST("genid-auto"); - DO_TEST("machine-aliases1", NONE); + DO_TEST_NOCAPS("machine-aliases1"); DO_TEST("machine-aliases2", QEMU_CAPS_KVM); - DO_TEST("machine-core-on", NONE); + DO_TEST_NOCAPS("machine-core-on"); driver.config->dumpGuestCore =3D true; - DO_TEST("machine-core-off", NONE); + DO_TEST_NOCAPS("machine-core-off"); driver.config->dumpGuestCore =3D false; DO_TEST("machine-smm-opt", QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, @@ -1068,24 +1070,24 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-vmport-opt", QEMU_CAPS_MACHINE_VMPORT_OPT); - DO_TEST("default-kvm-host-arch", NONE); - DO_TEST("default-qemu-host-arch", NONE); - DO_TEST("x86-kvm-32-on-64", NONE); - DO_TEST("boot-cdrom", NONE); - DO_TEST("boot-network", NONE); - DO_TEST("boot-floppy", NONE); + DO_TEST_NOCAPS("default-kvm-host-arch"); + DO_TEST_NOCAPS("default-qemu-host-arch"); + DO_TEST_NOCAPS("x86-kvm-32-on-64"); + DO_TEST_NOCAPS("boot-cdrom"); + DO_TEST_NOCAPS("boot-network"); + DO_TEST_NOCAPS("boot-floppy"); DO_TEST("boot-floppy-q35", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI); - DO_TEST("boot-multi", NONE); - DO_TEST("boot-menu-enable", NONE); + DO_TEST_NOCAPS("boot-multi"); + DO_TEST_NOCAPS("boot-menu-enable"); DO_TEST("boot-menu-enable-with-timeout", QEMU_CAPS_SPLASH_TIMEOUT); DO_TEST_PARSE_ERROR("boot-menu-enable-with-timeout", NONE); DO_TEST_PARSE_ERROR("boot-menu-enable-with-timeout-invalid", QEMU_CAPS_SPLASH_TIMEOUT); - DO_TEST("boot-menu-disable", NONE); - DO_TEST("boot-menu-disable-drive", NONE); + DO_TEST_NOCAPS("boot-menu-disable"); + DO_TEST_NOCAPS("boot-menu-disable-drive"); DO_TEST_PARSE_ERROR("boot-dev+order", QEMU_CAPS_VIRTIO_BLK_SCSI); DO_TEST("boot-order", @@ -1097,15 +1099,15 @@ mymain(void) QEMU_CAPS_VIRTIO_BLK_SCSI); /* Simplest possible