From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXZnp-0005SK-Kh for qemu-devel@nongnu.org; Mon, 05 Dec 2011 09:46:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXZno-0005ws-LL for qemu-devel@nongnu.org; Mon, 05 Dec 2011 09:45:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXZno-0005wf-A9 for qemu-devel@nongnu.org; Mon, 05 Dec 2011 09:45:56 -0500 From: Luiz Capitulino Date: Mon, 5 Dec 2011 12:45:45 -0200 Message-Id: <1323096349-2246-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/4]: Improve QMP visitor unit-tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com 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(-)