All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 10/19] qapi: Fix broken discriminator error messages
Date: Tue, 17 Sep 2019 13:05:41 -0500	[thread overview]
Message-ID: <9a28c542-b868-d9f1-3e35-c400e3b9bdf8@redhat.com> (raw)
In-Reply-To: <20190914153506.2151-11-armbru@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 984 bytes --]

On 9/14/19 10:34 AM, Markus Armbruster wrote:
> check_union() checks the discriminator exists in base and makes sense.
> Two error messages mention the base.  These are broken for anonymous
> bases, as demonstrated by tests flat-union-invalid-discriminator and
> flat-union-invalid-if-discriminator.err.  The third one doesn't
> bother.
> 
> First broken when commit ac4338f8eb "qapi: Allow anonymous base for
> flat union" (v2.6.0) neglected to adjust the "not a member of base"
> error message.  Commit ccadd6bcba "qapi: Add 'if' to implicit struct
> members" (v4.0.0) then cloned the flawed error message.
> 
> Dumb them down not to mention the base.

A trick for good error reporting: deciding when "less is more" :)

> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-09-17 18:06 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-14 15:34 [Qemu-devel] [PATCH 00/19] qapi: Frontend fixes and cleanups Markus Armbruster
2019-09-14 15:34 ` [Qemu-devel] [PATCH 01/19] tests/qapi-schema: Cover unknown pragma Markus Armbruster
2019-09-17 16:36   ` Eric Blake
2019-09-14 15:34 ` [Qemu-devel] [PATCH 02/19] tests/qapi-schema: Delete two redundant tests Markus Armbruster
2019-09-17 16:57   ` Eric Blake
2019-09-14 15:34 ` [Qemu-devel] [PATCH 03/19] tests/qapi-schema: Demonstrate misleading optional tag error Markus Armbruster
2019-09-17 17:36   ` Eric Blake
2019-09-14 15:34 ` [Qemu-devel] [PATCH 04/19] tests/qapi-schema: Demonstrate broken discriminator errors Markus Armbruster
2019-09-17 17:43   ` Eric Blake
2019-09-14 15:34 ` [Qemu-devel] [PATCH 05/19] tests/qapi-schema: Demonstrate insufficient 'if' checking Markus Armbruster
2019-09-17 17:47   ` Eric Blake
2019-09-23 11:55     ` Markus Armbruster
2019-09-23 12:55       ` Eric Blake
2019-09-14 15:34 ` [Qemu-devel] [PATCH 06/19] tests/qapi-schema: Demonstrate suboptimal lexical errors Markus Armbruster
2019-09-17 17:49   ` Eric Blake
2019-09-14 15:34 ` [Qemu-devel] [PATCH 07/19] qapi: Use quotes more consistently in frontend error messages Markus Armbruster
2019-09-17 17:52   ` Eric Blake
2019-09-14 15:34 ` [Qemu-devel] [PATCH 08/19] qapi: Improve reporting of lexical errors Markus Armbruster
2019-09-17 17:54   ` Eric Blake
2019-09-14 15:34 ` [Qemu-devel] [PATCH 09/19] qapi: Remove null from schema language Markus Armbruster
2019-09-17 18:01   ` Eric Blake
2019-09-14 15:34 ` [Qemu-devel] [PATCH 10/19] qapi: Fix broken discriminator error messages Markus Armbruster
2019-09-17 18:05   ` Eric Blake [this message]
2019-09-14 15:34 ` [Qemu-devel] [PATCH 11/19] qapi: Reject blank 'if' conditions in addition to empty ones Markus Armbruster
2019-09-17 18:06   ` Eric Blake
2019-09-14 15:34 ` [Qemu-devel] [PATCH 12/19] qapi: Fix missing 'if' checks in struct, union, alternate 'data' Markus Armbruster
2019-09-17 18:10   ` Eric Blake
2019-09-14 15:35 ` [Qemu-devel] [PATCH 13/19] qapi: Normalize 'if' in check_exprs(), like other sugar Markus Armbruster
2019-09-17 18:14   ` Eric Blake
2019-09-23 11:59     ` Markus Armbruster
2019-09-14 15:35 ` [Qemu-devel] [PATCH 14/19] qapi: Simplify check_keys() Markus Armbruster
2019-09-17 19:01   ` Eric Blake
2019-09-14 15:35 ` [Qemu-devel] [PATCH 15/19] qapi: Clean up around check_known_keys() Markus Armbruster
2019-09-17 19:03   ` Eric Blake
2019-09-14 15:35 ` [Qemu-devel] [PATCH 16/19] qapi: Delete useless check_exprs() code for simple union kind Markus Armbruster
2019-09-17 19:05   ` Eric Blake
2019-09-14 15:35 ` [Qemu-devel] [PATCH 17/19] qapi: Fix to .check() empty structs just once Markus Armbruster
2019-09-17 19:06   ` Eric Blake
2019-09-14 15:35 ` [Qemu-devel] [PATCH 18/19] qapi: Fix excessive QAPISchemaEntity.check() recursion Markus Armbruster
2019-09-17 19:26   ` Eric Blake
2019-09-23 12:01     ` Markus Armbruster
2019-09-14 15:35 ` [Qemu-devel] [PATCH 19/19] qapi: Assert .visit() and .check_clash() run only after .check() Markus Armbruster
2019-09-17 19:27   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a28c542-b868-d9f1-3e35-c400e3b9bdf8@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.