qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v5 0/7] add fixed-width visitors and serialization t


From: Michael Roth
Subject: [Qemu-devel] [PATCH v5 0/7] add fixed-width visitors and serialization tests/fixes
Date: Fri, 27 Apr 2012 15:21:16 -0500

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

Some of these were being carried as part of Paolo's realize series due to some
conflicts, but that looks to be targetted for 1.2 now, and there's a QMP
visitor bug and a small issue with String visitor that were caught by the test
infrastructure introduced here and fixed as part of this series, so I'd like to
get this in for 1.1

CHANGES SINCE v4:
 - Rebased on master (a8b69b8e2431edfcb6c4cfb069787e9071d6235b) and re-tested
 - Re-ordered patches so visitor bugs are applied before the test cases that
   that trigger them.

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               |  161 +++++---
 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 +-
 tests/Makefile                     |    4 +-
 tests/test-string-output-visitor.c |    2 +-
 tests/test-visitor-serialization.c |  784 ++++++++++++++++++++++++++++++++++++
 13 files changed, 1049 insertions(+), 85 deletions(-)




reply via email to

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