All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <th.huth+qemu@posteo.eu>
To: Ganesh Harshan <ganeshredcobra@gmail.com>
Cc: philmd@mailo.com, berrange@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH] tests/functional: use QMP to query available machines
Date: Fri, 03 Jul 2026 19:21:13 +0000	[thread overview]
Message-ID: <20260703212111.69d835d8@tpx1> (raw)
In-Reply-To: <20260625165310.54113-1-ganeshredcobra@gmail.com>

Am Thu, 25 Jun 2026 12:53:10 -0400
schrieb Ganesh Harshan <ganeshredcobra@gmail.com>:

> 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(-)

 Hi Ganesh,

seems like a bunch of tests are failing when I include this patch in my
source tree:

283/327 qemu:func-thorough+func-riscv64-thorough+thorough / func-riscv64-tuxrun               TIMEOUT         120.01s   killed by signal 15 SIGTERM
286/327 qemu:func-thorough+func-mipsel-thorough+thorough / func-mipsel-tuxrun                 TIMEOUT          90.01s   killed by signal 15 SIGTERM
289/327 qemu:func-thorough+func-mips-thorough+thorough / func-mips-tuxrun                     TIMEOUT          90.01s   killed by signal 15 SIGTERM
294/327 qemu:func-thorough+func-ppc64-thorough+thorough / func-ppc64-e500                     TIMEOUT          90.01s   killed by signal 15 SIGTERM
326/327 qemu:func-thorough+func-ppc-thorough+thorough / func-ppc-tuxrun                       TIMEOUT          90.01s   killed by signal 15 SIGTERM
327/327 qemu:func-thorough+func-xtensa-thorough+thorough / func-xtensa-lx60                   TIMEOUT          90.01s   killed by signal 15 SIGTERM

Are these working for you? Could you please have a look?

> diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
> index eaec1bea13..5920d6a784 100644
> --- a/tests/functional/qemu_test/testcase.py
> +++ b/tests/functional/qemu_test/testcase.py
> @@ -314,14 +314,34 @@ def setUp(self):
...
> +        if machinename not in self._machines:
>              self.skipTest('no support for machine ' + machinename)
> +
>          self.machine = machinename
> +        self.vm.set_machine(machinename)

The last line was not there before, why is it required now?

 Thomas


>      def require_accelerator(self, accelerator):
>          """


  parent reply	other threads:[~2026-07-03 19:22 UTC|newest]

Thread overview: 4+ 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é
2026-07-03 19:21 ` Thomas Huth [this message]
2026-07-07  6:13   ` 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=20260703212111.69d835d8@tpx1 \
    --to=th.huth+qemu@posteo.eu \
    --cc=berrange@redhat.com \
    --cc=ganeshredcobra@gmail.com \
    --cc=philmd@mailo.com \
    --cc=qemu-devel@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 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.