qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 4cfd65: qapi: Tidy up unusual line breaks


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 4cfd65: qapi: Tidy up unusual line breaks
Date: Mon, 27 Sep 2021 07:09:38 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 4cfd6537e42b108441852b34fc15933fc66628a1
      
https://github.com/qemu/qemu/commit/4cfd6537e42b108441852b34fc15933fc66628a1
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-25 (Sat, 25 Sep 2021)

  Changed paths:
    M docs/devel/qapi-code-gen.rst
    M tests/qapi-schema/doc-good.json
    M tests/qapi-schema/enum-if-invalid.json
    M tests/qapi-schema/qapi-schema-test.json

  Log Message:
  -----------
  qapi: Tidy up unusual line breaks

Break lines between members instead of within members.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210917143134.412106-2-armbru@redhat.com>


  Commit: 8ebc3120e161424911ba6d8725e77da32fbb25e5
      
https://github.com/qemu/qemu/commit/8ebc3120e161424911ba6d8725e77da32fbb25e5
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-25 (Sat, 25 Sep 2021)

  Changed paths:
    M scripts/qapi/expr.py
    M tests/qapi-schema/meson.build
    R tests/qapi-schema/reserved-type-kind.err
    R tests/qapi-schema/reserved-type-kind.json
    R tests/qapi-schema/reserved-type-kind.out

  Log Message:
  -----------
  qapi: Stop enforcing "type name should not end in 'Kind'

I'm about to convert simple unions to flat unions, then drop simple
union support.  The conversion involves making the implict enum types
explicit.  To reduce churn, I'd like to name them exactly like the
implicit types they replace.  However, these names are reserved for
the generator's use.  They won't be once simple unions are gone.  Stop
enforcing this naming rule now rather than then.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-3-armbru@redhat.com>


  Commit: 3cda299dda578c64b06fcd20e4510b10a7a64bd9
      
https://github.com/qemu/qemu/commit/3cda299dda578c64b06fcd20e4510b10a7a64bd9
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-25 (Sat, 25 Sep 2021)

  Changed paths:
    M qapi/ui.json

  Log Message:
  -----------
  qapi: Convert simple union KeyValue to flat one

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, convert simple union KeyValue to an
equivalent flat one.  Adds some boilerplate to the schema, which is a
bit ugly, but a lot easier to maintain than the simple union feature.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-4-armbru@redhat.com>


  Commit: b6fd5434de9cdf356fde37f55f52d121361e3297
      
https://github.com/qemu/qemu/commit/b6fd5434de9cdf356fde37f55f52d121361e3297
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-25 (Sat, 25 Sep 2021)

  Changed paths:
    M qapi/ui.json

  Log Message:
  -----------
  qapi: Convert simple union InputEvent to flat one

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, convert simple union InputEvent to an
equivalent flat one.  Adds some boilerplate to the schema, which is a
bit ugly, but a lot easier to maintain than the simple union feature.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-5-armbru@redhat.com>


  Commit: 39dc3e4a4e3a485c8a8688bd29476fdbf95b0bb5
      
https://github.com/qemu/qemu/commit/39dc3e4a4e3a485c8a8688bd29476fdbf95b0bb5
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M backends/tpm/tpm_emulator.c
    M backends/tpm/tpm_passthrough.c
    M monitor/hmp-cmds.c
    M qapi/tpm.json

  Log Message:
  -----------
  qapi: Convert simple union TpmTypeOptions to flat one

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, convert simple union TpmTypeOptions to
an equivalent flat one, with existing enum TpmType replacing implicit
enum TpmTypeOptionsKind.  Adds some boilerplate to the schema, which
is a bit ugly, but a lot easier to maintain than the simple union
feature.

Cc: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-6-armbru@redhat.com>
[Indentation tidied up]


  Commit: db6a252bfda5c4aac8e0b360ad28e07981936945
      
https://github.com/qemu/qemu/commit/db6a252bfda5c4aac8e0b360ad28e07981936945
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M qapi/machine.json

  Log Message:
  -----------
  qapi: Convert simple union MemoryDeviceInfo to flat one

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, convert simple union MemoryDeviceInfo to
an equivalent flat one.  Adds some boilerplate to the schema, which is
a bit ugly, but a lot easier to maintain than the simple union
feature.

Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-7-armbru@redhat.com>


  Commit: 3218c0e91c7a3b07377556eb0f2de35f150dd568
      
