qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: "Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Beraldo Leal" <bleal@redhat.com>,
	"Ed Maste" <emaste@freebsd.org>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	qemu-ppc@nongnu.org, "John Snow" <jsnow@redhat.com>,
	"Radoslaw Biernacki" <rad@semihalf.com>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Leif Lindholm" <quic_llindhol@quicinc.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Bin Meng" <bmeng.cn@gmail.com>,
	"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	qemu-riscv@nongnu.org,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	qemu-s390x@nongnu.org,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Weiwei Li" <liwei1518@gmail.com>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	qemu-arm@nongnu.org, "Li-Wen Hsu" <lwhsu@freebsd.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Marcin Juszkiewicz" <marcin.juszkiewicz@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Eric Farman" <farman@linux.ibm.com>,
	"Pavel Dovgalyuk" <pavel.dovgaluk@ispras.ru>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Joel Stanley" <joel@jms.id.au>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Bernhard Beschow" <shentey@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v3 20/29] tests/functional: extend test_aarch64_virt with vulkan test
Date: Wed, 8 Jan 2025 08:03:28 +0100	[thread overview]
Message-ID: <f714ab7d-0056-4fd7-9804-62f669b50fcc@redhat.com> (raw)
In-Reply-To: <20250107165208.743958-21-alex.bennee@linaro.org>

On 07/01/2025 17.51, Alex Bennée wrote:
> Now we have virtio-gpu Vulkan support lets add a test for it.

I'm not a native speaker, but maybe rather:

Now that we have virtio-gpu Vulkan support, let's add a test for it.

?

...
> diff --git a/tests/functional/test_aarch64_virt.py b/tests/functional/test_aarch64_virt.py
> index 2d9995a95d..bb68048537 100755
> --- a/tests/functional/test_aarch64_virt.py
> +++ b/tests/functional/test_aarch64_virt.py
> @@ -13,11 +13,14 @@
>   import logging
>   from subprocess import check_call, DEVNULL
>   
> +from qemu.machine.machine import VMLaunchFailure
> +
> +from qemu_test import BUILD_DIR
>   from qemu_test import QemuSystemTest, Asset
> -from qemu_test import exec_command_and_wait_for_pattern
> +from qemu_test import exec_command, exec_command_and_wait_for_pattern
>   from qemu_test import wait_for_console_pattern
>   from qemu_test import get_qemu_img
> -
> +from qemu_test import skipIfMissingCommands, get_qemu_img
>   

Daniel recently tried to standardize two empty lines between the import and 
class statements, so could you please keep the empty line here?

