[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH] tests/device-introspect: Test de
From: |
Thomas Huth |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH] tests/device-introspect: Test devices with all machines, not only with "none" |
Date: |
Thu, 26 Apr 2018 12:24:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 17.04.2018 14:12, Markus Armbruster wrote:
> Thomas Huth <address@hidden> writes:
>
>> Many device introspection crashes only happen if you are using a
>> certain machine, e.g.:
>>
>> $ ppc-softmmu/qemu-system-ppc -S -M ref405ep,accel=qtest -qmp stdio
>> {"QMP": {"version": {"qemu": {"micro": 50, "minor": 11, "major": 2},
>> "package": "build-all"}, "capabilities": []}}
>> { 'execute': 'qmp_capabilities' }
>> {"return": {}}
>> { 'execute': 'device-list-properties',
>> 'arguments': {'typename': 'macio-newworld'}}
>> Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222:
>> Device 'serial0' is in use
>> Aborted (core dumped)
>>
>> To be able to catch these problems, let's extend the device-introspect
>> test to check the devices on all machine types. Since this is a rather
>> slow operation, the test is only run in "SPEED=slow" mode.
>
> If the device works with one machine type, it has a decent chance to
> work with others, too. Thus, testing each device with every machine
> type is overkill. I appreciate having overkill as an option :)
>
> What I'd like to see for a quick "make check" is testing each device
> once. That should flush out most bugs.
That's already done with the "none" machine.
Anyway, do you think my patch here is useful and has a chance of getting
included? I.e. shall I re-spin this as a non-RFC patch? Or shall we
rather wait for Eduardo's python-based tests to get included into the
repository?
>> Signed-off-by: Thomas Huth <address@hidden>
>> ---
>> In case someone wants to help with creating some bug fix patches
>> during the QEMU hard freeze phase: This test can now be used to
>> trigger lots of introspection bugs that we were not aware of yet.
>> I think most of the bugs are due to wrong handling of instance_init
>> vs. realize functions.
>
> Yes, that's a common class of bugs. There's little guidance on what
> kind of work belongs where, and plenty of bad examples.
I think we urgently need a file in doc/devel/ that describes the various
states / functions of a device, where we should properly describe the
differences between instance_init and realize. ... I'll try to come up
with something when I've got some spare time (unless somebody else
volunteers to do that first).
Thomas
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH] tests/device-introspect: Test devices with all machines, not only with "none", Markus Armbruster, 2018/04/17
- Re: [Qemu-ppc] [Qemu-arm] [Qemu-devel] [RFC PATCH] tests/device-introspect: Test devices with all machines, not only with "none", Peter Maydell, 2018/04/17
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH] tests/device-introspect: Test devices with all machines, not only with "none",
Thomas Huth <=
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH] tests/device-introspect: Test devices with all machines, not only with "none", Markus Armbruster, 2018/04/26
- [Qemu-ppc] [Qemu-devel] qom-test (was: [RFC PATCH] tests/device-introspect: Test devices with all machines, not only with "none"), Thomas Huth, 2018/04/27
- Re: [Qemu-ppc] [Qemu-devel] qom-test, Markus Armbruster, 2018/04/27
- Re: [Qemu-ppc] [Qemu-arm] [Qemu-devel] qom-test (was: [RFC PATCH] tests/device-introspect: Test devices with all machines, not only with "none"), Peter Maydell, 2018/04/27
- Re: [Qemu-ppc] [Qemu-arm] [Qemu-devel] qom-test, Thomas Huth, 2018/04/27
- Re: [Qemu-ppc] [Qemu-devel] [Qemu-arm] qom-test, Markus Armbruster, 2018/04/27
- Re: [Qemu-ppc] [Qemu-devel] [Qemu-arm] qom-test, Thomas Huth, 2018/04/27