qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Markus Armbruster" <armbru@redhat.com>,
	qemu-devel@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-ppc@nongnu.org, "Igor Mammedov" <imammedo@redhat.com>,
	"John Snow" <jsnow@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH] tests: Add a device_add/del HMP test
Date: Wed, 13 Sep 2017 07:45:11 +0200	[thread overview]
Message-ID: <808c097f-a422-3aba-2e0d-d8360425f75b@redhat.com> (raw)
In-Reply-To: <20170912173723.GA7570@localhost.localdomain>

On 12.09.2017 19:37, Eduardo Habkost wrote:
> On Mon, Sep 11, 2017 at 08:13:21AM +0200, Thomas Huth wrote:
>> On 09.09.2017 22:41, Eduardo Habkost wrote:
>>> On Wed, Sep 06, 2017 at 08:59:32AM +0200, Markus Armbruster wrote:
>>>> Thomas Huth <thuth@redhat.com> writes:
>>>>
>>>>> On 05.09.2017 18:48, Dr. David Alan Gilbert wrote:
>>>>>> * Markus Armbruster (armbru@redhat.com) wrote:
>>>>>>> Thomas Huth <thuth@redhat.com> writes:
>>>>>>>
>>>>>>>> People tend to forget to mark internal devices with "user_creatable = false
>>>>>>>> or hotpluggable = false, and these devices can crash QEMU if added via the
>>>>>>>> HMP monitor. So let's add a test to run through all devices and that tries
>>>>>>>> to add them blindly (without arguments) to see whether this could crash the
>>>>>>>> QEMU instance.
>> [...]
>>>>>>> * The device supports only cold plug with -device, not hot plug with
>>>>>>>   device_add.
>>>>>
>>>>> We've got Eduardo's scripts/device-crash-test script for that already,
>>>>> so no need to cover that here.
>>>>
>>>> Point taken.  So this test is really about hot plug / unplug.  Suggest
>>>> to clarify the commit message: s/add them blindly/hotplug and unplug
>>>> them blindly/.
>>>
>>> We could extend device-crash-test to test device_add too, as it
>>> already has extra code to deal with known crashes and testing
>>> multiple machine-types.  Also, any additional code we write to
>>> ensure we add mandatory arguments or plug only to valid buses
>>> would apply to both -device and device_add.  I also think Python
>>> test code is easier to maintain and extend, but that's just my
>>> personal preference.
>>
>> Adding device_add/del support to device-crash-test is certainly an
>> option. The problem is that nobody runs it by default, so this won't
>> help to avoid that new problems are being committed to the repository.
>>
>> I think we really should have a test for "make check", too. So would my
>> test be acceptable if I'd rewrite it to use QMP instead (I don't think I
>> could do the full list that Markus mentioned, but at least a basic test
>> via QMP as a start)?
> 
> We can run device-crash-test on "make check", we just need to
> choose what's the subset of tests we want to run (because testing
> all machine+device+target combinations would take too long).

Maybe we should just run it one time for every machine - and try to add
all available devices at once?

 Thomas

  reply	other threads:[~2017-09-13  5:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05  9:53 [Qemu-devel] [RFC PATCH] tests: Add a device_add/del HMP test Thomas Huth
2017-09-05 11:42 ` Markus Armbruster
2017-09-05 16:48   ` Dr. David Alan Gilbert
2017-09-05 18:11     ` [Qemu-devel] [Qemu-ppc] " Thomas Huth
2017-09-05 18:37       ` Dr. David Alan Gilbert
2017-09-06  4:53         ` Thomas Huth
2017-09-06  6:59       ` Markus Armbruster
2017-09-09 20:41         ` Eduardo Habkost
2017-09-11  6:13           ` Thomas Huth
2017-09-12 17:37             ` Eduardo Habkost
2017-09-13  5:45               ` Thomas Huth [this message]
2017-09-15 22:18                 ` Eduardo Habkost
2017-09-19  5:25                   ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=808c097f-a422-3aba-2e0d-d8360425f75b@redhat.com \
    --to=thuth@redhat.com \
    --cc=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=imammedo@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).