marcandre.lur...@redhat.com writes: > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > For the sake of completeness, introduce the 'not' condition. > > Signed-off-by: Marc-André Lureau <marcandre.lur...@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': { [...]