qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.4 v5 0/7] Target-specific unit test suppor


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH for-2.4 v5 0/7] Target-specific unit test support, add unit tests for target-i386/cpu.c code
Date: Wed, 08 Apr 2015 15:06:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Am 23.03.2015 um 20:37 schrieb Eduardo Habkost:
> Changes v4 -> v5:
>  * Rewrite fake kvm_arch_get_supported_cpuid() code
>  * Add new test to ensure KVM defaults won't override explicit command-line
>    options
> 
> Changes v3 -> v4:
>  * Move target_words_bigendian() prototype back inside tests/x86-stub.c.
> 
> Changes v2 -> v3:
>  * Extra KVM "host" CPU model test cases
>  * Move target_words_bigendian() prototype to exec-all.h
> 
> Changes v1 -> v2:
>  * Make dependency list of test binary much simpler, now that cpus.o
>    was removed.

I don't recall seeing the previous four versions of this... I think
adding unit tests for whole devices is the wrong approach. We had that
discussion for tmp105. Instead, using the QTest framework - be it
extending my pc-cpu-test or adding a new one - allows to reuse the
device infrastructure in-place in the actual executable without the need
for stubs and without risking to break the test suite by forgetting to
run make check after device changes or forcing work duplication onto others.

Specifically, you added properties to allow inspection of CPUID feature
bits that - as I understood - today no one (including libvirt) is using.

Regards,
Andreas

> Eduardo Habkost (7):
>   tests: Support target-specific unit tests
>   tests: Make test-x86-cpuid target-specific
>   tests: Add unit test for X86CPU code
>   target-i386: Isolate enabled-by-default features to a separate array
>   tests: test-x86-cpu: Add TCG feature bit initialization test
>   tests: test-x86-cpu: Add KVM feature bit initialization test
>   tests: test-x86-cpu: Ensure that -cpu override KVM-specific defaults
> 
>  target-i386/cpu.c    |  12 ++-
>  tests/.gitignore     |   1 +
>  tests/Makefile       |  49 +++++++++---
>  tests/test-x86-cpu.c | 208 
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/vl-stub.c      |  15 ++++
>  tests/x86-stub.c     | 165 ++++++++++++++++++++++++++++++++++++++++
>  6 files changed, 437 insertions(+), 13 deletions(-)
>  create mode 100644 tests/test-x86-cpu.c
>  create mode 100644 tests/vl-stub.c
>  create mode 100644 tests/x86-stub.c

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]