https://github.com/qemu/qemu/commit/3218c0e91c7a3b07377556eb0f2de35f150dd568
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M qapi/char.json

  Log Message:
  -----------
  qapi: Convert simple union ChardevBackend to flat one

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, convert simple union ChardevBackend to
an equivalent flat one.  Adds some boilerplate to the schema, which is
a bit ugly, but a lot easier to maintain than the simple union
feature.

Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-8-armbru@redhat.com>
[Missing conditionals added]


  Commit: 935a867c878d1450bf240caa18489649fcdff771
      
https://github.com/qemu/qemu/commit/935a867c878d1450bf240caa18489649fcdff771
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M chardev/char-socket.c
    M chardev/char-udp.c
    M qapi/sockets.json
    M tests/unit/test-yank.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  qapi: Convert simple union SocketAddressLegacy to flat one

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, convert simple union SocketAddressLegacy
to an equivalent flat one, with existing enum SocketAddressType
replacing implicit enum type SocketAddressLegacyKind.  Adds some
boilerplate to the schema, which is a bit ugly, but a lot easier to
maintain than the simple union feature.

Cc: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-9-armbru@redhat.com>


  Commit: 0db4f50397ac518e3674d0a4fa73c3a3c823060d
      
https://github.com/qemu/qemu/commit/0db4f50397ac518e3674d0a4fa73c3a3c823060d
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: Convert simple union ImageInfoSpecific to flat one

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, convert simple union ImageInfoSpecific
to an equivalent flat one.  Adds some boilerplate to the schema, which
is a bit ugly, but a lot easier to maintain than the simple union
feature.

Implicit enum ImageInfoSpecificKind becomes explicit.  It duplicates
part of enum BlockdevDriver.  We could reuse BlockdevDriver instead.

Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20210917143134.412106-10-armbru@redhat.com>


  Commit: 277b51fc018eea4432870fca1bac7f6468c4314c
      
https://github.com/qemu/qemu/commit/277b51fc018eea4432870fca1bac7f6468c4314c
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M qapi/transaction.json

  Log Message:
  -----------
  qapi: Convert simple union TransactionAction to flat one

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, convert simple union TransactionAction
to an equivalent flat one.  Adds some boilerplate to the schema, which
is a bit ugly, but a lot easier to maintain than the simple union
feature.

Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20210917143134.412106-11-armbru@redhat.com>


  Commit: dffd8ff9e6ab7efff941966ecc5d0b9a65f61e51
      
https://github.com/qemu/qemu/commit/dffd8ff9e6ab7efff941966ecc5d0b9a65f61e51
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  tests/qapi-schema: Prepare for simple union UserDefListUnion removal

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, simple union UserDefListUnion has to go.
It is used to cover arrays.  The next few commits will eliminate its
uses, and then it gets deleted.  As a first step, provide struct
ArrayStruct for the tests to be rewritten.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-12-armbru@redhat.com>


  Commit: e7a76fe25aa0b2856f6b86ad15ffe974b8727bdb
      
https://github.com/qemu/qemu/commit/e7a76fe25aa0b2856f6b86ad15ffe974b8727bdb
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/unit/test-qobject-input-visitor.c

  Log Message:
  -----------
  test-qobject-input-visitor: Wean off UserDefListUnion

The test_visitor_in_list_union_FOO() use simple union UserDefListUnion
to cover lists of builtin types.  Rewrite as
test_visitor_in_list_struct(), using struct ArrayStruct and a lot less
code.

test_visitor_in_fail_union_list() uses UserDefListUnion to cover
"variant members don't match the discriminator value".  Cover that in
test_visitor_in_fail_union_flat() instead, and drop
test_visitor_in_fail_union_list().  Appropriating the former for this
purpose is okay, because it actually failed due to missing
discriminator, which is still covered by
test_visitor_in_fail_union_flat_no_discrim().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-13-armbru@redhat.com>


  Commit: 00e6832f419529645f45f93ccccb3778d51e9d0a
      
