All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: -device T,help crashes
Date: Tue, 17 Mar 2026 11:30:29 +0100	[thread overview]
Message-ID: <87ms06iw8q.fsf@pond.sub.org> (raw)
In-Reply-To: <20bd24c2-01a3-43a8-b8f2-9004b16ae114@redhat.com> (Thomas Huth's message of "Tue, 17 Mar 2026 10:37:50 +0100")

Thomas Huth <thuth@redhat.com> writes:

> On 17/03/2026 10.27, Markus Armbruster wrote:
>> Thomas Huth <thuth@redhat.com> writes:
>> 
>>> On 17/03/2026 08.35, Markus Armbruster wrote:
>>>> Thomas Huth <thuth@redhat.com> writes:
>>>>
>>>>> On 12/03/2026 09.15, Markus Armbruster wrote:
>>>>>> Markus Armbruster <armbru@redhat.com> writes:
>>>>> ...
>>>>>>> These crashes escape tests/qtest/device-introspect-test, because it
>>>>>>> covers only HMP "device_add T,help", not CLI "-device T,help".
>>>>>>
>>>>>> Anyone wants to cook up a patch to cover -device?
> ...
>>>> Another idea to conserve cycles: use a unit test instead.
>>>
>>> Unit tests don't have a way yet to determine which qemu-system-xyz binaries
>>> are available, do they? ... so that would need some more logic in the
>>> meson.build file there - not sure whether that's worth the effort, I think
>>> the device-introspect qtest is likely a better place?
>> 
>> A unit test isn't supposed to run qemu-system-xyz.  Instead, it mocks up
>> the environment and just runs "the unit".  In this case,
>> qdev_device_help().
>> 
>> This is less protection than a qtest, but it can also be a lot faster.
>
> Ok, fair, but how do you link the code for *all* the devices into that unit 
> test? ... I guess that would need a lot of function stubbing?

Likely too much, i.e. you're right.

>>> Or maybe add it to scripts/device-crash-test ?
>> 
>> That's another option.
>
> Maybe the best option, since it does already similar things. The only 
> disadvantage is that we don't run it for all targets by default in the CI.

Feels quite acceptable to me.

The existing qtest should catch most offenders, and all offenders
capable of murdering guests.  Letting a -device T,help bug slip through
our testing isn't the end of the world.



      reply	other threads:[~2026-03-17 10:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 14:09 -device T,help crashes Markus Armbruster
2026-03-11 14:55 ` Peter Maydell
2026-03-11 15:14   ` Thomas Huth
2026-03-12  8:05     ` Markus Armbruster
2026-03-11 15:16 ` BALATON Zoltan
2026-03-12  8:15 ` Markus Armbruster
2026-03-17  6:24   ` Thomas Huth
2026-03-17  7:35     ` Markus Armbruster
2026-03-17  8:12       ` Thomas Huth
2026-03-17  9:27         ` Markus Armbruster
2026-03-17  9:37           ` Thomas Huth
2026-03-17 10:30             ` Markus Armbruster [this message]

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=87ms06iw8q.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.