From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmVBD-0004sq-S1 for qemu-devel@nongnu.org; Mon, 19 May 2014 17:33:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmVB5-0006pd-A0 for qemu-devel@nongnu.org; Mon, 19 May 2014 17:33:07 -0400 Received: from mail-yh0-f51.google.com ([209.85.213.51]:49872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmVB5-0006p5-6V for qemu-devel@nongnu.org; Mon, 19 May 2014 17:32:59 -0400 Received: by mail-yh0-f51.google.com with SMTP id f73so7335935yha.24 for ; Mon, 19 May 2014 14:32:58 -0700 (PDT) Date: Mon, 19 May 2014 18:33:16 -0300 From: Leandro Dorileo Message-ID: <20140519213316.GC2051@dorilex-lnv.MultilaserAP> References: <1395754039-1849-1-git-send-email-l@dorileo.org> <20140502084033.GC8005@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140502084033.GC8005@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Markus Armbruster , Chunyan Liu , Anthony Liguori , Andreas =?iso-8859-1?Q?F=E4rber?= , Wenchao Xia On Fri, May 02, 2014 at 10:40:33AM +0200, Stefan Hajnoczi wrote: > On Tue, Mar 25, 2014 at 10:27:19AM -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 > > Reviewed-by: Eric Blake > > --- > > tests/Makefile | 3 + > > tests/test-qemu-opts.c | 455 +++++++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 458 insertions(+) > > create mode 100644 tests/test-qemu-opts.c > > Looks useful. I skipped this patch original because you and Chunyan > were working on different versions of the QemuOpts conversion series and > I wanted to wait until the dust settled on that. Ok, no problem. > > > +static void register_opts(void) > > +{ > > + qemu_add_opts(&opts_list_01); > > + qemu_add_opts(&opts_list_02); > > + qemu_add_opts(&opts_list_03); > > +} > > + > > +static void test_find_unknown_opts(void) > > +{ > > + QemuOptsList *list; > > + > > + register_opts(); > > Should this function be called once in main() instead? I think you keep > adding the same opts lists again and again as the test cases execute. Yep, definitively. I'm sending v4 soon. Thanks... -- Leandro Dorileo