https://github.com/qemu/qemu/commit/00e6832f419529645f45f93ccccb3778d51e9d0a
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/unit/test-qobject-output-visitor.c

  Log Message:
  -----------
  test-qobject-output-visitor: Wean off UserDefListUnion

The test_visitor_out_list_union_FOO() use simple union
UserDefListUnion to cover lists of builtin types.  Rewrite as
test_visitor_out_list_struct(), using struct ArrayStruct and a lot
less code.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-14-armbru@redhat.com>


  Commit: 16821fc85b078b08f4e6f1cc3d57fb4c00568a25
      
https://github.com/qemu/qemu/commit/16821fc85b078b08f4e6f1cc3d57fb4c00568a25
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/unit/test-clone-visitor.c

  Log Message:
  -----------
  test-clone-visitor: Wean off UserDefListUnion

test_clone_complex1() uses simple union UserDefListUnion to cover
unions.  Use UserDefFlatUnion instead.  Arrays are still covered by
test_clone_complex3().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-15-armbru@redhat.com>


  Commit: 1e65e16ca3c7a41d15c8b80f922d68fabc0b96b8
      
https://github.com/qemu/qemu/commit/1e65e16ca3c7a41d15c8b80f922d68fabc0b96b8
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/unit/test-qmp-cmds.c

  Log Message:
  -----------
  tests/qapi-schema: Wean off UserDefListUnion

Command boxed-union uses simple union UserDefListUnion to cover
unions.  Use UserDefFlatUnion instead.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-16-armbru@redhat.com>


  Commit: def1d1f57188b6e5523042f3a6ae2ab61065d075
      
https://github.com/qemu/qemu/commit/def1d1f57188b6e5523042f3a6ae2ab61065d075
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  tests/qapi-schema: Simple union UserDefListUnion is now unused, drop

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-17-armbru@redhat.com>


  Commit: 54501863376eff16973648523afeed76d4d28106
      
https://github.com/qemu/qemu/commit/54501863376eff16973648523afeed76d4d28106
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  tests/qapi-schema: Rewrite simple union TestIfUnion to be flat

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, rewrite TestIfUnion to be flat.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-18-armbru@redhat.com>


  Commit: 7a22dc17ac5990e5efce90f43ba33650ec9b6ff6
      
https://github.com/qemu/qemu/commit/7a22dc17ac5990e5efce90f43ba33650ec9b6ff6
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/unit/test-clone-visitor.c

  Log Message:
  -----------
  test-clone-visitor: Wean off __org.qemu_x-Union1

test_clone_complex3() uses simple union __org.qemu_x-Union1 to cover
arrays.  Use UserDefOneList instead.  Unions are still covered by
test_clone_complex1().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-19-armbru@redhat.com>


  Commit: bb5821dd8194ed8b50f36a45ecffeac87045937d
      
https://github.com/qemu/qemu/commit/bb5821dd8194ed8b50f36a45ecffeac87045937d
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/unit/test-qmp-cmds.c

  Log Message:
  -----------
  tests/qapi-schema: Drop simple union __org.qemu_x-Union1

Replace simple union __org.qemu_x-Union1 with flat union
__org.qemu_x-Union2, except drop it from __org.qemu_x-command, because
there it's only used to pull it into QMP.  Now drop the unused
-Union1, and rename -Union2 to -Union.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-20-armbru@redhat.com>


  Commit: 76432d988b67d95006d0aa66dce2aa5999868d29
      
