From patchwork Wed Feb 19 15:00:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 866440 Delivered-To: patch@linaro.org Received: by 2002:a5d:64e6:0:b0:38f:210b:807b with SMTP id g6csp2115463wri; Wed, 19 Feb 2025 07:00:58 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWjRG0YY0PmQbaF/riWofTmufvG1EVGXdXRk//ZUn8SlkpX16WxI7UG6Mc3admXmvrhAjIPtg==@linaro.org X-Google-Smtp-Source: AGHT+IEws5pGt03AXMQxup+K3wgq8A59HfdiBzWRzHVyckw/OjlSb3rgShmK6svYLOTOOF27R2jP X-Received: by 2002:a5d:64ec:0:b0:38f:47f0:e7b7 with SMTP id ffacd0b85a97d-38f47f0e871mr12990169f8f.16.1739977257271; Wed, 19 Feb 2025 07:00:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739977257; cv=none; d=google.com; s=arc-20240605; b=cz2+UiViabgMp0AshzTitw5+96oJZtJExRoN4EeECXBeyMMZ67/hoTO4sVqq1LPdXE xI3hEGOFWeEaTfzR8mgEnoPiEyXuKU2KwArm/spSAKeUlQYk6BNxqelt/o6fH1IwZr/5 iK75AajrXRA6BchWmj5JX2SqZVWNNN/2nhzBYKhPcguyY/jMMsXRqFFIMb1tM/uviOfv ZK4AgrCayaSxqdwrf9/qj2lSnCmUqzftlaox0H1+cVZIwZ7mP1ExDOp5rmnFYM3pXZr/ j9i34idpLnwWgcT3C4dfBbOT18Thqk9iiplxSNkWf76do4ZBkihiHNGUTvhq3+AdI2k3 VUzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HUERxSl/WBxSscDB+7xF2k4R+kzCld+g2R+w6slJd/U=; fh=YBDleYEC9XVOaRydO/TqG0NKalnvaifQVdszAjGAIkw=; b=I/oCol8f3A9u9/wXvmJK9JP6rqxe4hksYZ3WFejj8/IrzlLOqcEJ45Tn0bELgU8jB/ oMDpbzd3LLVu1uFkcZn8B8Lc2tg8/NIlGwMObrve4DPmHomPAKDWMyfWh7gVnobueewb 2Z/ig8C2MphWs1xRi03FQ7mmJCX1hu7+F6X56YYOJYVi+5mOOlpLQ5N02WGdP+1RA8px Ef0PadXzBpRVYQGpFOT8Evvn/pS78bLrxQiZrnwURfUE7wj/CxMqZ2mpv/X2Gq01fy14 TI3EGRmP2T/DyYThY3M/KUvJlevGl5YpWL2TrwGTnRhgtWApMacptxHMFaGLNBbTav+6 F3yA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wuhxwDh8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ffacd0b85a97d-38f259d5d7esi13280094f8f.261.2025.02.19.07.00.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Feb 2025 07:00:56 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wuhxwDh8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tklYr-0004VW-5A; Wed, 19 Feb 2025 10:00:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tklYf-0004Nd-Sk for qemu-devel@nongnu.org; Wed, 19 Feb 2025 10:00:18 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tklYa-00012w-OH for qemu-devel@nongnu.org; Wed, 19 Feb 2025 10:00:16 -0500 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-abb7f539c35so869627566b.1 for ; Wed, 19 Feb 2025 07:00:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739977211; x=1740582011; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HUERxSl/WBxSscDB+7xF2k4R+kzCld+g2R+w6slJd/U=; b=wuhxwDh8vmwuw5U7hX6hN1oFfcPBCfMRZts0+bPdkwx12vjQXJmsDFLCKFQo0qjplZ 9SDhSXee8U/idre8eH+JeV8+lH49eIbjMV08LUW1YqitBKHR26HxsuyiL5dcLJlMiqRF 6AZlC4hBIN3iO1cL2xDkLeDakQOux4jWqAY2X2Qz+IoKa+fAbwLxgMkYVGGFitAa6OBz OFsz+nlKs6f7y//bs4i6nkLHsK187FSgOoaPWBnairi5cFdtouiBI06yaVGPiq8GCGNK EtdjObI6N0IaqB94X6uGDdYTMvDwYCjRFxd8ax/VBgzpOyrlD8mIez/sEsA2kX7aUobl q7zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739977211; x=1740582011; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HUERxSl/WBxSscDB+7xF2k4R+kzCld+g2R+w6slJd/U=; b=lOOIgKoU/zx+yc/S+GPNwl6oZm2s0F6gpl96wS+ifUDA0cKZpyM+zl7kQ5pZRpxSru HSl+M3dr2aViyeCSYiMRmsW0RvlWOLDXZjlgBbSG9w/BQBuzUAQLFmCQPGu3H/RoDnx4 qdvzfQNfesv2NCJZlRWBH5WgvI/3poPB9RAVK6dCNQtxcaa/nf9WO8blX0LOJxjW2N6H KYcFQHxAuSkDCOYaFWHQDXt/l1Y2ewbTWKXUSwFync0JjPgKOirh2gxH/zu5pn6jty7J jHfpDNNss+PeiMK/DlV0o1rPbky3XOiLApyAT67Pd0gcJtuoXEnvDoLQU9TJgt8wM023 xN5g== X-Gm-Message-State: AOJu0YwznbZLla7pn0FpIL6mLjbgII2wy+qNwuPaN8o5Vbb/IU83qsZ3 //m3sWAB41DiGQcQ0OWER+95JdCcsqkv0tabfp6ufUjACMkSGwR9cB/pSApo4jU= X-Gm-Gg: ASbGncuCZZxhbuOQtUl41YOygSQMNy1Tvc/5IGd4SKNo9aH0FhqTXxQjAcWp2LSIrvY EktvYY5V1i7760o4NJw1If7k5G3o7BeOdPHMvrrhsYSeWMadKMCseUw2s11rXRDtm2g3eopM/wT IEgJrKrMuWinZPA3mZ7bxPFUthuYPghlQQ1wnF9BIZH3P8bFzvRwwkGdjyrozuC2kgqL+oJ3NAg HBYkEQ9tZhyN4y91cW08R1unK9tJGGKziTQdp2J4W5iTNVNdrgjDALrIJv146i7FuWx07DB97oa eq0TOP4IUG/p9fA3+Q== X-Received: by 2002:a17:907:d9e:b0:ab3:2b85:5d5 with SMTP id a640c23a62f3a-abb70df3417mr2019133666b.49.1739977210756; Wed, 19 Feb 2025 07:00:10 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-abba278e1b1sm549131466b.99.2025.02.19.07.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2025 07:00:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 36F39619B1; Wed, 19 Feb 2025 15:00:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= Subject: [PATCH 1/4] tests/functional: move aarch64 GPU test into own file Date: Wed, 19 Feb 2025 15:00:06 +0000 Message-Id: <20250219150009.1662688-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250219150009.1662688-1-alex.bennee@linaro.org> References: <20250219150009.1662688-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org I want to expand the number of tests to cover a wide range of configurations. That starts with splitting off from the normal virt test from which it doesn't really share much code. Signed-off-by: Alex Bennée --- tests/functional/meson.build | 2 + tests/functional/test_aarch64_virt.py | 71 --------------- tests/functional/test_aarch64_virt_gpu.py | 102 ++++++++++++++++++++++ 3 files changed, 104 insertions(+), 71 deletions(-) create mode 100755 tests/functional/test_aarch64_virt_gpu.py diff --git a/tests/functional/meson.build b/tests/functional/meson.build index b516d21cba..11b7ca1577 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -19,6 +19,7 @@ test_timeouts = { 'aarch64_sbsaref_freebsd' : 720, 'aarch64_tuxrun' : 240, 'aarch64_virt' : 720, + 'aarch64_virt_gpu' : 720, 'acpi_bits' : 420, 'arm_aspeed_palmetto' : 120, 'arm_aspeed_romulus' : 120, @@ -77,6 +78,7 @@ tests_aarch64_system_thorough = [ 'aarch64_tcg_plugins', 'aarch64_tuxrun', 'aarch64_virt', + 'aarch64_virt_gpu', 'aarch64_xen', 'aarch64_xlnx_versal', 'multiprocess', diff --git a/tests/functional/test_aarch64_virt.py b/tests/functional/test_aarch64_virt.py index 95f5ce8b4c..884aad7af6 100755 --- a/tests/functional/test_aarch64_virt.py +++ b/tests/functional/test_aarch64_virt.py @@ -134,77 +134,6 @@ 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") - elif "egl: no drm render node available" in excp.output: - self.skipTest("Can't access host DRM render node") - elif "'type' does not accept value 'egl-headless'" in excp.output: - self.skipTest("egl-headless support is not available") - else: - self.log.info(f"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") - if __name__ == '__main__': QemuSystemTest.main() diff --git a/tests/functional/test_aarch64_virt_gpu.py b/tests/functional/test_aarch64_virt_gpu.py new file mode 100755 index 0000000000..f21ae18392 --- /dev/null +++ b/tests/functional/test_aarch64_virt_gpu.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +# +# Functional tests for the various graphics modes we can support. +# +# Copyright (c) 2024, 2025 Linaro Ltd. +# +# Author: +# Alex Bennée +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import logging + +from qemu.machine.machine import VMLaunchFailure + +from qemu_test import QemuSystemTest, Asset +from qemu_test import exec_command, exec_command_and_wait_for_pattern +from qemu_test import wait_for_console_pattern +from qemu_test import skipIfMissingCommands + +class Aarch64VirtGPUMachine(QemuSystemTest): + KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' + timeout = 360 + + def wait_for_console_pattern(self, success_message, vm=None): + wait_for_console_pattern(self, success_message, + failure_message='Kernel panic - not syncing', + vm=vm) + + 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_vulkan_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") + elif "egl: no drm render node available" in excp.output: + self.skipTest("Can't access host DRM render node") + elif "'type' does not accept value 'egl-headless'" in excp.output: + self.skipTest("egl-headless support is not available") + else: + self.log.info(f"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") + +if __name__ == '__main__': + QemuSystemTest.main() From patchwork Wed Feb 19 15:00:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 866441 Delivered-To: patch@linaro.org Received: by 2002:a5d:64e6:0:b0:38f:210b:807b with SMTP id g6csp2115921wri; Wed, 19 Feb 2025 07:01:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWYT0O/KOnMrL1zsfGPtpIWT3S5I3YZVWFWkTTy+t49zEf/9vEOLGJEDVTOEb8Py5gjcEFU+g==@linaro.org X-Google-Smtp-Source: AGHT+IEfWRsrXV066ZFSthI2PmghjFjpWp+YFxFqmfXn9lwUVzRaegl0vCsQtaNny8lBwFtamGa/ X-Received: by 2002:a05:600c:4f86:b0:439:9a40:aa16 with SMTP id 5b1f17b1804b1-4399a40ac91mr37278565e9.16.1739977296093; Wed, 19 Feb 2025 07:01:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739977296; cv=none; d=google.com; s=arc-20240605; b=N2KTCnTx3mNwA2RAEXBq8ukVb/uK0/LR2mWwGF8b3g/PZJbPmB0y3kBNJv/ciOXie+ em1MKZcAiAzELW6nShpjMzXbc4q3gjrjhA9lnLtEt86g6zC8kTRCnjrpyiGBO6cj4Sa7 0H1wzQ8IlsHrT9rTdcb0CA/QhGOf4XJm1Sj6mm9H8+Msqwhpgj16enEzrZgrv4vYlRfu QRRMASx4fh97Fgg1EqVUPuHFpYfYftOu32V0Lcth8TpplVid91IJ/wQejZdrlD1961lu ouUjoUc1J3AkW5aRzgOXjV8eZm1ZMGq0mZFUE75edwiI4FGu34jdSozaHIbPCnIkRRjU xbNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LZ0Ad8q73aLBySL6ollEIfx4rPD1OsbtsagYMD1pCOs=; fh=YBDleYEC9XVOaRydO/TqG0NKalnvaifQVdszAjGAIkw=; b=kWX5cG4HZLSvy0W8CUK7j4h3m15vBQoKOavd+UWLj4H+/FYSsuEiwDkqu21N31WEJ2 m3+8cTtx0MjDIfyZ0B85yAt/Odyy0W4u89WuB7SePpyq+iqr5xej7g013LgEx4+YUJdb 7uQ+Ar/mqUduH5SvAlRQIompj+uS/uJAKp1joxnzckkIQKOmzjcZZ8Y2yqCbKYfL9q0e ZL4/LYLVzz42wD+ncZ0F3f6HGXO3O8e+OcDJVgKkNkHzM4yZKd/e0uYiV2jzr1pQYl6t QXnI75YjPLy63TKgXREipdRuwkC2qkgUoBWExQU3khqN9jw/X6DpdQb46YdUqfrlua54 pHDw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d4DJca9U; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ffacd0b85a97d-38f2f4915d5si9890756f8f.508.2025.02.19.07.01.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Feb 2025 07:01:36 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d4DJca9U; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tklYv-0004Y8-Ro; Wed, 19 Feb 2025 10:00:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tklYg-0004P6-Nb for qemu-devel@nongnu.org; Wed, 19 Feb 2025 10:00:20 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tklYc-00013Z-DN for qemu-devel@nongnu.org; Wed, 19 Feb 2025 10:00:18 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-abb81285d33so777158266b.0 for ; Wed, 19 Feb 2025 07:00:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739977212; x=1740582012; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LZ0Ad8q73aLBySL6ollEIfx4rPD1OsbtsagYMD1pCOs=; b=d4DJca9Um77NyYDruy9Ou6xpwEO/p7wMPv19eJc8eb+gDczYr5fWm7eeaMjd3Ud0nX KYDRNGw08z65BZzOftZFPLu9i/1m92zxgsKbLdOktKQ316dX8J8FBxu5EonfZ8vaYpQR 4Zhxjs7OjI9aZM4HLv8xoXVPdz+DSoU+BVB7wxFMysPvIdfVkXNG4IYjazA3M5i6f59Q 4jfppH84mfG2l+bX5cAR+MMjENIyR7w5C7lXIXLKhVk6MkAn2OVN57vqYrnH+PV1gEbQ tY3+luw/t+kj0F+gXSFxbrpCsN+uIq5Td9smZocdpr27rccn0Ye3AtIYEIYPrt30nd7+ g6Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739977212; x=1740582012; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LZ0Ad8q73aLBySL6ollEIfx4rPD1OsbtsagYMD1pCOs=; b=Qhh63tuvNIqV2Kxm/Ux3rm4F4QmOmqSMVIGGZaFlzKF4/0H3K10FK4PVns3HfhkWrX 1VAz9vtlw9a7Foo/g3aRTNoJwifVucREwHUG6gpou2rgpga8xArry104zcafcqK1s+nA i3jq3GZ25VHnZybnQplfdsnVpUFyZbspPBUlmc8YD5pStrge/WR3xsL90AkyQmnE4QgM bRVdb0pu3FjpNh5fG+RItEHA5eOqhwp8gfsBqv+jL/3aCp7naM0cita+jIv8EimhPg6N QFk/CNstrWBInAjSk618hFVJBW2WFk5mW0tSjSGrrSEABJxLQOtZzPZEXniuoW8GPRuF XEag== X-Gm-Message-State: AOJu0Ywq1K++DdTxNJn2zRf7W1Htr6QroSHuCD+c9SqtJUTjvK+E1Zc+ DUQWKyzMMcKvcr5fEYZ9LTNYVb3opZcGcX2o4js9vpdkUmoRDvld6eUnpgZabNs= X-Gm-Gg: ASbGncvIGyZznJI/ywjqVY/ZVKM8SwVpwPHO0qrFraP5qLNIKXvAK2nIADPOH9NWUm8 AK2KSLky+NQNVWH0tREscbqQRVo8CPDR32pLz2e1JJUKHkvK8tvTn2DW+ngLHK9SoODLepx2qH/ OgqGcalhRoV6TGlFmSNznAzUofIdm15YHI0YM90GvDjhQNoUXYafJTH+R+bIiovsYV3bZ7Nxl5Q 73bXyItN7EwHeEzhe6hq+YrCwvIklzuspM4au4Dm0mX2PEYFJyVDlP+QfKGWnhKgzBq+Sai19z1 gjQF2HOv+ZHJNdTL4g== X-Received: by 2002:a17:906:c154:b0:aaf:74dc:5dbc with SMTP id a640c23a62f3a-abb70bbe128mr2133723366b.29.1739977212350; Wed, 19 Feb 2025 07:00:12 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aba5323202dsm1280699166b.6.2025.02.19.07.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2025 07:00:10 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 4C384619BA; Wed, 19 Feb 2025 15:00:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= Subject: [PATCH 2/4] tests/functional: factor out common code in gpu test Date: Wed, 19 Feb 2025 15:00:07 +0000 Message-Id: <20250219150009.1662688-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250219150009.1662688-1-alex.bennee@linaro.org> References: <20250219150009.1662688-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62f.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In preparation for handling more tests split out the common machine setup details from the test specific stuff. Signed-off-by: Alex Bennée --- tests/functional/test_aarch64_virt_gpu.py | 30 +++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/tests/functional/test_aarch64_virt_gpu.py b/tests/functional/test_aarch64_virt_gpu.py index f21ae18392..06093c6b60 100755 --- a/tests/functional/test_aarch64_virt_gpu.py +++ b/tests/functional/test_aarch64_virt_gpu.py @@ -39,12 +39,7 @@ def wait_for_console_pattern(self, success_message, vm=None): 'rootfs.ext4.zstd', '792da7573f5dc2913ddb7c638151d4a6b2d028a4cb2afb38add513c1924bdad4') - @skipIfMissingCommands('zstd') - def test_aarch64_virt_with_vulkan_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. + def _run_virt_gpu_test(self, gpu_device, weston_cmd, weston_pattern): self.set_machine('virt') self.require_accelerator("tcg") @@ -62,10 +57,10 @@ def test_aarch64_virt_with_vulkan_gpu(self): '-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", gpu_device) + for opt in ["egl-headless", "dbus,gl=on"]: + self.vm.add_args("-display", opt) + self.vm.add_args("-device", "virtio-blk-device,drive=hd0") self.vm.add_args("-blockdev", "driver=raw,file.driver=file," @@ -91,12 +86,15 @@ def test_aarch64_virt_with_vulkan_gpu(self): 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") + full_cmd = f"weston -B headless --renderer gl --shell kiosk -- {weston_cmd}" + exec_command_and_wait_for_pattern(self, full_cmd, weston_pattern) + + @skipIfMissingCommands('zstd') + def test_aarch64_virt_with_vulkan_gpu(self): + gpu_device = "virtio-gpu-gl-pci,hostmem=4G,blob=on,venus=on" + weston_cmd = "vkmark -b:duration=1.0" + weston_pattern = "vkmark Score" + self._run_virt_gpu_test(gpu_device, weston_cmd, weston_pattern) if __name__ == '__main__': QemuSystemTest.main() From patchwork Wed Feb 19 15:00:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 866438 Delivered-To: patch@linaro.org Received: by 2002:a5d:64e6:0:b0:38f:210b:807b with SMTP id g6csp2115327wri; Wed, 19 Feb 2025 07:00:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXbyF07TbOAN1MRrVq5kAXUzsJ0QWUxY7AHy8cvW/FN9Z+OAaQwnXnnxgYxt+vwnCkTgGTYZQ==@linaro.org X-Google-Smtp-Source: AGHT+IGby5Iq+VAiakzGXyxQfnmsKo+VDUA+LkjZLxy+TEPaEhBfytgQeWa4qR8/A+rPtO5lnxhc X-Received: by 2002:a05:6214:cc6:b0:6e4:4085:9f72 with SMTP id 6a1803df08f44-6e66cc85d5fmr292679686d6.7.1739977246010; Wed, 19 Feb 2025 07:00:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739977245; cv=none; d=google.com; s=arc-20240605; b=OuLkJJ2VCJUgrrGkF/mlCU4dSTWJKPr4nfmfk5+0ui+l7RwoVhCziPhDWTiW5A5iQO D6sHVbGRjFYBahEMyW0FxUgnqiGBkSI4sB/g3tSa8XbusttV0cEZQGVdrD3nLb/X4pFq BlvjO9OJa9zlrY5TtWg0BOPpjAQR5gA4KV6eXmmTU5KUS5u3AkePgYsmQX6o0F7qO+rY NKKGZaGW96NMKKzAhjkpPhx+3KrWUm1VcRRqPYA/+mBLlPk0lADQHasnKqrICh1fEyPu 0OwGTqXkdlJf+nlNLc6ZpZ27Ri3uJ757TKEisSkek8B0I80FITIPPx3N0ikJPgFk/Ebw tSHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VMpR8AXA7xfQaFhSLKNadFqD4qPYuFkWfolZ2f9L0LI=; fh=YBDleYEC9XVOaRydO/TqG0NKalnvaifQVdszAjGAIkw=; b=M1+GHYpSJ823kpzwQFxD+PeZ9xLp1BARK5l0KluoP5CvuwChQMPE0v8SQskBlzA6NA rfnSZMiLrYeYG2sRs9yTLG0PzbesSX3vkiKM7+GvkXEPi6fyzcQWpR9OJYba46C5ohsP LW+DlDON486oElxFVldjbPPjXda/GaT6Apt18T97pPI8mf9jfdg3889ChcHFFUT8HQL2 ZzlnQ/EjxhPR2mVW7Fhr86Hn843eHOJSArjbiJd0FZy9KxOZ3eP/dxmEN+sdZfDKM55f QiuXP3ffRSDRGIq1208VGCW1NnAlWdnM6MIx7FGkZ0MGInX4HmRXi1YFCCHt/EQReDGC /NWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UNywPUUS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e65d733f34si127693906d6.97.2025.02.19.07.00.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Feb 2025 07:00:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UNywPUUS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tklYo-0004TG-FB; Wed, 19 Feb 2025 10:00:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tklYf-0004OL-CD for qemu-devel@nongnu.org; Wed, 19 Feb 2025 10:00:18 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tklYb-000134-S0 for qemu-devel@nongnu.org; Wed, 19 Feb 2025 10:00:16 -0500 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5e0573a84fcso5843594a12.2 for ; Wed, 19 Feb 2025 07:00:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739977211; x=1740582011; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VMpR8AXA7xfQaFhSLKNadFqD4qPYuFkWfolZ2f9L0LI=; b=UNywPUUSqCkwVTQIWlDytUjljJ2vIFnA0xe4BTw6cxd+XYVfmUIq6YwxOtzavGDucU DlaTwtFUN7/t7yJpvbQP/DCta537ZyyzbRtjpzsaIroxNGoSLOSKd0guQAgZF6BEYzr0 /xf8gFzbhsi59soST4b42kGFskHuGcRwUCGyzvWCMIQIif413Wh65bBMMcQIDYnjtjGV m4tRXaYF4Q/q5UT++uk8QpZ7U6H/3X1Aw64Dc3du3cE0Uu1ktt7Ek39POYVZOrr+NAeF vlnMKv89+Obm/DCek1EAIOHFuyNRqP6soJGeVD1WmpB3RQ3U5AFsX+86JvADdWhLFq6H alpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739977211; x=1740582011; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VMpR8AXA7xfQaFhSLKNadFqD4qPYuFkWfolZ2f9L0LI=; b=BJIJ8unKcK4iF33YGejH5HEAwSde/mT8jnVoJ2WwPrkVWp4QeVhVwJg1g7ZudmBYa5 ogSP2Gd8SM3iyf7nZBwV7I7GU0Pb16JY2U/O6LXJEMZWEqwA6cQaLJTGdXd4pTYHBY8z ZGn1Q2ad3+ZEEvj6G9th7why1YuJAfDgdbtSoPFB0RPqzcvs3cTfcklgpzcXyfnHylW/ axcpjS66UddcqpnHdlM+1haS3KbUjOoBCTSG8LA5PFL40vIMCLQs+HP4Ni6AC4BHaI52 kCMie5GdhPWl2hV47drAkdqckxZIk+OBFmaRwyqzz9T9j6Q4gewYlhQ0YCJzArt063NT siHA== X-Gm-Message-State: AOJu0YwhYRLQWRAI3/Ebh6dPmS9b+SDFaAyJNDbR6TcDU4N9imTqB32r 8S+HdNHI2jGvuqd9V+RGhhXOX/Af/twMJAMAcNPNpDu1ftREN3/2h2bLqSuWVvg= X-Gm-Gg: ASbGncthUYM8aBE33U8yiR/4c1Xw7mgW1edbEFKjF/eLqEM5stzTWG0VwQh496YTlT4 xsCZ3xioU+QfEH38+mwkexu4advh9YCTuZIGwRrhflrsJJKMA9K6UhWTJdYSkYSMyChkhUP4dMh caKh31C5pw0A4JogmlBe9oJtF3J7XqMnOWk8kMBM9JRmQnwz9wrOTWgLjEduH15x30xIhAJwW5j 5AuFA/xn1Sa6BLg2CjoYXp/oni8W2t9gXJSwB+S1CmJ8rG2KK5XjMy77Z2p8kJMhVghAS0miCB4 XQT8z1nqD8I1uc610A== X-Received: by 2002:a17:907:7842:b0:ab7:cfe7:116f with SMTP id a640c23a62f3a-abb70d96544mr1839915166b.46.1739977211081; Wed, 19 Feb 2025 07:00:11 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-abb72b519c5sm904303866b.173.2025.02.19.07.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2025 07:00:10 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 61E84619C2; Wed, 19 Feb 2025 15:00:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= Subject: [PATCH 3/4] tests/functional: ensure we have a GPU device for tests Date: Wed, 19 Feb 2025 15:00:08 +0000 Message-Id: <20250219150009.1662688-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250219150009.1662688-1-alex.bennee@linaro.org> References: <20250219150009.1662688-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52e.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org It's possible to build QEMU without support for the GL enabled GPU devices and we can catch that earlier with an explicit check. Signed-off-by: Alex Bennée --- tests/functional/test_aarch64_virt_gpu.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/functional/test_aarch64_virt_gpu.py b/tests/functional/test_aarch64_virt_gpu.py index 06093c6b60..c9463d7285 100755 --- a/tests/functional/test_aarch64_virt_gpu.py +++ b/tests/functional/test_aarch64_virt_gpu.py @@ -91,6 +91,9 @@ def _run_virt_gpu_test(self, gpu_device, weston_cmd, weston_pattern): @skipIfMissingCommands('zstd') def test_aarch64_virt_with_vulkan_gpu(self): + + self.require_device('virtio-gpu-gl-pci') + gpu_device = "virtio-gpu-gl-pci,hostmem=4G,blob=on,venus=on" weston_cmd = "vkmark -b:duration=1.0" weston_pattern = "vkmark Score" From patchwork Wed Feb 19 15:00:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 866442 Delivered-To: patch@linaro.org Received: by 2002:a5d:64e6:0:b0:38f:210b:807b with SMTP id g6csp2116328wri; Wed, 19 Feb 2025 07:02:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWtqvoxRnpN1vLCODOJT29kTHDHqHbcBlZM4d1hp8rB5NeftFCaQpYZs2VAZTrhvixduptDPA==@linaro.org X-Google-Smtp-Source: AGHT+IHM3MyGJrs7O5RxFIPMfQTG2ob+9M6XsUrmUK0J1+QmW3hAfO5VS6ulMjQQAIr/OhtCd/Yy X-Received: by 2002:a5d:4c91:0:b0:38d:e572:4dc2 with SMTP id ffacd0b85a97d-38f340676c6mr15176571f8f.40.1739977328014; Wed, 19 Feb 2025 07:02:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739977328; cv=none; d=google.com; s=arc-20240605; b=BsBMrE8mRz0hdFBrnLmEa+CbPgsIMOczV6zG7hyRW3qYhMAiUpzjCcTCrVA0Ptyj33 c2Xoy/U+G4yCA/gX73Iqw22Is+TziX8EUph9hcfL1Sc+RlGFSkrj8g4YP2LQKcetGEg6 06KwC1h9yHVSHEo2AHLvvEVetItlQ1RH1E2AcFVLWHxOiC8unyFgNafZOdAAoTWfH52m RUMwwgGUrz3GhL30Jd+DkFr2zSqBIswECeI/vYmCPCon9khqsYXUt9Bn9Ys7C+ngHkqT Zl0XOkwzjTnhPIEjAkPoo7Vp3TZBlXLX2UxS71Ef/1c4WznM2UP/hsajhBC4kH8KMmi4 3tIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=poeknxWi50g64JDj5A78TCHXdGRSIYJF5+UH+RyZNs4=; fh=YBDleYEC9XVOaRydO/TqG0NKalnvaifQVdszAjGAIkw=; b=Z3IdNkTVizAoFyjl7Yc76tS/qLR8D1QGG6eiTwL62c/HDJwmqwxlwiX2g1tuYp7xpn hbZSULhhQirCyW83VWd4RfyUJ/7v8FpQxdYpu1qfm9lTpdPfcOPP4uZXiaIYoX7/yGnK 9yUDWpFVuDJ8hPh6eBE83DriK6DKseg2+yMPsya9S2gaUvB6HS//1EHfoeINQ1zOSpm0 WALuApLoS3sliyoJaIntJh3kNIhPJ4R84y43CJa/iO5n08kWBSyB1I7yyFyulqH60m5L WveyOR9v35958HyRY9pgbUYqIDKyWLfiHmlyvnPsyZEgGufVGOfpRrP/B6YOjOGoKDSY atMg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQLm1A1b; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 5b1f17b1804b1-43981f229c4si51751935e9.146.2025.02.19.07.02.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Feb 2025 07:02:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQLm1A1b; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tklYv-0004XQ-54; Wed, 19 Feb 2025 10:00:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tklYg-0004PH-Po for qemu-devel@nongnu.org; Wed, 19 Feb 2025 10:00:20 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tklYc-00013l-E9 for qemu-devel@nongnu.org; Wed, 19 Feb 2025 10:00:18 -0500 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-aaf900cc7fbso1028755166b.3 for ; Wed, 19 Feb 2025 07:00:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739977213; x=1740582013; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=poeknxWi50g64JDj5A78TCHXdGRSIYJF5+UH+RyZNs4=; b=DQLm1A1b0P/WmzEQ9fhNRs4u7yf1vLOB7EhJlwVGOnHmvoN+qmRU8+H8867nRPm0CV MQyOwRkrhwXVYDfX0pt4k/CnkPOKx+bmRb7aDdNLsb7R+Al7W/5cXVFFt+sCLMFxymuS E6EScUh00YkHPA7ppagaup67mnTepcCBiVjH9QVUFXOgikorpLEGs5K9yqxxkVKJLOus aBdMbbE4wCZlg1gjoEPFatesT65GUaKm6y6l51ilnWI5ErRR7QAP2TIDs7C81m/OgnXM sCd9ENuCLr949JSBgakLjbxhuTMmtcdSIyjdeeZYUeDGHP83TR27ygITc12AkeO096VJ jPhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739977213; x=1740582013; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=poeknxWi50g64JDj5A78TCHXdGRSIYJF5+UH+RyZNs4=; b=bkWDtikAVfvgAarsC3rn9/x6+/4g8+Lsyuj8kTXAszrwaqfZZa6hDP6IUSnvWZHlY9 i/Wz3eMlazwB0+1vXFgsDpKiAKSgo4HctG0pC1jKubbmxboDZ1vY/tRaPoUkJMfUm/fz uMjzmzaXiFDHtBlp6EHUq6IE5MQFqHlD/jG+xJCKJ+Ou3uzOsoztGIRTWyQNzIKqaGtw S8hxvZlOaUiq8Ni8aG8Uaj7pC1QMSdxvJVhaRX++PqmKPxFhGQpq+44wUSzhGQKtTXjR C4M8BQqKqp1EyM+2/8WGSmGKXE+NtvkdnLVRUatjEfAchl5rb3HfmnTiCtDsKEL6HWKD EZJQ== X-Gm-Message-State: AOJu0YwWtSs4bT4K5bg9CnJ3WGf5HO+pCOwbePN1cIxrhYFVz705vtNb Zqhpj/TJXU9BKEto1ALVy/WkqW9zj4Xusqe2b4Nt+puldStIW8tHtqtZyz5V2viQoTn4eGwoLq7 VouQ= X-Gm-Gg: ASbGnctwtlkMgGiD/eG6TUSWxWyMDWx4eIkirMSSZg0Dh2W9lNe6bZIJH/8ub4LRN8P pKevKD0HEguNhFVrRs2H0Qz1/pmVRqaY8rCmjdlEl+fAvdKICJUFECuAr9L2oLhw+yHSjYsieh/ BzLvmOVwQe/PouBC9KgErTjO7u3HxPTOhK0EAGTXER5QjuLd4m0rv118NWwHJkzFCg4nh8CYCZc N+QgXPbQ8z1ZkDiW/KN8kxxF5cV+yXB8EOXxdgzy21iVXxg0NPvI6iUwK4795IYLBscuxZMY7bB begU4TcprN7haIifgQ== X-Received: by 2002:a17:907:9709:b0:ab7:d87f:665b with SMTP id a640c23a62f3a-abb70de2845mr1743803266b.48.1739977212695; Wed, 19 Feb 2025 07:00:12 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-abb7e29be33sm843467366b.94.2025.02.19.07.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2025 07:00:10 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 76844619C8; Wed, 19 Feb 2025 15:00:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= Subject: [PATCH 4/4] tests/functional: expand tests to cover virgl Date: Wed, 19 Feb 2025 15:00:09 +0000 Message-Id: <20250219150009.1662688-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250219150009.1662688-1-alex.bennee@linaro.org> References: <20250219150009.1662688-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x631.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Add two more test modes using glmark2-wayland to exercise the OpenGL pass-through modes with virgl. Virgl can run with or without the hostmem blob support. We might want to eventually add more directed tests and individual features later on but the glmark/vkmark tests are a good general smoke test for accelerated 3D. Signed-off-by: Alex Bennée --- tests/functional/test_aarch64_virt_gpu.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/functional/test_aarch64_virt_gpu.py b/tests/functional/test_aarch64_virt_gpu.py index c9463d7285..7a8471d1ca 100755 --- a/tests/functional/test_aarch64_virt_gpu.py +++ b/tests/functional/test_aarch64_virt_gpu.py @@ -89,6 +89,26 @@ def _run_virt_gpu_test(self, gpu_device, weston_cmd, weston_pattern): full_cmd = f"weston -B headless --renderer gl --shell kiosk -- {weston_cmd}" exec_command_and_wait_for_pattern(self, full_cmd, weston_pattern) + @skipIfMissingCommands('zstd') + def test_aarch64_virt_with_virgl_gpu(self): + + self.require_device('virtio-gpu-gl-pci') + + gpu_device = "virtio-gpu-gl-pci" + weston_cmd = "glmark2-wayland -b:duration=1.0" + weston_pattern = "glmark2 Score" + self._run_virt_gpu_test(gpu_device, weston_cmd, weston_pattern) + + @skipIfMissingCommands('zstd') + def test_aarch64_virt_with_virgl_blobs_gpu(self): + + self.require_device('virtio-gpu-gl-pci') + + gpu_device = "virtio-gpu-gl-pci,hostmem=4G,blob=on" + weston_cmd = "glmark2-wayland -b:duration=1.0" + weston_pattern = "glmark2 Score" + self._run_virt_gpu_test(gpu_device, weston_cmd, weston_pattern) + @skipIfMissingCommands('zstd') def test_aarch64_virt_with_vulkan_gpu(self):