>   class Aarch64VirtMachine(QemuSystemTest):
>       KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
> @@ -73,15 +76,16 @@ def common_aarch64_virt(self, machine):
>           Common code to launch basic virt machine with kernel+initrd
>           and a scratch disk.
>           """
> +        self.set_machine('virt')
> +        self.require_accelerator("tcg")

Thanks for moving this to the beginning of the function!

>           logger = logging.getLogger('aarch64_virt')
>   
>           kernel_path = self.ASSET_KERNEL.fetch()
>   
> -        self.set_machine('virt')
>           self.vm.set_console()
>           kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
>                                  'console=ttyAMA0')
> -        self.require_accelerator("tcg")
>           self.vm.add_args('-cpu', 'max,pauth-impdef=on',
>                            '-machine', machine,
>                            '-accel', 'tcg',
> @@ -102,7 +106,9 @@ def common_aarch64_virt(self, machine):
>   
>           # Add the device
>           self.vm.add_args('-blockdev',
> -                         f"driver=qcow2,file.driver=file,file.filename={image_path},node-name=scratch")
> +                         "driver=qcow2,file."
> +                         "driver=file,file."

The line breaks look weird here. I'd rather start a new line after the 
comma, not after the dot...? (also the changes look rather unrelated to the 
patch subject?)

> +                         f"filename={image_path},node-name=scratch")
>           self.vm.add_args('-device',
>                            'virtio-blk-device,drive=scratch')
>   
> @@ -131,5 +137,73 @@ def test_aarch64_virt_gicv2(self):
>           self.common_aarch64_virt("virt,gic-version=2")
>   
>   
> +    ASSET_VIRT_GPU_KERNEL = Asset(
> +        'https://fileserver.linaro.org/s/ce5jXBFinPxtEdx/'
> +        'download?path=%2F&files='
> +        'Image',
> +        '89e5099d26166204cc5ca4bb6d1a11b92c217e1f82ec67e3ba363d09157462f6')
> +
> +    ASSET_VIRT_GPU_ROOTFS = Asset(
> +        'https://fileserver.linaro.org/s/ce5jXBFinPxtEdx/'
> +        'download?path=%2F&files='
> +        'rootfs.ext4.zstd',
> +        '792da7573f5dc2913ddb7c638151d4a6b2d028a4cb2afb38add513c1924bdad4')
> +
> +    @skipIfMissingCommands('zstd')
> +    def test_aarch64_virt_with_gpu(self):
> +        # This tests boots with a buildroot test image that contains
> +        # vkmark and other GPU exercising tools. We run a headless
> +        # weston that nevertheless still exercises the virtio-gpu
> +        # backend.
> +
> +        self.set_machine('virt')
> +        self.require_accelerator("tcg")
> +
> +        kernel_path = self.ASSET_VIRT_GPU_KERNEL.fetch()
> +        image_path = self.uncompress(self.ASSET_VIRT_GPU_ROOTFS, format="zstd")
> +
> +        self.vm.set_console()
> +        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> +                               'console=ttyAMA0 root=/dev/vda')
> +
> +        self.vm.add_args("-accel", "tcg")
> +        self.vm.add_args("-cpu", "neoverse-v1,pauth-impdef=on")
> +        self.vm.add_args("-machine", "virt,gic-version=max",
> +                         '-kernel', kernel_path,
> +                         '-append', kernel_command_line)
> +        self.vm.add_args("-smp", "2", "-m", "2048")
> +        self.vm.add_args("-device",
> +                         "virtio-gpu-gl-pci,hostmem=4G,blob=on,venus=on")
> +        self.vm.add_args("-display", "egl-headless")
> +        self.vm.add_args("-display", "dbus,gl=on")
> +        self.vm.add_args("-device", "virtio-blk-device,drive=hd0")
> +        self.vm.add_args("-blockdev",
> +                         "driver=raw,file.driver=file,"
> +                         "node-name=hd0,read-only=on,"
> +                         f"file.filename={image_path}")
> +        self.vm.add_args("-snapshot")
> +
> +        try:
> +            self.vm.launch()
> +        except VMLaunchFailure as excp:
> +            if "old virglrenderer, blob resources unsupported" in excp.output:
> +                self.skipTest("No blob support for virtio-gpu")
> +            elif "old virglrenderer, venus unsupported" in excp.output:
> +                self.skipTest("No venus support for virtio-gpu")
> +            else:
> +                self.log.info("unhandled launch failure: {excp.output}")
> +                raise excp
> +
> +        self.wait_for_console_pattern('buildroot login:')
> +        exec_command(self, 'root')
> +        exec_command(self, 'export XDG_RUNTIME_DIR=/tmp')
> +        exec_command_and_wait_for_pattern(self,
> +                                          "weston -B headless "
> +                                          "--renderer gl "
> +                                          "--shell kiosk "
> +                                          "-- vkmark -b:duration=1.0",
> +                                          "vkmark Score")

The new test looks fine to me!

  Thomas



  reply	other threads:[~2025-01-08  7:04 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 16:51 [PATCH v3 00/29] testing/next: functional tests, qtest clocks, vm and keymaps (pre-PR) Alex Bennée
2025-01-07 16:51 ` [PATCH v3 01/29] tests/functional: update the arm tuxrun tests Alex Bennée
2025-01-07 16:51 ` [PATCH v3 02/29] tests/functional: update the i386 " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 03/29] tests/functional: add a m68k " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 04/29] tests/functional: update the mips32 " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 05/29] tests/functional: update the mips32el " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 06/29] tests/functional: update the mips64 " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 07/29] tests/functional: update the mips64el " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 08/29] tests/functional: update the ppc32 " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 09/29] tests/functional: update the ppc64 " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 10/29] tests/functional: update the riscv32 " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 11/29] tests/functional: update the riscv64 " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 12/29] tests/functional: update the s390x " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 13/29] tests/functional: update the sparc64 " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 14/29] tests/functional: update the x86_64 " Alex Bennée
2025-01-07 16:51 ` [PATCH v3 15/29] tests/functional/aarch64: add tests for FEAT_RME Alex Bennée
2025-01-07 16:51 ` [PATCH v3 16/29] tests/qtest: remove clock_steps from virtio tests Alex Bennée
2025-01-07 20:12   ` Fabiano Rosas
2025-01-07 16:51 ` [PATCH v3 17/29] system/qtest: properly feedback results of clock_[step|set] Alex Bennée
2025-01-07 16:51 ` [PATCH v3 18/29] tests/functional: remove hacky sleep from the tests Alex Bennée
2025-01-07 16:51 ` [PATCH v3 19/29] tests/functional: add zstd support to uncompress utility Alex Bennée
2025-01-08  6:41   ` Thomas Huth
2025-01-07 16:51 ` [PATCH v3 20/29] tests/functional: extend test_aarch64_virt with vulkan test Alex Bennée
2025-01-08  7:03   ` Thomas Huth [this message]
2025-01-07 16:51 ` [PATCH v3 21/29] tests/lcitool: bump to latest version of libvirt-ci Alex Bennée
2025-01-07 16:52 ` [PATCH v3 22/29] tests/docker: move riscv64 cross container from sid to trixie Alex Bennée
2025-01-07 16:52 ` [PATCH v3 23/29] tests/lcitool: remove temp workaround for debian mips64el Alex Bennée
2025-01-07 16:52 ` [PATCH v3 24/29] tests/vm: fix build_path based path Alex Bennée
2025-01-07 16:52 ` [PATCH v3 25/29] tests/vm: partially un-tabify help output Alex Bennée
2025-01-07 16:52 ` [PATCH v3 26/29] tests/vm: allow interactive login as root Alex Bennée
2025-01-07 16:52 ` [PATCH v3 27/29] pc-bios: ensure keymaps dependencies set vnc tests Alex Bennée
2025-01-07 16:52 ` [PATCH v3 28/29] dockerfiles: Remove 'MAINTAINER' entry in debian-tricore-cross.docker Alex Bennée
2025-01-07 16:52 ` [PATCH v3 29/29] MAINTAINERS: Remove myself from reviewers Alex Bennée

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=f714ab7d-0056-4fd7-9804-62f669b50fcc@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=armbru@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=berrange@redhat.com \
    --cc=bleal@redhat.com \
    --cc=bmeng.cn@gmail.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=crosa@redhat.com \
    --cc=danielhb413@gmail.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=emaste@freebsd.org \
    --cc=farman@linux.ibm.com \
    --cc=farosas@suse.de \
    --cc=harshpb@linux.ibm.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=joel@jms.id.au \
    --cc=jsnow@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=liwei1518@gmail.com \
    --cc=lvivier@redhat.com \
    --cc=lwhsu@freebsd.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=npiggin@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pasic@linux.ibm.com \
    --cc=pavel.dovgaluk@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=quic_llindhol@quicinc.com \
    --cc=rad@semihalf.com \
    --cc=richard.henderson@linaro.org \
    --cc=shentey@gmail.com \
    --cc=wainersm@redhat.com \
    --cc=zhiwei_liu@linux.alibaba.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).