qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] d081a4: numa: Flatten simple union NumaOption


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] d081a4: numa: Flatten simple union NumaOptions
Date: Fri, 24 Feb 2017 09:30:10 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d081a49af8c68ad6c8fe9b552e306c5bad7b4e61
      
https://github.com/qemu/qemu/commit/d081a49af8c68ad6c8fe9b552e306c5bad7b4e61
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M numa.c
    M qapi-schema.json

  Log Message:
  -----------
  numa: Flatten simple union NumaOptions

Simple unions are simpler than flat unions in the schema, but more
complicated in C and on the QMP wire: there's extra indirection in C
and extra nesting on the wire, both pointless.  They're best avoided
in new code.

NumaOptions isn't new, but it's only used internally, not in QMP.
Convert it to a flat union.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: d3be4b57cefde105299e234f0659b77f37920c72
      
https://github.com/qemu/qemu/commit/d3be4b57cefde105299e234f0659b77f37920c72
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M net/net.c
    M qapi-schema.json

  Log Message:
  -----------
  net: Flatten simple union NetLegacyOptions

Simple unions are simpler than flat unions in the schema, but more
complicated in C and on the QMP wire: there's extra indirection in C
and extra nesting on the wire, both pointless.  They're best avoided
in new code.

NetLegacyOptions isn't new, but it's only used internally, not in QMP.
Convert it to a flat union.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: b25f23e7dbc6bc0dcda010222a4f178669d1aedc
      
https://github.com/qemu/qemu/commit/b25f23e7dbc6bc0dcda010222a4f178669d1aedc
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M qobject/qdict.c

  Log Message:
  -----------
  qdict: Make qdict_get_qlist() safe like qdict_get_qdict()

Commit 89cad9f changed qdict_get_qdict() to return NULL instead of
crash when the key doesn't exist or its value isn't a QDict.
Commit 2d6421a neglected to do the same for qdict_get_qlist().
Correct that, and update the function comments.

qdict_get_obj() is now unused, remove.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: ff9d38963e55598b40237735426225c35de6c7e5
      
https://github.com/qemu/qemu/commit/ff9d38963e55598b40237735426225c35de6c7e5
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M tests/check-qdict.c

  Log Message:
  -----------
  check-qdict: Simplify qdict_crumple_test_recursive()

Use qdict_get_qdict(), qdict_get_qlist() instead of qdict_get()
followed by qobject_to_qdict(), qobject_to_qlist().

While there, drop some redundant code.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: a68931ea5f87ee3cc3144348596077de87f94c93
      
https://github.com/qemu/qemu/commit/a68931ea5f87ee3cc3144348596077de87f94c93
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M tests/check-qdict.c

  Log Message:
  -----------
  check-qdict: Tighten qdict_crumple_test_recursive() some

Consistently check for unexpected QDict entries, and qdict_get_qdict()
success.  The latter doesn't tighten the test, it only makes it fail
more nicely.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 9eaaf971683c99ed197fa1b7d1a3ca9baabfb3ee
      
https://github.com/qemu/qemu/commit/9eaaf971683c99ed197fa1b7d1a3ca9baabfb3ee
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M tests/check-qjson.c

  Log Message:
  -----------
  check-qjson: Simplify around compare_litqobj_to_qobj()

Make compare_litqobj_to_qobj() cope with null, and drop non-null
assertions from callers.

compare_litqobj_to_qobj() already checks the QType matches; drop the
redundant assertions from callers.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 4d96f329cc24ace3766030bcffb05256a31d32d1
      
https://github.com/qemu/qemu/commit/4d96f329cc24ace3766030bcffb05256a31d32d1
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M tests/libqtest.c

  Log Message:
  -----------
  libqtest: Clean up qmp_response() a bit

Use qobject_to_qdict() instead of a type cast.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 4b32e11a59e34c5cf570c1fd102a78d9351e71f5
      
https://github.com/qemu/qemu/commit/4b32e11a59e34c5cf570c1fd102a78d9351e71f5
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M tests/test-qmp-event.c

  Log Message:
  -----------
  test-qmp-event: Simplify and tighten event_test_emit()

Use qdict_get_qdict() and qdict_get_try_int() to simplify.

While there, add a sanity check for seconds.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: ca6b6e1e68ac44b2e8895da10dd1c80dc03d08b7
      
https://github.com/qemu/qemu/commit/ca6b6e1e68ac44b2e8895da10dd1c80dc03d08b7
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M block.c
    M hw/pci/pcie_aer.c
    M monitor.c
    M qapi/qmp-dispatch.c
    M tests/check-qdict.c
    M tests/test-qobject-output-visitor.c

  Log Message:
  -----------
  Don't check qobject_type() before qobject_to_qdict()

qobject_to_qdict(obj) returns NULL when obj isn't a QDict.  Check
that instead of qobject_type(obj) == QTYPE_QDICT.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: cd17ba51f5b25196c52afe5dfdd27c7dc8621cf4
      
https://github.com/qemu/qemu/commit/cd17ba51f5b25196c52afe5dfdd27c7dc8621cf4
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

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

  Log Message:
  -----------
  tests: Don't check qobject_type() before qobject_to_qlist()