https://github.com/qemu/qemu/commit/76432d988b67d95006d0aa66dce2aa5999868d29
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/qapi-schema/args-union.err
    M tests/qapi-schema/args-union.json
    M tests/qapi-schema/bad-base.err
    M tests/qapi-schema/bad-base.json
    M tests/qapi-schema/doc-good.json
    M tests/qapi-schema/doc-good.out
    M tests/qapi-schema/doc-good.txt
    M tests/qapi-schema/flat-union-base-union.err
    M tests/qapi-schema/flat-union-base-union.json
    M tests/qapi-schema/meson.build
    R tests/qapi-schema/union-branch-case.err
    R tests/qapi-schema/union-branch-case.json
    R tests/qapi-schema/union-branch-case.out
    M tests/qapi-schema/union-branch-invalid-dict.err
    M tests/qapi-schema/union-branch-invalid-dict.json
    R tests/qapi-schema/union-clash-branches.err
    R tests/qapi-schema/union-clash-branches.json
    R tests/qapi-schema/union-clash-branches.out
    R tests/qapi-schema/union-empty.err
    R tests/qapi-schema/union-empty.json
    R tests/qapi-schema/union-empty.out
    R tests/qapi-schema/union-optional-branch.err
    R tests/qapi-schema/union-optional-branch.json
    R tests/qapi-schema/union-optional-branch.out
    M tests/qapi-schema/union-unknown.err
    M tests/qapi-schema/union-unknown.json

  Log Message:
  -----------
  tests/qapi-schema: Purge simple unions from tests

Drop tests that are specifically about simple unions:

* SugaredUnion in doc-good: flat unions are covered by @Object.

* union-branch-case and union-clash-branches: branch naming for flat
  unions is enforced for the tag enum instead, which is covered by
  enum-member-case and enum-clash-member.

* union-empty: empty flat unions are covered by flat-union-empty.

Rewrite the remainder to use flat unions: args-union, bad-base,
flat-union-base-union, union-branch-invalid-dict, union-unknown.

Except drop union-optional-branch. because converting this one is not
worth the trouble; we don't explicitly check names beginning with '*'
in other places, either.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-21-armbru@redhat.com>


  Commit: 4e99f4b12c0e47898e8358a5c8fa54267bb16185
      
https://github.com/qemu/qemu/commit/4e99f4b12c0e47898e8358a5c8fa54267bb16185
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M docs/devel/qapi-code-gen.rst
    M scripts/qapi/expr.py
    M scripts/qapi/schema.py
    M tests/qapi-schema/flat-union-array-branch.json
    M tests/qapi-schema/flat-union-empty.json
    M tests/qapi-schema/flat-union-int-branch.json
    M tests/qapi-schema/flat-union-no-base.err
    M tests/qapi-schema/flat-union-no-base.json
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/reserved-member-u.json
    M tests/qapi-schema/union-base-empty.json
    M tests/qapi-schema/union-base-no-discriminator.err
    M tests/qapi-schema/union-base-no-discriminator.json

  Log Message:
  -----------
  qapi: Drop simple unions

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

The previous commits eliminated simple union from the tree.  Now drop
them from the QAPI schema language entirely, and update mentions of
"flat union" to just "union".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-22-armbru@redhat.com>


  Commit: 8b3b3a16dfca57b7c4e7b8af215aec96880153d7
      
