From nobody Mon Feb 9 00:56:15 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=1629217623; cv=none; d=zohomail.com; s=zohoarc; b=jeEBy+1IBw6SnDf4BYlA56g4ajeibHvCl6HNRJkfsQvf4i8CK8KMDrevcNnH9nTj0jC6ilDWETd7oqExo6CzKOJA66illyDvfBtnNl9/o+l8nxfGN5Mx6AsEYN32E97ie6VOHxZ2TF9ZmvSwXxjavxT9smQsfmLeue9o9Zlwpiw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217623; 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=FIuoXsqocfGoR/MZXEuMbPENg9FSm06EWKUGZjQ5iMU=; b=f7XdfbO2QKhYnJNs1/nr4QClvy8uctSalqIBs/Lfyi1DzCIUxrZ7tvAuGH0/2XFrvPcqFba59nzhvQhHQE8ePIF07xYC55aH8zn1e22hcHNIB+z1PsflitcL1suVhJhjIwTILUynnr31tJOY6gAg/bzIjHwDABsx26Dq4Aou4a0= 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 1629217623706158.4990650401752; Tue, 17 Aug 2021 09:27:03 -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-586-SWU2faFnNNGPXJzxEhagVQ-1; Tue, 17 Aug 2021 12:26:15 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B6BDC1008071; Tue, 17 Aug 2021 16:26:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97DB660242; Tue, 17 Aug 2021 16:26:04 +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 631564A70F; Tue, 17 Aug 2021 16:26:04 +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 17HGPh66020292 for ; Tue, 17 Aug 2021 12:25:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4AE5F421F; Tue, 17 Aug 2021 16:25:43 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F8E618B42 for ; Tue, 17 Aug 2021 16:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217622; 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=FIuoXsqocfGoR/MZXEuMbPENg9FSm06EWKUGZjQ5iMU=; b=IAVhptusL7IiPUidbsYnrmQoFRDoKGeQDvhQ2HrMlhCnPTTVPsPeStjTlxt2RwAGiNDIUK hOESgOlixZVIsLOmWEVCZW0Fp7yqTcYEXk0TifW4QNC/29CGUb+iyIR1MnOWcf71fVBnz1 qw8uqU/mc3Xa1PgTiW+ev/CQBMnVhX0= X-MC-Unique: SWU2faFnNNGPXJzxEhagVQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 11/23] qemuxml2argvtest: Add 'DO_TEST_FAILURE_NOCAPS' to replace 'DO_TEST_FAILURE("blah", NONE); ' Date: Tue, 17 Aug 2021 18:25:12 +0200 Message-Id: <16081e7ffec9a7e0be3d670b48661992b755c941.1629217367.git.pkrempa@redhat.com> 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.12 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: 1629217624655100001 Content-Type: text/plain; charset="utf-8" Add a explicit version of our test invocation macro for tests which use no capabilities. This removes 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 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 0f7e7e811d..80ae2aa329 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1025,6 +1025,8 @@ mymain(void) DO_TEST_FULL(name, "", \ ARG_FLAGS, FLAG_EXPECT_FAILURE, \ ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) +# define DO_TEST_FAILURE_NOCAPS(name) \ + DO_TEST_FULL(name, "", ARG_FLAGS, FLAG_EXPECT_FAILURE, ARG_END) # define DO_TEST_PARSE_ERROR(name, ...) \ DO_TEST_FULL(name, "", \ @@ -1035,8 +1037,6 @@ mymain(void) ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE,= \ ARG_END) -# define NONE QEMU_CAPS_LAST - /* Unset or set all envvars here that are copied in qemudBuildCommandL= ine * using ADD_ENV_COPY, otherwise these tests may fail due to unexpected * values for these envvars */ @@ -1390,7 +1390,7 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-network-gluster"); DO_TEST_CAPS_VER("disk-network-rbd", "2.12.0"); DO_TEST_CAPS_LATEST("disk-network-rbd"); - DO_TEST_FAILURE("disk-network-rbd-no-colon", NONE); + DO_TEST_FAILURE_NOCAPS("disk-network-rbd-no-colon"); DO_TEST_NOCAPS("disk-network-sheepdog"); DO_TEST_CAPS_VER("disk-network-sheepdog", "2.12.0"); DO_TEST_CAPS_VER("disk-network-sheepdog", "6.0.0"); @@ -1620,7 +1620,7 @@ mymain(void) DO_TEST("net-vhostuser", QEMU_CAPS_CHARDEV_FD_PASS); DO_TEST_CAPS_LATEST("net-vhostuser"); DO_TEST_NOCAPS("net-vhostuser-multiq"); - DO_TEST_FAILURE("net-vhostuser-fail", NONE); + DO_TEST_FAILURE_NOCAPS("net-vhostuser-fail"); DO_TEST_NOCAPS("net-user"); DO_TEST_CAPS_ARCH_VER_FULL("net-user", "x86_64", "4.0.0", ARG_FLAGS, F= LAG_SLIRP_HELPER); DO_TEST_NOCAPS("net-user-addr"); @@ -1878,7 +1878,7 @@ mymain(void) QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_NEC_USB_XHCI_PORTS); DO_TEST("usb-controller-qemu-xhci", QEMU_CAPS_DEVICE_QEMU_XHCI); - DO_TEST_FAILURE("usb-controller-qemu-xhci-unavailable", NONE); + DO_TEST_FAILURE_NOCAPS("usb-controller-qemu-xhci-unavailable"); DO_TEST_PARSE_ERROR("usb-controller-qemu-xhci-limit", QEMU_CAPS_DEVICE_QEMU_XHCI); @@ -2047,7 +2047,7 @@ mymain(void) DO_TEST("iothreads", QEMU_CAPS_OBJECT_IOTHREAD); DO_TEST("iothreads-ids", QEMU_CAPS_OBJECT_IOTHREAD); DO_TEST("iothreads-ids-partial", QEMU_CAPS_OBJECT_IOTHREAD); - DO_TEST_FAILURE("iothreads-nocap", NONE); + DO_TEST_FAILURE_NOCAPS("iothreads-nocap"); DO_TEST("iothreads-disk", QEMU_CAPS_OBJECT_IOTHREAD); DO_TEST("iothreads-disk-virtio-ccw", QEMU_CAPS_OBJECT_IOTHREAD, QEMU_CAPS_CCW); @@ -3092,7 +3092,7 @@ mymain(void) DO_TEST_PARSE_ERROR_NOCAPS("shmem-msi-only"); DO_TEST("cpu-host-passthrough-features", QEMU_CAPS_KVM); - DO_TEST_FAILURE("memory-align-fail", NONE); + DO_TEST_FAILURE_NOCAPS("memory-align-fail"); DO_TEST_PARSE_ERROR("memory-hotplug-nonuma", QEMU_CAPS_DEVICE_PC_DIMM); DO_TEST_NOCAPS("memory-hotplug"); DO_TEST("memory-hotplug", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA); --=20 2.31.1