qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Liam Merwick <liam.merwick@oracle.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Denis Plotnikov" <dplotnikov@virtuozzo.com>,
	qemu-devel@nongnu.org
Cc: Cornelia Huck <cohuck@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Wainer dos Santos Moschetta <wainersm@redhat.com>,
	Cleber Rosa <crosa@redhat.com>
Subject: Re: [PATCH v2 09/29] tests/acceptance: Use 'machine' tag to check if available in QEMU binary
Date: Thu, 6 Feb 2020 18:17:43 +0000	[thread overview]
Message-ID: <e1100e02-33aa-02a4-c59b-ad04f214972a@oracle.com> (raw)
In-Reply-To: <20200129212345.20547-10-philmd@redhat.com>

On 29/01/2020 21:23, Philippe Mathieu-Daudé wrote:
> We already use the 'machine' tag in Avocado tests.
> If the requested machine is not available in the QEMU binary,
> the tests will be cancelled (skipped):
> 
>    $ python -m avocado --show=app run tests/acceptance/x86_cpu_model_versions.py
>     ...
>     (04/11) CascadelakeArchCapabilities.test_4_1: CANCEL: Test expects machine 'pc-i440fx-4.1' which is missing from QEMU binary (0.10 s)
>     (05/11) CascadelakeArchCapabilities.test_4_0: CANCEL: Test expects machine 'pc-i440fx-4.0' which is missing from QEMU binary (0.11 s)
>     ...
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   tests/acceptance/avocado_qemu/__init__.py | 13 ++++++++++---
>   1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
> index e7d5affe24..53ec8512d1 100644
> --- a/tests/acceptance/avocado_qemu/__init__.py
> +++ b/tests/acceptance/avocado_qemu/__init__.py
> @@ -20,6 +20,7 @@ SRC_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..', '..', '..')
>   sys.path.append(os.path.join(SRC_ROOT_DIR, 'python'))
>   
>   from qemu.binutils import binary_get_arch
> +from qemu.binutils import binary_get_machines
>   from qemu.binutils import binary_get_version
>   from qemu.machine import QEMUMachine
>   
> @@ -118,9 +119,6 @@ class Test(avocado.Test):
>           self.arch = self.params.get('arch',
>                                       default=self._get_unique_tag_val('arch'))
>   
> -        self.machine = self.params.get('machine',
> -                                       default=self._get_unique_tag_val('machine'))
> -
>           # Verify qemu_bin
>           default_qemu_bin = pick_default_qemu_bin(arch=self.arch)
>           self.qemu_bin = self.params.get('qemu_bin',
> @@ -151,6 +149,15 @@ class Test(avocado.Test):
>               if bin_arch != self.arch:
>                   self.cancel(fmt.format(self.arch, bin_arch))
>   
> +        # Verify machine
> +        self.machine = self.params.get('machine',
> +                                       default=self._get_unique_tag_val('machine'))
> +        logger.debug('machine: {}'.format(self.machine))
> +        if self.machine:
> +            fmt = "Test expects machine '{}' which is missing from QEMU binary"
> +            if self.machine not in binary_get_machines(self.qemu_bin):
> +                self.cancel(fmt.format(self.machine))
> +

Starting with this patch:

$ avocado run --filter-by-tags arch:x86_64 tests/acceptance
...
/boot_linux_console.py:BootLinuxConsole.test_x86_64_pc: CANCEL: Test 
expects machine 'pc' which is missing from QEMU binary (0.05 s)
...

$ x86_64-softmmu/qemu-system-x86_64 -machine help
Supported machines are:
microvm              microvm (i386)
pc                   Standard PC (i440FX + PIIX, 1996) (alias of 
pc-i440fx-5.0)
...

but checking via QMP, 'pc' (and 'q35') is listed as 'alias'
...
         {
             "hotpluggable-cpus": true,
             "name": "pc-i440fx-5.0",
             "numa-mem-supported": true,
             "default-cpu-type": "qemu64-x86_64-cpu",
             "is-default": true,
             "cpu-max": 255,
             "deprecated": false,
             "alias": "pc"
         },
...

Does 'alias' need to be checked by binary_get_machines() in Patch8 as 
well as 'name'?

Regards,
Liam




  parent reply	other threads:[~2020-02-06 18:18 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 21:23 [PATCH v2 00/29] tests/acceptance/virtio_seg_max_adjust: Restrict it to Linux/X86 Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 01/29] hw/core: Allow setting 'virtio-blk-device.scsi' property on OSX host Philippe Mathieu-Daudé
2020-01-30 12:20   ` Cornelia Huck
2020-01-30 13:23     ` Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 02/29] accel/accel: Make TYPE_ACCEL abstract Philippe Mathieu-Daudé
2020-01-29 21:31   ` Philippe Mathieu-Daudé
2020-01-30 12:22   ` Cornelia Huck
2020-01-29 21:23 ` [PATCH v2 03/29] python/qemu: Add binutils::binary_get_version() Philippe Mathieu-Daudé
2020-02-03 19:17   ` Wainer dos Santos Moschetta
2020-02-06 16:39     ` Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 04/29] tests/acceptance: Use 'version-min' tag to verify QEMU binary version Philippe Mathieu-Daudé
2020-01-30 12:26   ` Cornelia Huck
2020-01-30 13:28     ` Philippe Mathieu-Daudé
2020-01-30 17:08       ` Cornelia Huck
2020-01-30 17:18         ` Philippe Mathieu-Daudé
2020-01-30 20:40           ` Eduardo Habkost
2020-01-29 21:23 ` [PATCH v2 05/29] tests/acceptance: Restrict X86CPUModelAliases test to QEMU >= 4.1 Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 06/29] python/qemu: Add binutils::binary_get_arch() Philippe Mathieu-Daudé
2020-01-31  9:49   ` Cornelia Huck
2020-01-29 21:23 ` [PATCH v2 07/29] tests/acceptance: Use the 'arch' tag to verify QEMU binary target Philippe Mathieu-Daudé
2020-01-31  9:51   ` Cornelia Huck
2020-01-29 21:23 ` [PATCH v2 08/29] python/qemu: Add binutils::binary_get_machines() Philippe Mathieu-Daudé
2020-01-31  9:53   ` Cornelia Huck
2020-01-29 21:23 ` [PATCH v2 09/29] tests/acceptance: Use 'machine' tag to check if available in QEMU binary Philippe Mathieu-Daudé
2020-01-31 10:00   ` Cornelia Huck
2020-02-06 18:17   ` Liam Merwick [this message]
2020-02-26 17:34     ` Liam Merwick
2020-01-29 21:23 ` [PATCH v2 10/29] python/qemu: Add binutils::binary_get_qom_implementations() Philippe Mathieu-Daudé
2020-02-07 14:28   ` Liam Merwick
2020-02-07 14:33     ` Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 11/29] python/qemu: Add binutils::binary_get_accels() Philippe Mathieu-Daudé
2020-02-07 14:35   ` Liam Merwick
2020-01-29 21:23 ` [PATCH v2 12/29] python/qemu/accel: Use binutils::binary_get_accels() Philippe Mathieu-Daudé
2020-02-07 14:37   ` Liam Merwick
2020-01-29 21:23 ` [PATCH v2 13/29] python/qemu: Add binutils::binary_get_devices() Philippe Mathieu-Daudé
2020-02-07 15:02   ` Liam Merwick
2020-01-29 21:23 ` [RFC PATCH v2 14/29] tests/acceptance: Use 'device' tags to check availability in QEMU binary Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 15/29] tests: rename virtio_seg_max_adjust to virtio_check_params Philippe Mathieu-Daudé
2020-01-30 12:32   ` Cornelia Huck
2020-01-31  0:05   ` Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 16/29] tests/acceptance/virtio_check_params: Only remove listed machines Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 17/29] tests/acceptance/virtio_check_params: Improve exception logging Philippe Mathieu-Daudé
2020-02-06 19:54   ` Eduardo Habkost
2020-02-06 20:36     ` Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 18/29] tests/acceptance/virtio_check_params: List machine being tested Philippe Mathieu-Daudé
2020-01-30 12:35   ` Cornelia Huck
2020-01-31  0:08   ` Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 19/29] tests/acceptance/virtio_check_params: Only test Xen as superuser Philippe Mathieu-Daudé
2020-01-30 12:37   ` Cornelia Huck
2020-01-30 13:29     ` Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 20/29] tests/acceptance/virtio_check_params: Skip test if arch is not supported Philippe Mathieu-Daudé
2020-01-29 21:23 ` [RFC PATCH v2 21/29] tests/acceptance/virtio_check_params: Kludge to skip tests on MIPS Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 22/29] tests/acceptance/virtio_check_params: Support the s390x architecture Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 23/29] tests/acceptance/virtio_check_params: Support the ppc architecture Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 24/29] tests/acceptance/virtio_check_params: Default to -nodefaults Philippe Mathieu-Daudé
2020-02-06 16:01   ` Thomas Huth
2020-01-29 21:23 ` [PATCH v2 25/29] tests/acceptance/virtio_check_params: Require a virtio-scsi-pci device Philippe Mathieu-Daudé
2020-01-29 21:23 ` [PATCH v2 26/29] tests/acceptance/boot_linux_console: Do not use VGA on Clipper machine Philippe Mathieu-Daudé
2020-02-06 15:35   ` Thomas Huth
2020-01-29 21:23 ` [PATCH v2 27/29] tests/acceptance/migration: Default to -nodefaults Philippe Mathieu-Daudé
2020-02-06 16:03   ` Thomas Huth
2020-02-07 11:57   ` Wainer dos Santos Moschetta
2020-01-29 21:23 ` [PATCH v2 28/29] tests/acceptance/version: " Philippe Mathieu-Daudé
2020-02-06 15:34   ` Thomas Huth
2020-02-07 12:05   ` Wainer dos Santos Moschetta
2020-01-29 21:23 ` [PATCH v2 29/29] MAINTAINERS: Add Acceptance tests reviewers Philippe Mathieu-Daudé
2020-01-30  8:41   ` Thomas Huth
2020-01-31 13:46     ` Wainer dos Santos Moschetta
2020-01-29 21:28 ` [PATCH v2 00/29] tests/acceptance/virtio_seg_max_adjust: Restrict it to Linux/X86 Philippe Mathieu-Daudé
2020-02-06 16:48 ` Philippe Mathieu-Daudé
2020-06-04  8:19 ` python/qemu: Refactor QemuBinaryInfo 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=e1100e02-33aa-02a4-c59b-ad04f214972a@oracle.com \
    --to=liam.merwick@oracle.com \
    --cc=cohuck@redhat.com \
    --cc=crosa@redhat.com \
    --cc=dplotnikov@virtuozzo.com \
    --cc=ehabkost@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wainersm@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 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).