From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmjzE-0004sv-E8 for qemu-devel@nongnu.org; Tue, 20 May 2014 09:21:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wmjz9-0002IM-PJ for qemu-devel@nongnu.org; Tue, 20 May 2014 09:21:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wmjz9-0002Gw-H3 for qemu-devel@nongnu.org; Tue, 20 May 2014 09:21:39 -0400 Date: Tue, 20 May 2014 15:21:32 +0200 From: Stefan Hajnoczi Message-ID: <20140520132132.GC22753@stefanha-thinkpad.redhat.com> References: <1400536435-13683-1-git-send-email-l@dorileo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1400536435-13683-1-git-send-email-l@dorileo.org> Subject: Re: [Qemu-devel] [PATCH v4] QemuOpt: add unit tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leandro Dorileo Cc: Kevin Wolf , Wenchao Xia , qemu-devel@nongnu.org, Markus Armbruster , Chunyan Liu , Anthony Liguori , Luiz Capitulino , Andreas =?iso-8859-1?Q?F=E4rber?= On Mon, May 19, 2014 at 06:53:55PM -0300, Leandro Dorileo wrote: > Cover basic aspects and API usage for QemuOpt. The current implementation > covers the API's planned to be changed by Chunyan Liu in his QEMUOptionParameter > replacement/cleanup job. > > Other APIs should be covered in future improvements. > > Signed-off-by: Leandro Dorileo > --- > > Notes: > V4: > + call register_opts() only once (pointed by Stefan); > > V3: > + fix a typo (s/dinamically/dynamically/); > > V2: > + fixed comments; > + make use of g_assert_cmpstr(); > + use error_abort instead of a local_err for qemu_opts_absorb_qdict(); > + asserts on QemuOptsList (empty and list name); > + added test_qemu_opt_unset(); > + asserts on qemu_opt_*_set() return; > + added test_qemu_opts_reset(); > + added test_qemu_opts_set(); > > tests/Makefile | 3 + > tests/test-qemu-opts.c | 438 +++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 441 insertions(+) > create mode 100644 tests/test-qemu-opts.c Great, thanks for writing this test case. It's good to have this here before applying Chunyan's patches. Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan