From: Max Reitz <mreitz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH v3 0/3] chardev: Add -qmp-pretty
Date: Fri, 14 Nov 2014 10:06:33 +0100 [thread overview]
Message-ID: <1415955996-14267-1-git-send-email-mreitz@redhat.com> (raw)
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.
v3:
- Patch 2: Cull useless "discard=0"
v2:
- Patch 2: Replaced the multi-line QMP_VERSION replacement written in
bash by a nice sed script [Eric]
git-backport-diff against v1:
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
001/3:[----] [--] 'chardev: Add -qmp-pretty'
002/3:[0015] [FC] 'iotests: _filter_qmp for pretty JSON output'
003/3:[----] [--] 'iotests: Use -qmp-pretty in 067'
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 | 3 +-
vl.c | 15 +-
5 files changed, 743 insertions(+), 64 deletions(-)
--
1.9.3
next reply other threads:[~2014-11-14 9:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 9:06 Max Reitz [this message]
2014-11-14 9:06 ` [Qemu-devel] [PATCH v3 1/3] chardev: Add -qmp-pretty Max Reitz
2014-11-14 9:06 ` [Qemu-devel] [PATCH v3 2/3] iotests: _filter_qmp for pretty JSON output Max Reitz
2014-11-14 9:06 ` [Qemu-devel] [PATCH v3 3/3] iotests: Use -qmp-pretty in 067 Max Reitz
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=1415955996-14267-1-git-send-email-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).