All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: marcandre.lureau@redhat.com
Cc: jsnow@redhat.com, qemu-devel@nongnu.org,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v7 09/10] qapi: add 'not' condition operation
Date: Fri, 06 Aug 2021 08:52:56 +0200	[thread overview]
Message-ID: <87czqr12uv.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20210804083105.97531-10-marcandre.lureau@redhat.com> (marcandre lureau's message of "Wed, 4 Aug 2021 12:31:04 +0400")

marcandre.lureau@redhat.com writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> For the sake of completeness, introduce the 'not' condition.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---

[...]

> diff --git a/tests/qapi-schema/enum-if-invalid.err b/tests/qapi-schema/enum-if-invalid.err
> index b96d94c48a..3bb84075a9 100644
> --- a/tests/qapi-schema/enum-if-invalid.err
> +++ b/tests/qapi-schema/enum-if-invalid.err
> @@ -1,3 +1,3 @@
>  enum-if-invalid.json: In enum 'TestIfEnum':
>  enum-if-invalid.json:2: 'if' condition has unknown key 'val'
> -Valid keys are 'all', 'any'.
> +Valid keys are 'all', 'any', 'not'.
> diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json
> index 5e3dbc0f72..1b3311ce89 100644
> --- a/tests/qapi-schema/qapi-schema-test.json
> +++ b/tests/qapi-schema/qapi-schema-test.json
> @@ -244,7 +244,7 @@
>    'if': { 'all': ['defined(TEST_IF_ALT)', 'defined(TEST_IF_STRUCT)'] } }
>  
>  { 'command': 'test-if-alternate-cmd', 'data': { 'alt-cmd-arg': 'TestIfAlternate' },
> -  'if': { 'all': ['defined(TEST_IF_ALT)'] } }
> +  'if': { 'all': ['defined(TEST_IF_ALT)', {'not': 'defined(TEST_IF_NOT_ALT)'}] } }

Easier to read:

   { 'command': 'test-if-alternate-cmd',
     'data': { 'alt-cmd-arg': 'TestIfAlternate' },
     'if': { 'all': ['defined(TEST_IF_ALT)',
                     {'not': 'defined(TEST_IF_NOT_ALT)'}] } }

Done in my tree.

>  
>  { 'command': 'test-if-cmd',
>    'data': {

[...]



  reply	other threads:[~2021-08-06  6:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  8:30 [PATCH v7 00/10] qapi: untie 'if' conditions from C preprocessor marcandre.lureau
2021-08-04  8:30 ` [PATCH v7 01/10] docs: update the documentation upfront about schema configuration marcandre.lureau
2021-08-04  8:30 ` [PATCH v7 02/10] qapi: wrap Sequence[str] in an object marcandre.lureau
2021-08-04  8:30 ` [PATCH v7 03/10] qapi: add QAPISchemaIfCond.is_present() marcandre.lureau
2021-08-04  8:30 ` [PATCH v7 04/10] qapi: introduce QAPISchemaIfCond.cgen() marcandre.lureau
2021-08-05 11:53   ` Markus Armbruster
2021-08-04  8:31 ` [PATCH v7 05/10] qapidoc: introduce QAPISchemaIfCond.docgen() marcandre.lureau
2021-08-05 11:55   ` Markus Armbruster
2021-08-05 12:02     ` Marc-André Lureau
2021-08-05 17:34       ` Markus Armbruster
2021-08-04  8:31 ` [PATCH v7 06/10] qapi: replace if condition list with dict {'all': [...]} marcandre.lureau
2021-08-05 13:41   ` Markus Armbruster
2021-08-05 14:00     ` Marc-André Lureau
2021-08-05 16:06     ` Markus Armbruster
2021-08-05 15:14   ` Markus Armbruster
2021-08-04  8:31 ` [PATCH v7 07/10] qapi: add 'any' condition marcandre.lureau
2021-08-04  8:31 ` [PATCH v7 08/10] qapi: Use 'if': { 'any': ... } where appropriate marcandre.lureau
2021-08-05 13:56   ` Markus Armbruster
2021-08-05 14:41     ` Marc-André Lureau
2021-08-06  6:48       ` Markus Armbruster
2021-08-04  8:31 ` [PATCH v7 09/10] qapi: add 'not' condition operation marcandre.lureau
2021-08-06  6:52   ` Markus Armbruster [this message]
2021-08-04  8:31 ` [PATCH v7 10/10] qapi: make 'if' condition strings simple identifiers marcandre.lureau
2021-08-05 19:21   ` Eric Blake
2021-08-05 17:36 ` [PATCH v7 00/10] qapi: untie 'if' conditions from C preprocessor Markus Armbruster
2021-08-07  6:05   ` Markus Armbruster

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=87czqr12uv.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=marcandre.lureau@redhat.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.