qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/4]: Improve QMP visitor unit-tests
@ 2011-12-05 14:45 Luiz Capitulino
  2011-12-05 14:45 ` [Qemu-devel] [PATCH 1/4] configure: Don't mix glib and libcheck tests Luiz Capitulino
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Luiz Capitulino @ 2011-12-05 14:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, mdroth

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

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 1.1 0/4]: Improve QMP visitor unit-tests
@ 2011-11-21 17:09 Luiz Capitulino
  2011-11-21 17:09 ` [Qemu-devel] [PATCH 1/4] configure: Don't mix glib and libcheck tests Luiz Capitulino
  0 siblings, 1 reply; 9+ messages in thread
From: Luiz Capitulino @ 2011-11-21 17:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: mdroth

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

An important to do item I plan to work next is to measure test coverage.

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

 Makefile                  |   11 +-
 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, 710 insertions(+), 343 deletions(-)

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

end of thread, other threads:[~2011-12-05 14:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-05 14:45 [Qemu-devel] [PATCH v2 0/4]: Improve QMP visitor unit-tests Luiz Capitulino
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
  -- strict thread matches above, loose matches on Subject: below --
2011-11-21 17:09 [Qemu-devel] [PATCH 1.1 0/4]: Improve QMP visitor unit-tests Luiz Capitulino
2011-11-21 17:09 ` [Qemu-devel] [PATCH 1/4] configure: Don't mix glib and libcheck tests Luiz Capitulino
2011-11-21 18:08   ` Andreas Färber
2011-11-22 12:00     ` Luiz Capitulino
2011-11-21 19:14   ` Paolo Bonzini

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