[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests
From: |
Leandro Dorileo |
Subject: |
Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests |
Date: |
Mon, 19 May 2014 18:33:16 -0300 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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 <address@hidden>
> > Reviewed-by: Eric Blake <address@hidden>
> > ---
> > 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