https://github.com/qemu/qemu/commit/8b3b3a16dfca57b7c4e7b8af215aec96880153d7
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    R tests/qapi-schema/flat-union-array-branch.err
    R tests/qapi-schema/flat-union-array-branch.json
    R tests/qapi-schema/flat-union-array-branch.out
    R tests/qapi-schema/flat-union-bad-base.err
    R tests/qapi-schema/flat-union-bad-base.json
    R tests/qapi-schema/flat-union-bad-base.out
    R tests/qapi-schema/flat-union-bad-discriminator.err
    R tests/qapi-schema/flat-union-bad-discriminator.json
    R tests/qapi-schema/flat-union-bad-discriminator.out
    R tests/qapi-schema/flat-union-base-any.err
    R tests/qapi-schema/flat-union-base-any.json
    R tests/qapi-schema/flat-union-base-any.out
    R tests/qapi-schema/flat-union-base-union.err
    R tests/qapi-schema/flat-union-base-union.json
    R tests/qapi-schema/flat-union-base-union.out
    R tests/qapi-schema/flat-union-clash-member.err
    R tests/qapi-schema/flat-union-clash-member.json
    R tests/qapi-schema/flat-union-clash-member.out
    R tests/qapi-schema/flat-union-discriminator-bad-name.err
    R tests/qapi-schema/flat-union-discriminator-bad-name.json
    R tests/qapi-schema/flat-union-discriminator-bad-name.out
    R tests/qapi-schema/flat-union-empty.err
    R tests/qapi-schema/flat-union-empty.json
    R tests/qapi-schema/flat-union-empty.out
    R tests/qapi-schema/flat-union-inline-invalid-dict.err
    R tests/qapi-schema/flat-union-inline-invalid-dict.json
    R tests/qapi-schema/flat-union-inline-invalid-dict.out
    R tests/qapi-schema/flat-union-int-branch.err
    R tests/qapi-schema/flat-union-int-branch.json
    R tests/qapi-schema/flat-union-int-branch.out
    R tests/qapi-schema/flat-union-invalid-branch-key.err
    R tests/qapi-schema/flat-union-invalid-branch-key.json
    R tests/qapi-schema/flat-union-invalid-branch-key.out
    R tests/qapi-schema/flat-union-invalid-discriminator.err
    R tests/qapi-schema/flat-union-invalid-discriminator.json
    R tests/qapi-schema/flat-union-invalid-discriminator.out
    R tests/qapi-schema/flat-union-invalid-if-discriminator.err
    R tests/qapi-schema/flat-union-invalid-if-discriminator.json
    R tests/qapi-schema/flat-union-invalid-if-discriminator.out
    R tests/qapi-schema/flat-union-no-base.err
    R tests/qapi-schema/flat-union-no-base.json
    R tests/qapi-schema/flat-union-no-base.out
    R tests/qapi-schema/flat-union-optional-discriminator.err
    R tests/qapi-schema/flat-union-optional-discriminator.json
    R tests/qapi-schema/flat-union-optional-discriminator.out
    R tests/qapi-schema/flat-union-string-discriminator.err
    R tests/qapi-schema/flat-union-string-discriminator.json
    R tests/qapi-schema/flat-union-string-discriminator.out
    M tests/qapi-schema/meson.build
    A tests/qapi-schema/union-array-branch.err
    A tests/qapi-schema/union-array-branch.json
    A tests/qapi-schema/union-array-branch.out
    A tests/qapi-schema/union-bad-base.err
    A tests/qapi-schema/union-bad-base.json
    A tests/qapi-schema/union-bad-base.out
    A tests/qapi-schema/union-bad-discriminator.err
    A tests/qapi-schema/union-bad-discriminator.json
    A tests/qapi-schema/union-bad-discriminator.out
    A tests/qapi-schema/union-base-any.err
    A tests/qapi-schema/union-base-any.json
    A tests/qapi-schema/union-base-any.out
    A tests/qapi-schema/union-base-union.err
    A tests/qapi-schema/union-base-union.json
    A tests/qapi-schema/union-base-union.out
    A tests/qapi-schema/union-clash-member.err
    A tests/qapi-schema/union-clash-member.json
    A tests/qapi-schema/union-clash-member.out
    A tests/qapi-schema/union-discriminator-bad-name.err
    A tests/qapi-schema/union-discriminator-bad-name.json
    A tests/qapi-schema/union-discriminator-bad-name.out
    A tests/qapi-schema/union-empty.err
    A tests/qapi-schema/union-empty.json
    A tests/qapi-schema/union-empty.out
    A tests/qapi-schema/union-inline-invalid-dict.err
    A tests/qapi-schema/union-inline-invalid-dict.json
    A tests/qapi-schema/union-inline-invalid-dict.out
    A tests/qapi-schema/union-int-branch.err
    A tests/qapi-schema/union-int-branch.json
    A tests/qapi-schema/union-int-branch.out
    A tests/qapi-schema/union-invalid-branch-key.err
    A tests/qapi-schema/union-invalid-branch-key.json
    A tests/qapi-schema/union-invalid-branch-key.out
    A tests/qapi-schema/union-invalid-discriminator.err
    A tests/qapi-schema/union-invalid-discriminator.json
    A tests/qapi-schema/union-invalid-discriminator.out
    A tests/qapi-schema/union-invalid-if-discriminator.err
    A tests/qapi-schema/union-invalid-if-discriminator.json
    A tests/qapi-schema/union-invalid-if-discriminator.out
    A tests/qapi-schema/union-no-base.err
    A tests/qapi-schema/union-no-base.json
    A tests/qapi-schema/union-no-base.out
    A tests/qapi-schema/union-optional-discriminator.err
    A tests/qapi-schema/union-optional-discriminator.json
    A tests/qapi-schema/union-optional-discriminator.out
    A tests/qapi-schema/union-string-discriminator.err
    A tests/qapi-schema/union-string-discriminator.json
    A tests/qapi-schema/union-string-discriminator.out

  Log Message:
  -----------
  tests/qapi-schema: Rename flat-union-* test cases to union-*

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210917143134.412106-23-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com


  Commit: f90ae4d1048ffc10cd65434f7377c5e09528d1db
      
