From nobody Mon Feb 9 21:19:37 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=1562082764; cv=none; d=zoho.com; s=zohoarc; b=kW5jjy3rjitifEkWZ7ZmMRE8WKBUgdWQTSt4DwaIA7TJ++BaTTnsy6wEuOUfGtGJ72BoGNrskZOR5Qt5Nbxx67r1lUB7t/vveeqR5OGLn1ftuGyy9MRMo2Sk6piUrUJPpQQ67sDAqqIfJrfY0latFF3CuwGc07JdhzEji6YL6Ek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562082764; 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=rCfGN1AimNy2YbsgyE6slK0o8qvLoLDvNAKRLd9xMJM=; b=iD9xx7GEMBjWHg8rqR/Vrbk+2/0VTFvvPiJ4IXusCRuGd6w7PcywqREDtGQvBh19mtvCIKxvDJnZL9eaDnrNV8LwuVf43GICyeN6NYyXX6Lum8FRxczv5VceJpdbhms7QC4mA1U3Rp1SCkyxnyFOFVt1D2QmshMvaUbxeDzbrJY= 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 1562082764793207.54570139781697; Tue, 2 Jul 2019 08:52:44 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 89F7480F91; Tue, 2 Jul 2019 15:52: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 08A999F7F; Tue, 2 Jul 2019 15:52:15 +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 B82921806B16; Tue, 2 Jul 2019 15:52:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x62Fom3w008617 for ; Tue, 2 Jul 2019 11:50:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id BDF6D1992E; Tue, 2 Jul 2019 15:50:48 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 49A6719C6F for ; Tue, 2 Jul 2019 15:50:48 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 2 Jul 2019 17:50:41 +0200 Message-Id: <20190702155042.24568-4-abologna@redhat.com> In-Reply-To: <20190702155042.24568-1-abologna@redhat.com> References: <20190702155042.24568-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/4] tests: Add more 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.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 02 Jul 2019 15:52:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Right now we have macros such as DO_TEST_CAPS_LATEST_PARSE_ERROR() and DO_TEST_CAPS_ARCH_VER(), but there is no concise way to say "using this version of QEMU on this architecture will result in a failure". This commit adds DO_TEST_CAPS_ARCH_LATEST_FAILURE() DO_TEST_CAPS_ARCH_VER_FAILURE() DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR() DO_TEST_CAPS_ARCH_VER_PARSE_ERROR() and reworks DO_TEST_CAPS_LATEST_FAILURE() DO_TEST_CAPS_LATEST_PARSE_ERROR() to use the corresponding DO_CAPS_TEST_ARCH_*() macros instead of using DO_TEST_CAPS_ARCH_LATEST_FULL() directly. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvtest.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 748d43f488..8d725040d3 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -730,14 +730,35 @@ mymain(void) # define DO_TEST_CAPS_VER(name, ver) \ DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) =20 -# define DO_TEST_CAPS_LATEST_FAILURE(name) \ - DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", \ +# define DO_TEST_CAPS_ARCH_LATEST_FAILURE(name, arch) \ + DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, \ ARG_FLAGS, FLAG_EXPECT_FAILURE) =20 -# define DO_TEST_CAPS_LATEST_PARSE_ERROR(name) \ - DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", \ +# define DO_TEST_CAPS_ARCH_VER_FAILURE(name, arch, ver) \ + DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, \ + ARG_FLAGS, FLAG_EXPECT_FAILURE) + +# define DO_TEST_CAPS_LATEST_FAILURE(name) \ + DO_TEST_CAPS_ARCH_LATEST_FAILURE(name, "x86_64") + +# define DO_TEST_CAPS_VER_FAILURE(name, ver) \ + DO_TEST_CAPS_ARCH_VER_FAILURE(name, "x86_64", ver) + +# define DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR(name, arch) \ + DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, \ ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR) =20 +# define DO_TEST_CAPS_ARCH_VER_PARSE_ERROR(name, arch, ver) \ + DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, \ + ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR) + +# define DO_TEST_CAPS_LATEST_PARSE_ERROR(name) \ + DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR(name, "x86_64") + +# define DO_TEST_CAPS_VER_PARSE_ERROR(name, ver) \ + DO_TEST_CAPS_ARCH_VER_PARSE_ERROR(name, "x86_64", ver) + + # define DO_TEST_FULL(name, ...) \ DO_TEST_INTERNAL(name, "", \ __VA_ARGS__, QEMU_CAPS_LAST) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list