All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Thomas Huth <thuth@redhat.com>, Zhao Liu <zhao1.liu@intel.com>,
	Eduardo Habkost <eduardo@habkost.net>,
	Yanan Wang <wangyanan55@huawei.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH-for-9.2? v2 1/2] tests/functional/test_version: Use QTest accelerator
Date: Tue, 3 Dec 2024 09:18:26 +0000	[thread overview]
Message-ID: <Z07M4jpxZo9Ns0Rj@redhat.com> (raw)
In-Reply-To: <20241203091036.59898-2-philmd@linaro.org>

On Tue, Dec 03, 2024 at 10:10:35AM +0100, Philippe Mathieu-Daudé wrote:
> When testing with a HVF-only binary, we get:
> 
>    3/12 qemu:func-quick+func-aarch64 / func-aarch64-version                                      ERROR            0.29s   exit status 1
>   stderr:
>   Traceback (most recent call last):
>     File "tests/functional/test_version.py", line 22, in test_qmp_human_info_version
>       self.vm.launch()
>     File "machine/machine.py", line 461, in launch
>       raise VMLaunchFailure(
>   qemu.machine.machine.VMLaunchFailure: ConnectError: Failed to establish session: EOFError
>       Exit code: 1
>       Command: build/qemu-system-aarch64 -display none -vga none -chardev socket,id=mon,fd=5 -mon chardev=mon,mode=control -machine none -nodefaults
>       Output: qemu-system-aarch64: No accelerator selected and no default accelerator available
> 
> Explicit the QTest accelerator to be able to run the HMP command.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  tests/functional/test_version.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/functional/test_version.py b/tests/functional/test_version.py
> index 3ab3b67f7e3..d3da796991f 100755
> --- a/tests/functional/test_version.py
> +++ b/tests/functional/test_version.py
> @@ -18,6 +18,7 @@ class Version(QemuSystemTest):
>  
>      def test_qmp_human_info_version(self):
>          self.set_machine('none')
> +        self.vm.add_args('-accel', 'qtest')

IMHO this is wrong. The functional tests are there to test the
real functional behaviour under an actual accelerator not qtest.

We have tests/qtests for testing scenarios where we want to only
exercise with the qtest accelerator.

If QEMU is built with /only/ HVF available and HVF can't be
used at runtime, then we should be skipping all functional
tests, not degrading them to be hardcoded to use qtest on
all platforms.

>          self.vm.add_args('-nodefaults')
>          self.vm.launch()
>          res = self.vm.cmd('human-monitor-command',

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2024-12-03  9:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03  9:10 [PATCH-for-9.2? v2 0/2] tests/functional: Fix tests failing when TCG is not available on macOS Philippe Mathieu-Daudé
2024-12-03  9:10 ` [PATCH-for-9.2? v2 1/2] tests/functional/test_version: Use QTest accelerator Philippe Mathieu-Daudé
2024-12-03  9:18   ` Daniel P. Berrangé [this message]
2024-12-03  9:26     ` Philippe Mathieu-Daudé
2024-12-03  9:33       ` Daniel P. Berrangé
2024-12-03  9:38       ` Philippe Mathieu-Daudé
2024-12-03 10:02         ` Daniel P. Berrangé
2024-12-03 10:14         ` Thomas Huth
2024-12-03  9:10 ` [PATCH-for-9.2? v2 2/2] tests/functional/test_empty_cpu_model: " Philippe Mathieu-Daudé

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=Z07M4jpxZo9Ns0Rj@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.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.