qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] chardev: Add -qmp-pretty
@ 2014-11-11 13:34 Max Reitz
  2014-11-11 13:34 ` [Qemu-devel] [PATCH 1/3] " Max Reitz
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Max Reitz @ 2014-11-11 13:34 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Markus Armbruster, Max Reitz, Stefan Hajnoczi,
	Paolo Bonzini

This series does not add new functionality. Adding a QMP monitor with
prettily formatted JSON output can be done as follows:

$ qemu -chardev stdio,id=mon0 -mon chardev=mon0,mode=control,pretty=on

However, this is rather cumbersome, so this series (its first patch)
adds a shortcut in the form of the new command line option -qmp-pretty.

Since the argument given to a monitor command line option (such as -qmp)
is parsed depending on its prefix and probably also depending on the
current phase of the moon, this is cleaner than trying to add a "switch"
to -qmp itself (in the form of "-qmp stdio,pretty=on").


Patch 3 makes uses of the new option in qemu-iotest 067 to greatly
increase maintainability of its reference output. Patch 2 extends the
QMP filter for qemu-iotests so it is able to filter out the QMP version
object in pretty mode.


Max Reitz (3):
  chardev: Add -qmp-pretty
  iotests: _filter_qmp for pretty JSON output
  iotests: Use -qmp-pretty in 067

 qemu-options.hx                  |   8 +
 tests/qemu-iotests/067           |   2 +-
 tests/qemu-iotests/067.out       | 779 ++++++++++++++++++++++++++++++++++++---
 tests/qemu-iotests/common.filter |  16 +-
 vl.c                             |  15 +-
 5 files changed, 756 insertions(+), 64 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-11-12 13:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-11 13:34 [Qemu-devel] [PATCH 0/3] chardev: Add -qmp-pretty Max Reitz
2014-11-11 13:34 ` [Qemu-devel] [PATCH 1/3] " Max Reitz
2014-11-12  4:41   ` Eric Blake
2014-11-12  8:32     ` Max Reitz
2014-11-11 13:34 ` [Qemu-devel] [PATCH 2/3] iotests: _filter_qmp for pretty JSON output Max Reitz
2014-11-12  4:47   ` Eric Blake
2014-11-12  8:33     ` Max Reitz
2014-11-12 13:19       ` Eric Blake
2014-11-11 13:34 ` [Qemu-devel] [PATCH 3/3] iotests: Use -qmp-pretty in 067 Max Reitz
2014-11-12  4:51   ` Eric Blake
2014-11-12  8:34     ` Max Reitz

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).