https://github.com/qemu/qemu/commit/f90ae4d1048ffc10cd65434f7377c5e09528d1db
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/unit/test-clone-visitor.c

  Log Message:
  -----------
  test-clone-visitor: Correct an accidental rename

Commit b359f4b203 "tests: Rename UserDefNativeListUnion to
UserDefListUnion" renamed test_clone_native_list() to
test_clone_list_union().  The function has nothing to do with unions.
Rename it to test_clone_list().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-24-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


  Commit: 436911c2a16c1c2b4d1248f0d5a720f0a9decaad
      
https://github.com/qemu/qemu/commit/436911c2a16c1c2b4d1248f0d5a720f0a9decaad
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/qapi-schema/test-qapi.py

  Log Message:
  -----------
  tests/qapi-schema: Use Python OSError instead of outmoded IOError

https://docs.python.org/3.6/library/exceptions.html has

    Changed in version 3.3: EnvironmentError, IOError, WindowsError,
    socket.error, select.error and mmap.error have been merged into
    OSError, and the constructor may return a subclass.

and

    The following exceptions are kept for compatibility with previous
    versions; starting from Python 3.3, they are aliases of OSError.

    exception EnvironmentError

    exception IOError

    exception WindowsError

        Only available on Windows.

Switch to the preferred name.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210922125619.670673-2-armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
[Details added to commit message]


  Commit: f333681c6e277004796b0bed808697da1280d140
      
https://github.com/qemu/qemu/commit/f333681c6e277004796b0bed808697da1280d140
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M tests/qapi-schema/test-qapi.py

  Log Message:
  -----------
  tests/qapi-schema: Make test-qapi.py -u work when files are absent

test-qapi.py -u updates the expected files.  Since it fails when they
are absent, users have to create them manually before they can use
test-qapi.py to fill in the contents, say for a new test.  Silly.
Improve -u to create them.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210922125619.670673-3-armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>


  Commit: de8ed1055c2ce18c95f597eb10df360dcb534f99
      
