From nobody Fri Apr 4 06:00:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1740578859; cv=none; d=zohomail.com; s=zohoarc; b=Daq1HpmJ+JrWQuFRgDXZFWpMVxjRrwZZnrCuA+PX2mFFd+bI8K/ZqWEtdA5e14Jop1BcKj0qWq6sS3MlgXwsZ5rrS9a/KtDLWK7+QDprxu+udiIHFOO2AHHCb0+mjI/HqPwXFZbGHWkIvfVfNdYo99AZNfoQKxSepcg1bPPMen4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1740578859; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tUhUbtMcQJqw0qeJKuxjiQtAZ+OPms82YWwNVqH6kds=; b=a8uBi1xoCuMDkYPDGDbiyD26v0i1azIvAkcnFSf2Wqreou1vQXCOQNonatul2Pi1CFLg9FovJqi4vNApyAYpPFkJSZtOnpB6N093pHmJIXAhC5ss8geoAdPMyRkE6hBybwRF+5eIk89OizqIVe/AH+ZM6c/e4nFE5e/3xexTIzw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1740578859757543.955578313212; Wed, 26 Feb 2025 06:07:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tnI11-000148-OD; Wed, 26 Feb 2025 09:03:59 -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 1tnI0v-0000wF-KH for qemu-devel@nongnu.org; Wed, 26 Feb 2025 09:03:54 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tnI0r-0005f0-Dt for qemu-devel@nongnu.org; Wed, 26 Feb 2025 09:03:52 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-38f6475f747so3272353f8f.3 for ; Wed, 26 Feb 2025 06:03:48 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-390cd8fc9b3sm5710878f8f.97.2025.02.26.06.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2025 06:03:44 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 196F15FC78; Wed, 26 Feb 2025 14:03:44 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740578628; x=1741183428; 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=tUhUbtMcQJqw0qeJKuxjiQtAZ+OPms82YWwNVqH6kds=; b=Dp8VN2Fa8gmm9MP4uyh3b3dQVwnjWLbpGpOj/7HGgWjk/Dm9k535UL2JEjipmMDeXK +RytYEZ/CHKKGafBTppr3LTE/1IkbqQvbH5dhQV6K0MvxujJ+eB0xRrPW4+LqBHI1Pg0 3EjcF6za0+Ft/sTnP0+j3GAbuHQzuspy40kqigdiBK0uDhUlQEsIFrt2blxHqWkGd+M6 p/Xw4i8fZkK5pjslCxb8xKX7jOQLjHDqMn/GkfQwjJDASiI+KqCzXI+5kCTVoX3q4IQf 6PfvGvanQgFIbQuB2dTSamrG7Sj5XX94zrHexorKlvnKtN6UaRuOtG3DfUHGXbl6d0fW emRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740578628; x=1741183428; 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=tUhUbtMcQJqw0qeJKuxjiQtAZ+OPms82YWwNVqH6kds=; b=WYmutlTMkKTswOFxqf9p2uTYwUNMUZx+HV7FzX6aPAC4kl3a9ufCTHI+4n0gdJkeTE ulhO1V0O4WkWTvjAFUai8DxzrW/g6TMx82gG/Gh5wzNwlWwbLjRSjmKH9iz3EGAuatm9 kcXK2rFnbdx/O29/ov6LQcVD52S1hm0IZASz5PnBgAdAoVssyzq/NZDlRMHDbw9Yw/Jk NfU1iByZ+jD8CLhcpw8nondRgEtD66D/JQzg3zhTjpsCNPGRTRp85bNmzvzd7puG1XkU AkHcg/ZTz9LLHhFsXaHIdzMLEaGb4ejJ9F04eySnJjNJX33tT1IDo7b5eidFlgn1F+A3 5W/Q== X-Gm-Message-State: AOJu0Yz1OgaDOQuTYS3BChOqDJMw1luAJpv8pOw5Fl7hk+xkdPMlk5zu Qb299Tnd/Ngs6xXbNFWa+A9XpQC0zDousO8gzwuCD/0QPmjwb3EPGmx5OYHg3wU= X-Gm-Gg: ASbGncu7MbX15eYVvie2xkdwu0dI97YoRBr3Diw/iTjjldyVc0XHsFc2/7Sc8C885mH N7ZxQeSreQXDgwGs7nVNDe1bmcvyqWAjFvx4QlL/s0+u4qC4QjYS3ByyCFNTr6bsxc1rzm78vMn 7ivnlENCqVvJGYDCcocxHcZ0EsCS3LJCReRudHoJ4ct87Nvob60Dq5dImDV4V8uNo36M3sCU9dh bwNQSEEm/lKwfsCWyMZEBPMgQRftweSWXqAeZJzoeB5JTBBdgHhhpSiYhdO0a254AXb48fN+PQ9 TuczLVfNyV7CuufGX9PLO5MjSejh X-Google-Smtp-Source: AGHT+IHoS4tSPp+i6qS/7to7tqxCd/HEXqRftOyybB0zjpC5f8Xunz69CNK0iFeMOlDSF1N9Fnyl3g== X-Received: by 2002:a5d:47ac:0:b0:38f:516b:5429 with SMTP id ffacd0b85a97d-38f6e96738amr22428153f8f.25.1740578627605; Wed, 26 Feb 2025 06:03:47 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Peter Maydell , Kyle Evans , Eduardo Habkost , Alexandre Iooss , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , Mahmoud Mandour , Paolo Bonzini , Li-Wen Hsu , Riku Voipio , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Warner Losh , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Ed Maste , Thomas Huth Subject: [PATCH 02/25] tests/functional: factor out common code in gpu test Date: Wed, 26 Feb 2025 14:03:20 +0000 Message-Id: <20250226140343.3907080-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250226140343.3907080-1-alex.bennee@linaro.org> References: <20250226140343.3907080-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1740578861363019000 In preparation for handling more tests split out the common machine setup details from the test specific stuff. Signed-off-by: Alex Benn=C3=A9e Message-Id: <20250219150009.1662688-3-alex.bennee@linaro.org> Reviewed-by: Thomas Huth --- 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/t= est_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= =3DNone): 'rootfs.ext4.zstd', '792da7573f5dc2913ddb7c638151d4a6b2d028a4cb2afb38add513c1924bdad4') =20 - @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): =20 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=3D4G,blob=3Don,venus= =3Don") - self.vm.add_args("-display", "egl-headless") - self.vm.add_args("-display", "dbus,gl=3Don") + self.vm.add_args("-device", gpu_device) + for opt in ["egl-headless", "dbus,gl=3Don"]: + self.vm.add_args("-display", opt) + self.vm.add_args("-device", "virtio-blk-device,drive=3Dhd0") self.vm.add_args("-blockdev", "driver=3Draw,file.driver=3Dfile," @@ -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=3D/tmp') - exec_command_and_wait_for_pattern(self, - "weston -B headless " - "--renderer gl " - "--shell kiosk " - "-- vkmark -b:duration=3D1.0", - "vkmark Score") + full_cmd =3D 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 =3D "virtio-gpu-gl-pci,hostmem=3D4G,blob=3Don,venus=3Do= n" + weston_cmd =3D "vkmark -b:duration=3D1.0" + weston_pattern =3D "vkmark Score" + self._run_virt_gpu_test(gpu_device, weston_cmd, weston_pattern) =20 if __name__ =3D=3D '__main__': QemuSystemTest.main() --=20 2.39.5