From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Ganesh Harshan <ganeshredcobra@gmail.com>
Cc: th.huth+qemu@posteo.eu, philmd@mailo.com, qemu-devel@nongnu.org
Subject: Re: [PATCH] tests/functional: use QMP to query available machines
Date: Fri, 26 Jun 2026 11:12:44 +0100 [thread overview]
Message-ID: <aj5QnMlxfeO5RBKY@redhat.com> (raw)
In-Reply-To: <20260625165310.54113-1-ganeshredcobra@gmail.com>
On Thu, Jun 25, 2026 at 12:53:10PM -0400, Ganesh Harshan wrote:
> Replace parsing of "qemu -M help" in set_machine() with
> QMP "query-machines".
>
> The previous approach relied on parsing human-readable CLI
> output and substring matching, which is fragile and prone to
> incorrect matches. It is also sensitive to output format changes.
>
> Use QMP instead to retrieve structured machine information,
> ensuring accurate matching and better maintainability.
>
> Cache the result at the class level to avoid repeated QEMU
> startup overhead.
>
> Signed-off-by: Ganesh Harshan <ganeshredcobra@gmail.com>
> ---
> tests/functional/qemu_test/testcase.py | 32 +++++++++++++++++++++-----
> 1 file changed, 26 insertions(+), 6 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
prev parent reply other threads:[~2026-06-26 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 16:53 [PATCH] tests/functional: use QMP to query available machines Ganesh Harshan
2026-06-26 10:12 ` Daniel P. Berrangé [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=aj5QnMlxfeO5RBKY@redhat.com \
--to=berrange@redhat.com \
--cc=ganeshredcobra@gmail.com \
--cc=philmd@mailo.com \
--cc=qemu-devel@nongnu.org \
--cc=th.huth+qemu@posteo.eu \
/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.