https://github.com/qemu/qemu/commit/de8ed1055c2ce18c95f597eb10df360dcb534f99
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M backends/tpm/tpm_emulator.c
    M backends/tpm/tpm_passthrough.c
    M chardev/char-socket.c
    M chardev/char-udp.c
    M docs/devel/qapi-code-gen.rst
    M monitor/hmp-cmds.c
    M qapi/block-core.json
    M qapi/char.json
    M qapi/machine.json
    M qapi/sockets.json
    M qapi/tpm.json
    M qapi/transaction.json
    M qapi/ui.json
    M scripts/qapi/expr.py
    M scripts/qapi/schema.py
    M tests/qapi-schema/args-union.err
    M tests/qapi-schema/args-union.json
    M tests/qapi-schema/bad-base.err
    M tests/qapi-schema/bad-base.json
    M tests/qapi-schema/doc-good.json
    M tests/qapi-schema/doc-good.out
    M tests/qapi-schema/doc-good.txt
    M tests/qapi-schema/enum-if-invalid.json
    R tests/qapi-schema/flat-union-array-branch.err
    R tests/qapi-schema/flat-union-array-branch.json
    R tests/qapi-schema/flat-union-array-branch.out
    R tests/qapi-schema/flat-union-bad-base.err
    R tests/qapi-schema/flat-union-bad-base.json
    R tests/qapi-schema/flat-union-bad-base.out
    R tests/qapi-schema/flat-union-bad-discriminator.err
    R tests/qapi-schema/flat-union-bad-discriminator.json
    R tests/qapi-schema/flat-union-bad-discriminator.out
    R tests/qapi-schema/flat-union-base-any.err
    R tests/qapi-schema/flat-union-base-any.json
    R tests/qapi-schema/flat-union-base-any.out
    R tests/qapi-schema/flat-union-base-union.err
    R tests/qapi-schema/flat-union-base-union.json
    R tests/qapi-schema/flat-union-base-union.out
    R tests/qapi-schema/flat-union-clash-member.err
    R tests/qapi-schema/flat-union-clash-member.json
    R tests/qapi-schema/flat-union-clash-member.out
    R tests/qapi-schema/flat-union-discriminator-bad-name.err
    R tests/qapi-schema/flat-union-discriminator-bad-name.json
    R tests/qapi-schema/flat-union-discriminator-bad-name.out
    R tests/qapi-schema/flat-union-empty.err
    R tests/qapi-schema/flat-union-empty.json
    R tests/qapi-schema/flat-union-empty.out
    R tests/qapi-schema/flat-union-inline-invalid-dict.err
    R tests/qapi-schema/flat-union-inline-invalid-dict.json
    R tests/qapi-schema/flat-union-inline-invalid-dict.out
    R tests/qapi-schema/flat-union-int-branch.err
    R tests/qapi-schema/flat-union-int-branch.json
    R tests/qapi-schema/flat-union-int-branch.out
    R tests/qapi-schema/flat-union-invalid-branch-key.err
    R tests/qapi-schema/flat-union-invalid-branch-key.json
    R tests/qapi-schema/flat-union-invalid-branch-key.out
    R tests/qapi-schema/flat-union-invalid-discriminator.err
    R tests/qapi-schema/flat-union-invalid-discriminator.json
    R tests/qapi-schema/flat-union-invalid-discriminator.out
    R tests/qapi-schema/flat-union-invalid-if-discriminator.err
    R tests/qapi-schema/flat-union-invalid-if-discriminator.json
    R tests/qapi-schema/flat-union-invalid-if-discriminator.out
    R tests/qapi-schema/flat-union-no-base.err
    R tests/qapi-schema/flat-union-no-base.json
    R tests/qapi-schema/flat-union-no-base.out
    R tests/qapi-schema/flat-union-optional-discriminator.err
    R tests/qapi-schema/flat-union-optional-discriminator.json
    R tests/qapi-schema/flat-union-optional-discriminator.out
    R tests/qapi-schema/flat-union-string-discriminator.err
    R tests/qapi-schema/flat-union-string-discriminator.json
    R tests/qapi-schema/flat-union-string-discriminator.out
    M tests/qapi-schema/meson.build
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/qapi-schema/reserved-member-u.json
    R tests/qapi-schema/reserved-type-kind.err
    R tests/qapi-schema/reserved-type-kind.json
    R tests/qapi-schema/reserved-type-kind.out
    M tests/qapi-schema/test-qapi.py
    A tests/qapi-schema/union-array-branch.err
    A tests/qapi-schema/union-array-branch.json
    A tests/qapi-schema/union-array-branch.out
    A tests/qapi-schema/union-bad-base.err
    A tests/qapi-schema/union-bad-base.json
    A tests/qapi-schema/union-bad-base.out
    A tests/qapi-schema/union-bad-discriminator.err
    A tests/qapi-schema/union-bad-discriminator.json
    A tests/qapi-schema/union-bad-discriminator.out
    A tests/qapi-schema/union-base-any.err
    A tests/qapi-schema/union-base-any.json
    A tests/qapi-schema/union-base-any.out
    M tests/qapi-schema/union-base-empty.json
    M tests/qapi-schema/union-base-no-discriminator.err
    M tests/qapi-schema/union-base-no-discriminator.json
    A tests/qapi-schema/union-base-union.err
    A tests/qapi-schema/union-base-union.json
    A tests/qapi-schema/union-base-union.out
    R tests/qapi-schema/union-branch-case.err
    R tests/qapi-schema/union-branch-case.json
    R tests/qapi-schema/union-branch-case.out
    M tests/qapi-schema/union-branch-invalid-dict.err
    M tests/qapi-schema/union-branch-invalid-dict.json
    R tests/qapi-schema/union-clash-branches.err
    R tests/qapi-schema/union-clash-branches.json
    R tests/qapi-schema/union-clash-branches.out
    A tests/qapi-schema/union-clash-member.err
    A tests/qapi-schema/union-clash-member.json
    A tests/qapi-schema/union-clash-member.out
    A tests/qapi-schema/union-discriminator-bad-name.err
    A tests/qapi-schema/union-discriminator-bad-name.json
    A tests/qapi-schema/union-discriminator-bad-name.out
    M tests/qapi-schema/union-empty.err
    M tests/qapi-schema/union-empty.json
    A tests/qapi-schema/union-inline-invalid-dict.err
    A tests/qapi-schema/union-inline-invalid-dict.json
    A tests/qapi-schema/union-inline-invalid-dict.out
    A tests/qapi-schema/union-int-branch.err
    A tests/qapi-schema/union-int-branch.json
    A tests/qapi-schema/union-int-branch.out
    A tests/qapi-schema/union-invalid-branch-key.err
    A tests/qapi-schema/union-invalid-branch-key.json
    A tests/qapi-schema/union-invalid-branch-key.out
    A tests/qapi-schema/union-invalid-discriminator.err
    A tests/qapi-schema/union-invalid-discriminator.json
    A tests/qapi-schema/union-invalid-discriminator.out
    A tests/qapi-schema/union-invalid-if-discriminator.err
    A tests/qapi-schema/union-invalid-if-discriminator.json
    A tests/qapi-schema/union-invalid-if-discriminator.out
    A tests/qapi-schema/union-no-base.err
    A tests/qapi-schema/union-no-base.json
    A tests/qapi-schema/union-no-base.out
    R tests/qapi-schema/union-optional-branch.err
    R tests/qapi-schema/union-optional-branch.json
    R tests/qapi-schema/union-optional-branch.out
    A tests/qapi-schema/union-optional-discriminator.err
    A tests/qapi-schema/union-optional-discriminator.json
    A tests/qapi-schema/union-optional-discriminator.out
    A tests/qapi-schema/union-string-discriminator.err
    A tests/qapi-schema/union-string-discriminator.json
    A tests/qapi-schema/union-string-discriminator.out
    M tests/qapi-schema/union-unknown.err
    M tests/qapi-schema/union-unknown.json
    M tests/unit/test-clone-visitor.c
    M tests/unit/test-qmp-cmds.c
    M tests/unit/test-qobject-input-visitor.c
    M tests/unit/test-qobject-output-visitor.c
    M tests/unit/test-yank.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-25-v2' 
