From nobody Sun Nov 9 19:11:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15514555430131001.7600470557829; Fri, 1 Mar 2019 07:52:23 -0800 (PST) Received: from localhost ([127.0.0.1]:39632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzkSS-0000aT-IB for importer@patchew.org; Fri, 01 Mar 2019 10:52:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzkNE-0004sk-Cm for qemu-devel@nongnu.org; Fri, 01 Mar 2019 10:46:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzkHU-0005uZ-M2 for qemu-devel@nongnu.org; Fri, 01 Mar 2019 10:41:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6377) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gzkHR-0005pK-TR for qemu-devel@nongnu.org; Fri, 01 Mar 2019 10:40:58 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 916AD308B6AC; Fri, 1 Mar 2019 15:40:56 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-92.ams2.redhat.com [10.36.116.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F97D6017B; Fri, 1 Mar 2019 15:40:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id C14431133056; Fri, 1 Mar 2019 16:40:51 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Fri, 1 Mar 2019 16:40:50 +0100 Message-Id: <20190301154051.23317-7-armbru@redhat.com> In-Reply-To: <20190301154051.23317-1-armbru@redhat.com> References: <20190301154051.23317-1-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 01 Mar 2019 15:40:56 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 6/7] tests/qapi-schema: Cover forward reference to sub-module X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mdroth@linux.vnet.ibm.com, quintela@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The forward reference from the main module to the sub-module works fine, except for an issue visible in qapi-schema-test.out: the array type wrapped around the forward reference ends up in the main module, not the sub-module. The next commit will explain why that's bad, and fix it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/qapi-schema/qapi-schema-test.json | 3 ++- tests/qapi-schema/qapi-schema-test.out | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qa= pi-schema-test.json index 908f718027..0952c68734 100644 --- a/tests/qapi-schema/qapi-schema-test.json +++ b/tests/qapi-schema/qapi-schema-test.json @@ -128,7 +128,8 @@ 'boolean': ['bool'], 'string': ['str'], 'sizes': ['size'], - 'any': ['any'] } } + 'any': ['any'], + 'user': ['Status'] } } # intentional forward ref. to sub-module =20 # for testing sub-modules { 'include': 'include/sub-module.json' } diff --git a/tests/qapi-schema/qapi-schema-test.out b/tests/qapi-schema/qap= i-schema-test.out index cecf270ec3..38c1de70d8 100644 --- a/tests/qapi-schema/qapi-schema-test.out +++ b/tests/qapi-schema/qapi-schema-test.out @@ -144,6 +144,9 @@ object q_obj_sizeList-wrapper member data: sizeList optional=3DFalse object q_obj_anyList-wrapper member data: anyList optional=3DFalse +array StatusList Status +object q_obj_StatusList-wrapper + member data: StatusList optional=3DFalse enum UserDefListUnionKind member integer member s8 @@ -159,6 +162,7 @@ enum UserDefListUnionKind member string member sizes member any + member user object UserDefListUnion member type: UserDefListUnionKind optional=3DFalse tag type @@ -176,6 +180,7 @@ object UserDefListUnion case string: q_obj_strList-wrapper case sizes: q_obj_sizeList-wrapper case any: q_obj_anyList-wrapper + case user: q_obj_StatusList-wrapper include include/sub-module.json module include/sub-module.json include sub-sub-module.json --=20 2.17.2