From: Stefan Hajnoczi <stefanha@gmail.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Lukáš Doktor" <ldoktor@redhat.com>,
"Amador Pahim" <apahim@redhat.com>,
qemu-devel@nongnu.org, "Cleber Rosa" <cleber@redhat.com>
Subject: Re: [Qemu-devel] Improving QMP test coverage
Date: Fri, 21 Jul 2017 16:33:31 +0100 [thread overview]
Message-ID: <20170721153331.GL18014@stefanha-x1.localdomain> (raw)
In-Reply-To: <8760epr9vw.fsf@dusky.pond.sub.org>
[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]
On Tue, Jul 18, 2017 at 06:24:19PM +0200, Markus Armbruster wrote:
> Stefan Hajnoczi <stefanha@gmail.com> writes:
>
> > On Thu, Jul 13, 2017 at 05:28:52PM +0200, Markus Armbruster wrote:
> >> What can we do to improve QMP testing? Sadly, I don't have the master
> >> plan ready. I can tell people their new code needs to come with tests,
> >> but that won't help much unless subsystem maintainers pick up the habit,
> >> too. There are a few obvious tests to write for old code, such as a
> >> generic test of query-like commands without arguments and without side
> >> effects, similar to what test-hmp.c does for HMP command info (I hope to
> >> get around to that one). But for much of the old code, we don't even
> >> know where the test coverage holes are.
> >>
> >> Ideas anyone?
> >
> > It makes sense for maintainers to ask that new QMP commands come with
> > comprehensive tests.
> >
> > For me the main question is how to begin? What is the easiest and
> > preferred way to write QMP command test cases?
> >
> > Today the most common approach is a qtest test case that sends commands
> > and verifies that the expected response is returned. This approach
> > works but we could benefit from a discussion about the alternatives
> > (e.g. qemu-iotests style shell scripts with output diffing).
>
> Output testing style delegates checking ouput to diff. I rather like it
> when text output is readily available. It is when testing QMP. A
> non-trivial example using this style could be useful, as discussing
> ideas tends to be more productive when they come with patches.
Yes, I was considering how many of the Python iotests could be rewritten
comfortably in shell. It is nice when the test simply executes commands
and the output file shows the entire history of what happened. Great
for debugging.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2017-07-21 15:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 15:28 [Qemu-devel] Improving QMP test coverage Markus Armbruster
2017-07-17 10:33 ` Stefan Hajnoczi
2017-07-18 16:24 ` Markus Armbruster
2017-07-21 15:33 ` Stefan Hajnoczi [this message]
2017-07-21 16:16 ` Cleber Rosa
2017-07-24 6:56 ` Markus Armbruster
2017-07-26 1:21 ` Cleber Rosa
2017-07-27 8:14 ` Markus Armbruster
2017-07-27 9:19 ` Fam Zheng
2017-07-27 9:58 ` Fam Zheng
2017-07-27 10:09 ` Daniel P. Berrange
2017-07-27 11:16 ` Fam Zheng
2017-08-01 10:25 ` Stefan Hajnoczi
2017-07-27 10:04 ` Daniel P. Berrange
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=20170721153331.GL18014@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=apahim@redhat.com \
--cc=armbru@redhat.com \
--cc=cleber@redhat.com \
--cc=ldoktor@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).