qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com
Subject: [Qemu-devel] [PATCH v2 0/4]: Improve QMP visitor unit-tests
Date: Mon,  5 Dec 2011 12:45:45 -0200	[thread overview]
Message-ID: <1323096349-2246-1-git-send-email-lcapitulino@redhat.com> (raw)

This series introduces two new test programs: test-qmp-output-visitor and
test-qmp-input-visitor.

As their names suggest, they contain unit-tests to check QMP's Visitor
implementation. They supersede the test-visitor program (which is dropped
by this series).

Besides adding new unit-tests, I've _tried_ to follow these principles:

- The tests don't print test result data to be manually checked by humans.
  Instead, all results are checked with g_assert()s and printed results
  are only OK or FAILED

- Each test-case checks a single functionality

- A test-case is only allowed to use a QAPI functionality after it has
  been tested

- setup and teardown functions are used as much as possible to avoid
  duplication

PS: The first patch is a fix unrelated to the QAPI.

changelog
---------

v2

o Rebase against Makefile changes in master
o Typo fix in patch 1/4

 Makefile                  |    9 +-
 configure                 |    5 +-
 qapi-schema-test.json     |    6 +
 test-qmp-input-visitor.c  |  270 +++++++++++++++++++++++++++++
 test-qmp-output-visitor.c |  423 +++++++++++++++++++++++++++++++++++++++++++++
 test-visitor.c            |  338 ------------------------------------
 6 files changed, 708 insertions(+), 343 deletions(-)

             reply	other threads:[~2011-12-05 14:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05 14:45 Luiz Capitulino [this message]
2011-12-05 14:45 ` [Qemu-devel] [PATCH 1/4] configure: Don't mix glib and libcheck tests Luiz Capitulino
2011-12-05 14:45 ` [Qemu-devel] [PATCH 2/4] Introduce test-qmp-output-visitor Luiz Capitulino
2011-12-05 14:45 ` [Qemu-devel] [PATCH 3/4] Introduce test-qmp-input-visitor Luiz Capitulino
2011-12-05 14:45 ` [Qemu-devel] [PATCH 4/4] Drop test-visitor Luiz Capitulino

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=1323096349-2246-1-git-send-email-lcapitulino@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=mdroth@linux.vnet.ibm.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).