On Tue, Jan 23, 2018 at 09:08:01AM +0100, Igor Mammedov wrote:
> Check that "$QEMU -M none -cpu FOO" starts QEMU without error
> 
> Signed-off-by: Igor Mammedov <imamm...@redhat.com>
> ---
> v2:
>   - rename file to machine-none-test.c (Thomas Huth <th...@redhat.com>)
>   - use qtest_startf()/instead of qtest_start() (Thomas Huth 
> <th...@redhat.com>)
[...]
> +static struct arch2cpu cpus_map[] = {
> +    /* tested targets list */
> +};
[...]
> +static void test_machine_cpu_cli(void)
> +{
> +    QDict *response;
> +    const char *arch = qtest_get_arch();
> +    const char *cpu_model = get_cpu_model_by_arch(arch);
> +
> +    if (!cpu_model) {
> +        fprintf(stderr, "WARNING: cpu name for target '%s' isn't defined,"
> +                " add it to cpus_map\n", arch);
> +        return; /* TODO: die here to force all targets have a test */
> +    }

I'm unsure if it's OK to purposefully have intermediate commits
that will generate warnings on "make check".  It could confuse
people doing bisects.

I would prefer to add this warning only after all targets are
converted.  Or maybe only add this test code after all targets
are converted.

-- 
Eduardo

Reply via email to