From nobody Mon May 6 03:35:02 2024 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=1562082712; cv=none; d=zoho.com; s=zohoarc; b=Hhvtvx/BykApJsSf0CBpvD8On1ol8k6UIPvPDPxcIP6kgVz3f4VrrU0IkXqAUMqZpULRSVLfBSllmnuNHwW4m1nLBUMiecirbqIOAOWAozC329oqf+rKNe/r7Z1Df+1sTcPWpEkjf2UnfbDimVL6sutmcBtcpsCIUQ1AUaGu2Sw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562082712; 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=7rkJGBhtTRzgaas22bGMbbaNnOWk3a6Ji6pU2whB4ws=; b=iX2VDdLszVH9HvVlqmAEM0K5NAEbtdp0Wi3sdhi2xS/PZpYjIUZfdSB/PASTgkbMnZI1RUJuoJppBSUp37/8Ln9rnrZXoerMEAmdoRiLlb04GxXQWQspMMsaJlTjRyEpJk1Y8X4mjdL/aoNX7NZgJX3/TCXcVjJfrBsICNGfZKo= 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 1562082712312341.63306368633005; Tue, 2 Jul 2019 08:51:52 -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 EA34D30832C6; Tue, 2 Jul 2019 15:51: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 199E367142; Tue, 2 Jul 2019 15:50:59 +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 C1CF7206D3; Tue, 2 Jul 2019 15:50:49 +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 x62FolsM008555 for ; Tue, 2 Jul 2019 11:50:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2F6001992E; Tue, 2 Jul 2019 15:50:47 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AEFD319C6F for ; Tue, 2 Jul 2019 15:50:46 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 2 Jul 2019 17:50:39 +0200 Message-Id: <20190702155042.24568-2-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 1/4] tests: Reorder 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 02 Jul 2019 15:51:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Make sure the order is consistent between xml2argv and xml2xml, and make room for more macros that are going to be introduced shortly. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 13 ++++++------- tests/qemuxml2xmltest.c | 29 ++++++++++++++--------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 91ca35d469..f4603d36c2 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -712,21 +712,21 @@ mymain(void) ARG_CAPS_VER, ver, \ __VA_ARGS__) =20 -# define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \ - DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END) - -# define DO_TEST_CAPS_VER(name, ver) \ - DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) - # define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \ DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__) =20 # define DO_TEST_CAPS_ARCH_LATEST(name, arch) \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END) =20 +# define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \ + DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END) + # define DO_TEST_CAPS_LATEST(name) \ DO_TEST_CAPS_ARCH_LATEST(name, "x86_64") =20 +# define DO_TEST_CAPS_VER(name, ver) \ + DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) + # define DO_TEST_CAPS_LATEST_FAILURE(name) \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", \ ARG_FLAGS, FLAG_EXPECT_FAILURE) @@ -735,7 +735,6 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", \ ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR) =20 - # define DO_TEST_FULL(name, ...) \ DO_TEST_INTERNAL(name, "", \ __VA_ARGS__, QEMU_CAPS_LAST) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index a64b17ac28..b60a013ac0 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -207,36 +207,35 @@ mymain(void) testQemuInfoClear(&info); \ } while (0) =20 -# define NONE QEMU_CAPS_LAST - -# define DO_TEST_FULL(name, when, ...) \ - DO_TEST_INTERNAL(name, "", when, __VA_ARGS__) - -# define DO_TEST(name, ...) \ - DO_TEST_FULL(name, WHEN_BOTH, \ - ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) - # define DO_TEST_CAPS_INTERNAL(name, arch, ver, ...) \ DO_TEST_INTERNAL(name, "." arch "-" ver, WHEN_BOTH, \ ARG_CAPS_ARCH, arch, \ ARG_CAPS_VER, ver, \ __VA_ARGS__) =20 -# define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \ - DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END) - -# define DO_TEST_CAPS_VER(name, ver) \ - DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) - # define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \ DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__) =20 # define DO_TEST_CAPS_ARCH_LATEST(name, arch) \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END) =20 +# define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \ + DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END) + # define DO_TEST_CAPS_LATEST(name) \ DO_TEST_CAPS_ARCH_LATEST(name, "x86_64") =20 +# define DO_TEST_CAPS_VER(name, ver) \ + DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) + +# define DO_TEST_FULL(name, when, ...) \ + DO_TEST_INTERNAL(name, "", when, __VA_ARGS__) + +# define DO_TEST(name, ...) \ + DO_TEST_FULL(name, WHEN_BOTH, \ + ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) + +# define NONE QEMU_CAPS_LAST =20 /* Unset or set all envvars here that are copied in qemudBuildCommandL= ine * using ADD_ENV_COPY, otherwise these tests may fail due to unexpected --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon May 6 03:35:02 2024 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=1562082769; cv=none; d=zoho.com; s=zohoarc; b=CpI7oq9WnQkykVOlvajPMp+1ifZMX45KcFLTda6Q3MiEkMY/7yKRm7VT9I96361AZTlmWZ6HAt+erubjZjke04+9uRHGSAItc42duBUH3na/YkL8QdNdLDOZLgpmTvflCS/Ya7jwt/QOVlMxC1LFq3RdKgWdFrAufaGPAAxqEik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562082769; 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=DnijMxa2zMM54726IBwI+MCjJom9LH57Zh26M+CRHCc=; b=VowZuR8HDpP9nDawnj/S1uWU/XZPwAhMa3krQBC6yNALZcUTraQIQhbXCdI4DjbGIYLUFnCZuUWReGckMMqhZfLn94r7hhjkyBdlbwQXrniTVPcEhkjzCGvz0AVbuZFPZSoo8WPRPptWoCopnbciPvCBck970O6fS+aCUvgQ6MI= 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 1562082769976617.6525315215787; Tue, 2 Jul 2019 08:52:49 -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 8B6333058838; 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 BA9265D9C6; Tue, 2 Jul 2019 15:52:13 +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 6D4FC1806B15; Tue, 2 Jul 2019 15:52:08 +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 x62FoluH008587 for ; Tue, 2 Jul 2019 11:50:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id F11FD1992E; Tue, 2 Jul 2019 15:50:47 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B84119C6F for ; Tue, 2 Jul 2019 15:50:47 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 2 Jul 2019 17:50:40 +0200 Message-Id: <20190702155042.24568-3-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 2/4] tests: Add DO_TEST_CAPS_ARCH_VER_FULL() 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.41]); Tue, 02 Jul 2019 15:52:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" It mirrors the existing DO_TEST_CAPS_ARCH_LATEST_FULL(), and is now used to implement DO_TEST_CAPS_ARCH_VER(). Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 5 ++++- tests/qemuxml2xmltest.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f4603d36c2..748d43f488 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -715,11 +715,14 @@ mymain(void) # define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \ DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__) =20 +# define DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ...) \ + DO_TEST_CAPS_INTERNAL(name, arch, ver, __VA_ARGS__) + # define DO_TEST_CAPS_ARCH_LATEST(name, arch) \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END) =20 # define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \ - DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END) + DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ARG_END) =20 # define DO_TEST_CAPS_LATEST(name) \ DO_TEST_CAPS_ARCH_LATEST(name, "x86_64") diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b60a013ac0..6d808e172f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -216,11 +216,14 @@ mymain(void) # define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \ DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__) =20 +# define DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ...) \ + DO_TEST_CAPS_INTERNAL(name, arch, ver, __VA_ARGS__) + # define DO_TEST_CAPS_ARCH_LATEST(name, arch) \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END) =20 # define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \ - DO_TEST_CAPS_INTERNAL(name, arch, ver, ARG_END) + DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ARG_END) =20 # define DO_TEST_CAPS_LATEST(name) \ DO_TEST_CAPS_ARCH_LATEST(name, "x86_64") --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon May 6 03:35:02 2024 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 Reviewed-by: J=C3=A1n Tomko --- 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 From nobody Mon May 6 03:35:02 2024 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=1562082722; cv=none; d=zoho.com; s=zohoarc; b=S+X8gwHO+6RGLpi+KYG6MizThBx8ZhTmnjLBAgs+4yBaPkMUd9ziBTzeZeaSIIVMSuOS02pUkzl1y9oJcyh/QE/HsBUL05VbfG9NG03VMdO4A6wugmOD4CMWtFJXyUKlCim0I3wx36mh6ZSnFdbwOXIrpLZeqOynfQmc2kBxhSg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562082722; 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=OFK9MpfOSAE4xKooK7H0KZtKKyBT0IPxHUgc8+HFIvDC/b4apUiDJcqzLcpNS/KZcXi9O8iizSuMLd8/HTyHsG7xN3gZpSDwFPGZEK103KD8JdS9UcHwhq4vnNAsxh+45NF1W2PIJwlhCbeKe4PLIIPLzv1kZ1FL0PYnjalEjaY= 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 1562082722259965.8209390246866; Tue, 2 Jul 2019 08:52:02 -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 50329C0568FC; Tue, 2 Jul 2019 15:51:06 +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 E61E43829; Tue, 2 Jul 2019 15:51:00 +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 239A81806B0F; Tue, 2 Jul 2019 15:50:51 +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 x62FonqV008644 for ; Tue, 2 Jul 2019 11:50:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8CB3F19C6F; Tue, 2 Jul 2019 15:50:49 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 178831992E 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:42 +0200 Message-Id: <20190702155042.24568-5-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 4/4] 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.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.32]); Tue, 02 Jul 2019 15:51:50 +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 Reviewed-by: J=C3=A1n Tomko --- 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