From nobody Sun Feb 8 22:58:07 2026 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; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1571916040; cv=none; d=zoho.com; s=zohoarc; b=lvLn0Yxx5KzLUeXHLnWO1ur6mNcFQNVJ60mtlUjtMj6WfMgLkNHzUgBJentXS3rpUfBm534jGPS5rUS2MwAoDschSgEfCBQmshlJtMdnsJ2oDWGft6zueB8T60gvfsq2AvzXQjyJfYCOTKXVne8Sk4KD+xLcw4eBbKrXHYA1m2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571916040; h=Content-Type:Content-Transfer-Encoding:Cc: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=OUZuu+rScb/e+4Yjh+6Cjp8MnfwVLWwWLKBrppf6bhk=; b=jfokau6qDgVhy9OaFjKmFsdCfAqMopP42w3MPnezBUK2dZ43XnwzanCCRQs42xM38e8K9qPa6Y+lrhY9gFx92ROhRCbHeLm9juTfqVM/lxmUUkhNArUHzGoqfDJ6cxWq9MzHSYRa8U7FslTyBF4Ks35tPT3RXohYJK6lJUu5jTo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15719160400011004.1502316483752; Thu, 24 Oct 2019 04:20:40 -0700 (PDT) Received: from localhost ([::1]:38982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNb3O-0002DY-1L for importer@patchew.org; Thu, 24 Oct 2019 07:13:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59334) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNatK-0000za-RS for qemu-devel@nongnu.org; Thu, 24 Oct 2019 07:02:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNatE-0004qr-NE for qemu-devel@nongnu.org; Thu, 24 Oct 2019 07:02:54 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:52275 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNatE-0004mU-Bh for qemu-devel@nongnu.org; Thu, 24 Oct 2019 07:02:48 -0400 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-312-Zdo6mxc_PM2OzVnlnC6dBQ-1; Thu, 24 Oct 2019 07:02:41 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 858D41005516; Thu, 24 Oct 2019 11:02:40 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.36.118.123]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 53174608C1; Thu, 24 Oct 2019 11:02:40 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 4C59411329CF; Thu, 24 Oct 2019 13:02:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571914965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OUZuu+rScb/e+4Yjh+6Cjp8MnfwVLWwWLKBrppf6bhk=; b=ZdXauqCYSA9eY0G2IP1ky5HgbPbufckqwPuQ9/ZlUeNx0F88BK5zvmU6A3YyElyw/qc3G9 KDixkl1FIdVq4NAKmv4NzEGNZuXK/wAnHKmdtfQf0uXIdmUpBKWdF4ClD51LfTYUvjRylS 5ME+vyTM4WycBeBOCbAkrmdj3U1gACs= From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 06/19] qapi: Implement boxed event argument documentation Date: Thu, 24 Oct 2019 13:02:24 +0200 Message-Id: <20191024110237.30963-7-armbru@redhat.com> In-Reply-To: <20191024110237.30963-1-armbru@redhat.com> References: <20191024110237.30963-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: Zdo6mxc_PM2OzVnlnC6dBQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, pkrempa@redhat.com, mdroth@linux.vnet.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Generate a reference "Arguments: the members of ...", just like we do for commands since commit c2dd311cb7 "qapi2texi: Implement boxed argument documentation". No change to generated QMP documentation; we don't yet use boxed events outside tests/. Signed-off-by: Markus Armbruster --- tests/qapi-schema/doc-good.texi | 4 +++- scripts/qapi/doc.py | 10 +++++++++- tests/qapi-schema/doc-good.json | 1 - tests/qapi-schema/doc-good.out | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/qapi-schema/doc-good.texi b/tests/qapi-schema/doc-good.t= exi index 98aa78e1fb..d4b15dabf0 100644 --- a/tests/qapi-schema/doc-good.texi +++ b/tests/qapi-schema/doc-good.texi @@ -279,7 +279,9 @@ another feature =20 @deftypefn Event {} EVT-BOXED =20 -BUG: generated doc misses arguments + + +@b{Arguments:} the members of @code{Object} =20 @end deftypefn =20 diff --git a/scripts/qapi/doc.py b/scripts/qapi/doc.py index 6d5726cf6e..f2462c9877 100644 --- a/scripts/qapi/doc.py +++ b/scripts/qapi/doc.py @@ -266,9 +266,17 @@ class QAPISchemaGenDocVisitor(QAPISchemaVisitor): =20 def visit_event(self, name, info, ifcond, arg_type, boxed): doc =3D self.cur_doc + if boxed: + body =3D texi_body(doc) + body +=3D ('\n@b{Arguments:} the members of @code{%s}\n' + % arg_type.name) + body +=3D texi_features(doc) + body +=3D texi_sections(doc, ifcond) + else: + body =3D texi_entity(doc, 'Arguments', ifcond) self._gen.add(MSG_FMT(type=3D'Event', name=3Ddoc.symbol, - body=3Dtexi_entity(doc, 'Arguments', ifcond)= )) + body=3Dbody)) =20 def symbol(self, doc, entity): if self._gen._body: diff --git a/tests/qapi-schema/doc-good.json b/tests/qapi-schema/doc-good.j= son index df50a877e3..d992e713d9 100644 --- a/tests/qapi-schema/doc-good.json +++ b/tests/qapi-schema/doc-good.json @@ -160,7 +160,6 @@ =20 ## # @EVT-BOXED: -# BUG: generated doc misses arguments ## { 'event': 'EVT-BOXED', 'boxed': true, 'data': 'Object' } diff --git a/tests/qapi-schema/doc-good.out b/tests/qapi-schema/doc-good.out index 8cc29fce50..4c9406a464 100644 --- a/tests/qapi-schema/doc-good.out +++ b/tests/qapi-schema/doc-good.out @@ -196,4 +196,4 @@ another feature <- out doc symbol=3DEVT-BOXED body=3D -BUG: generated doc misses arguments + --=20 2.21.0