qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, aliguori@us.ibm.com
Subject: [Qemu-devel] [PATCH v4 0/7] add fixed-width visitors and serialization tests
Date: Wed, 28 Mar 2012 18:02:04 -0500	[thread overview]
Message-ID: <1332975731-7693-1-git-send-email-mdroth@linux.vnet.ibm.com> (raw)

These patches apply on top of qemu.git master, and can also be obtained from:
git://github.com/mdroth/qemu.git visitor-fixed-width-v4

CHANGES SINCE V3:
 - Rebased on master and re-tested

CHANGES SINCE V2:
 - Fix qemu-test errors due to now-strict bounds-checking we doing assignment
   between signed/unsigned types.
 - uint* property getters/setters no longer use int* getters/setters.
 - valid devfn range is now explicitly enforced.

CHANGES SINCE V1:
 - unit tests: covert QmpOutputVisitor qobject to json before passing it to
   QmpInputVisitor*. I.e., actually do the serialization :)
 - QmpInputVisitor, add handling for when a serialized QFloat gets read back
   as a QInt
 - unit tests: add coverage for String visitor
 - StringOutputVisitor: use %f for float representation

These patches add fixed-width visitor interfaces and switches all qdev users
over to using them.

We also add a test suite which covers these interfaces, and also does some
sanity checking on Visitors (Qmp/String currently, with a pluggable interface
for future implementations) to ensure Visitor input/output handling remain
self-consistent, which is not covered by the current visitor tests which mostly
test input/output seperately. Maintaining this invariant is necessary to ensure
that visitors can be used for serialization/deserialization in the future.

 hw/mc146818rtc.c             |    7 -
 hw/pci.c                     |    2 +-
 hw/pci.h                     |    2 +-
 hw/qdev-addr.c               |    4 +-
 hw/qdev-properties.c         |  151 +++++----
 hw/qdev.h                    |    2 +-
 qapi/qapi-visit-core.c       |  139 ++++++++
 qapi/qapi-visit-core.h       |   16 +
 qapi/qmp-input-visitor.c     |    9 +-
 qapi/string-output-visitor.c |    2 +-
 test-string-output-visitor.c |    2 +-
 test-visitor-serialization.c |  784 ++++++++++++++++++++++++++++++++++++++++++
 tests/Makefile               |    6 +-
 13 files changed, 1047 insertions(+), 79 deletions(-)

             reply	other threads:[~2012-03-28 23:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-28 23:02 Michael Roth [this message]
2012-03-28 23:02 ` [Qemu-devel] [PATCH 1/7] qapi: add Visitor interfaces for uint*_t and int*_t Michael Roth
2012-03-28 23:02 ` [Qemu-devel] [PATCH 2/7] qapi: unit tests for visitor-based serialization Michael Roth
2012-03-28 23:02 ` [Qemu-devel] [PATCH 3/7] qapi: QMP input visitor, handle floats parsed as ints Michael Roth
2012-03-28 23:02 ` [Qemu-devel] [PATCH 4/7] qapi: add String visitor coverage to serialization unit tests Michael Roth
2012-03-28 23:02 ` [Qemu-devel] [PATCH 5/7] qapi: String visitor, use %f represenation for floats Michael Roth
2012-03-28 23:02 ` [Qemu-devel] [PATCH 6/7] qdev: use int32_t container for devfn property Michael Roth
2012-03-28 23:02 ` [Qemu-devel] [PATCH 7/7] qdev: switch property accessors to fixed-width visitor interfaces Michael Roth

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=1332975731-7693-1-git-send-email-mdroth@linux.vnet.ibm.com \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).