qobject_to_qlist(obj) returns NULL when obj isn't a QList.  Check
that instead of qobject_type(obj) == QTYPE_QLIST.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 363e13f86eb60bce1e112a35a4c107505a69c9fe
      
https://github.com/qemu/qemu/commit/363e13f86eb60bce1e112a35a4c107505a69c9fe
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

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

  Log Message:
  -----------
  tests: Don't check qobject_type() before qobject_to_qstring()

qobject_to_qstring(obj) returns NULL when obj isn't a QString.  Check
that instead of qobject_type(obj) == QTYPE_QSTRING.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 0abfc4b885566eb41c3a4e1de5e2e105bdc062d9
      
https://github.com/qemu/qemu/commit/0abfc4b885566eb41c3a4e1de5e2e105bdc062d9
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

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

  Log Message:
  -----------
  tests: Don't check qobject_type() before qobject_to_qint()

qobject_to_qint(obj) returns NULL when obj isn't a QInt.  Check
that instead of qobject_type(obj) == QTYPE_QINT.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 8978b34af3250354e0b67340a7e920f909beda13
      
https://github.com/qemu/qemu/commit/8978b34af3250354e0b67340a7e920f909beda13
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

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

  Log Message:
  -----------
  tests: Don't check qobject_type() before qobject_to_qfloat()

qobject_to_qfloat(obj) returns NULL when obj isn't a QFloat.  Check
that instead of qobject_type(obj) == QTYPE_QFLOAT.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: dfad9ec4e9f15344f300996ad8c6f3eaf699d195
      
https://github.com/qemu/qemu/commit/dfad9ec4e9f15344f300996ad8c6f3eaf699d195
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

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

  Log Message:
  -----------
  tests: Don't check qobject_type() before qobject_to_qbool()

qobject_to_qbool(obj) returns NULL when obj isn't a QBool.  Check
that instead of qobject_type(obj) == QTYPE_QBOOL.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: bbf1028a0ade883cebae5faf984f0e78cb794b17
      
https://github.com/qemu/qemu/commit/bbf1028a0ade883cebae5faf984f0e78cb794b17
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: Clean up handle_hmp_command() a bit

Leave checking qobject_type(req) to qmp_check_input_obj().  Rework
handling of json_parser_parse_err() failing without setting an error.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 7c81e4e9db5f63635fbf11d66bf08e73d325ae97
      
https://github.com/qemu/qemu/commit/7c81e4e9db5f63635fbf11d66bf08e73d325ae97
  Author: Markus Armbruster <address@hidden>
  Date:   2017-02-22 (Wed, 22 Feb 2017)

  Changed paths:
    M block/nbd.c
    M block/nfs.c
    M block/qapi.c

  Log Message:
  -----------
  block: Don't bother asserting type of output visitor's output

After a visit of a complex QAPI type FOO

    ov = qobject_output_visitor_new(&foo);
    visit_type_FOO(ov, NULL, expr, &error_abort);
    visit_complete(ov, &foo);

we can safely assume qobject_type(foo) is QTYPE_QDICT.  We do in many
places, but occasionally assert qobject_type(obj) == QTYPE_QDICT.
Don't.  The appropriate place to check such fundamental properties of
QAPI visitors is the test suite.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: fe8ee082db5038a05dbd8872e946049e9a9c550e
      
https://github.com/qemu/qemu/commit/fe8ee082db5038a05dbd8872e946049e9a9c550e
  Author: Peter Maydell <address@hidden>
  Date:   2017-02-24 (Fri, 24 Feb 2017)

  Changed paths:
    M block.c
    M block/nbd.c
    M block/nfs.c
    M block/qapi.c
    M hw/pci/pcie_aer.c
    M monitor.c
    M net/net.c
    M numa.c
    M qapi-schema.json
    M qapi/qmp-dispatch.c
    M qobject/qdict.c
    M tests/check-qdict.c
    M tests/check-qjson.c
    M tests/libqtest.c
    M tests/test-qmp-event.c
    M tests/test-qobject-output-visitor.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-02-22' into 
staging

QAPI patches for 2017-02-22

# gpg: Signature made Wed 22 Feb 2017 19:12:27 GMT
# gpg:                using RSA key 0x3870B400EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2017-02-22:
  block: Don't bother asserting type of output visitor's output
  monitor: Clean up handle_hmp_command() a bit
  tests: Don't check qobject_type() before qobject_to_qbool()
  tests: Don't check qobject_type() before qobject_to_qfloat()
  tests: Don't check qobject_type() before qobject_to_qint()
  tests: Don't check qobject_type() before qobject_to_qstring()
  tests: Don't check qobject_type() before qobject_to_qlist()
  Don't check qobject_type() before qobject_to_qdict()
  test-qmp-event: Simplify and tighten event_test_emit()
  libqtest: Clean up qmp_response() a bit
  check-qjson: Simplify around compare_litqobj_to_qobj()
  check-qdict: Tighten qdict_crumple_test_recursive() some
  check-qdict: Simplify qdict_crumple_test_recursive()
  qdict: Make qdict_get_qlist() safe like qdict_get_qdict()
  net: Flatten simple union NetLegacyOptions
  numa: Flatten simple union NumaOptions

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/63f495beb400...fe8ee082db50

reply via email to

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