[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests |
Date: |
Fri, 2 May 2014 10:40:33 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
> +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.
- Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests,
Stefan Hajnoczi <=