into staging

QAPI patches patches for 2021-09-25

# gpg: Signature made Mon 27 Sep 2021 13:44:23 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2021-09-25-v2: (25 commits)
  tests/qapi-schema: Make test-qapi.py -u work when files are absent
  tests/qapi-schema: Use Python OSError instead of outmoded IOError
  test-clone-visitor: Correct an accidental rename
  tests/qapi-schema: Rename flat-union-* test cases to union-*
  qapi: Drop simple unions
  tests/qapi-schema: Purge simple unions from tests
  tests/qapi-schema: Drop simple union __org.qemu_x-Union1
  test-clone-visitor: Wean off __org.qemu_x-Union1
  tests/qapi-schema: Rewrite simple union TestIfUnion to be flat
  tests/qapi-schema: Simple union UserDefListUnion is now unused, drop
  tests/qapi-schema: Wean off UserDefListUnion
  test-clone-visitor: Wean off UserDefListUnion
  test-qobject-output-visitor: Wean off UserDefListUnion
  test-qobject-input-visitor: Wean off UserDefListUnion
  tests/qapi-schema: Prepare for simple union UserDefListUnion removal
  qapi: Convert simple union TransactionAction to flat one
  qapi: Convert simple union ImageInfoSpecific to flat one
  qapi: Convert simple union SocketAddressLegacy to flat one
  qapi: Convert simple union ChardevBackend to flat one
  qapi: Convert simple union MemoryDeviceInfo to flat one
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/9b03a1178204...de8ed1055c2c



reply via email to

[Prev in Thread] Current Thread [Next in Thread]