Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87F54E9A050 for ; Thu, 19 Feb 2026 16:40:35 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vt746-00019w-37; Thu, 19 Feb 2026 11:39:46 -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 1vt744-00019R-Or for qemu-arm@nongnu.org; Thu, 19 Feb 2026 11:39:44 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vt741-0001EB-MT for qemu-arm@nongnu.org; Thu, 19 Feb 2026 11:39:43 -0500 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-823210d1d8eso669304b3a.1 for ; Thu, 19 Feb 2026 08:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1771519180; x=1772123980; darn=nongnu.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=RZoB1oBYOGQngrzKIYH38IoVId5kzTyR78mCQhk+Iuk=; b=WoV3jTV6HgFERl+Ni/3XmBlK+jlUsZ+z3clDQly8vvppa2bQwGpOSsFIDk4FJv/Ehv 0mDDvBLbEAKPc2LJC12Uje6JR3p6n4BhkyoQIQSoQODkI2grEIznnYys767ixtmUAJQM pRtUnxijBDViFq6NW2DOPC2Ujl0F3k/A3jK+cWyDxaQJRl4Zk4KIHYSW01tp8yPjwsqK ipzug9SOIKDddMFH1pctc4HlDOSBCT7sL+uHGNIrqmq42rlo3uatRgueITtwOR+2Rc9C bswwplfV7OkqgPaQ2FvgrL9WEmgc7YMbiUbR9Z6t+lwtt//Sc5NcJmq5cfzDcXeCGkC3 H4iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771519180; x=1772123980; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RZoB1oBYOGQngrzKIYH38IoVId5kzTyR78mCQhk+Iuk=; b=SKoewO24DftFgaogv3E9HlnUbvnCH/76yroRKE6AYtZ/+/lxIsjH3DH+CNxjSiUmcr jag3Tu8fU4y3b5hzZcITDNBcg5a3On3hLN1e0GsA4PfgNNJeNcEXGjhdgt0LZKp/gfhA 30+ePQbp+JI7Ba+NAt4uWBCg915UvNuZ4VOmxeX0ZCSeEFXi1FC4i5jLX87UJByGa2GN 6cOHdp5Hgc8Dh3uUZRu1nX3tBonO3Y6Bk89bVR6zPOhLfJAOypxuZTV11kfMcCoEsXes Oawv+Wk5RxaU5JDtZnKlW1rHgzbAFAmdUFZeAvnUiSNO3ZVPKahVMdUSD6Sv7piL/QEf 6rkA== X-Forwarded-Encrypted: i=1; AJvYcCVK13DxvPnCHaTkpokaMme34End7YgizsM5tyJKkeRIuyiPw+3XSIju7yUfi7Re1N4EWrc9LACAlg==@nongnu.org X-Gm-Message-State: AOJu0YzO9gI9dIKHAj/JpPgDyxWo+R+P2lG/AALbasIwEuGJ7uTBIN8P cXpA009OctkLaYsb3VR321dpHbZTYboGeZapQlYstjY34DSUUnA74SY+dXRnbijMgviR0DP1Eki YQDkK X-Gm-Gg: AZuq6aJfHk5Fb6sZVDEF5wwBzNRWoOXhqQDDhQf2F8jJswgCOC0J/LLVP/x7CIaz8lU UgFHN2xLkUb7IEOdB+mHxqFKin+vELNwXWc+/VbOajevR91bFxl1kW+AWt3MkcMScrcBW2cHcDk vbDEfUv/vcI2bQaXShDfjeM2oTJJkXTmZ4dV/M0eVFa0HY5gf9oVuGjdupINK/blrw0lOFOf/+T 8krRaAfPhl71A0N6NHtWnYJKKNhDrH3dRhOIehNZFgPLtt/tSxsiVKfvlh87t8iFFT/VGx0Okc3 qkjLVheqZH9xcQcfvxJAC+sLSIuhO2PkNt/oCW80tAhsIs6N+HAjmN7ud2R9KHc2VOOdhJZw4Gf CG1fTgJWtSXLQ6Kyuta+RKfZEfsj1KbljYAdl4bI02LDk/d1uUmD44PgRtQIL0OBxzOgMBbY/lk JfN2o1XVCcElwebjIS6mtw/G8Q/pecPD78IB8LXV3E83oZwTRtAF5zRlPqDQLfHeoA4z6z X-Received: by 2002:a05:6a00:2e0d:b0:81f:4f05:4fe6 with SMTP id d2e1a72fcca58-824d94d001amr15793574b3a.1.1771519179418; Thu, 19 Feb 2026 08:39:39 -0800 (PST) Received: from [192.168.1.87] (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-824c6bb410csm19824324b3a.61.2026.02.19.08.39.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Feb 2026 08:39:39 -0800 (PST) Message-ID: <5befbd0e-5f0f-41c4-99a7-1cf17bfe5454@linaro.org> Date: Thu, 19 Feb 2026 08:39:39 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/6] tests/functional: add Arm VBSA uefi conformance test Content-Language: en-US To: =?UTF-8?Q?Alex_Benn=C3=A9e?= Cc: qemu-devel@nongnu.org, Brad Smith , Warner Losh , =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Kyle Evans , Peter Maydell , qemu-arm@nongnu.org References: <20260213154859.1551283-1-alex.bennee@linaro.org> <20260213154859.1551283-7-alex.bennee@linaro.org> <82942191-d0a6-4393-846d-b04e3cb009ce@linaro.org> <87o6ll6mso.fsf@draig.linaro.org> From: Pierrick Bouvier Autocrypt: addr=pierrick.bouvier@linaro.org; keydata= xsDNBGK9dgwBDACYuRpR31LD+BnJ0M4b5YnPZKbj+gyu82IDN0MeMf2PGf1sux+1O2ryzmnA eOiRCUY9l7IbtPYPHN5YVx+7W3vo6v89I7mL940oYAW8loPZRSMbyCiUeSoiN4gWPXetoNBg CJmXbVYQgL5e6rsXoMlwFWuGrBY3Ig8YhEqpuYDkRXj2idO11CiDBT/b8A2aGixnpWV/s+AD gUyEVjHU6Z8UervvuNKlRUNE0rUfc502Sa8Azdyda8a7MAyrbA/OI0UnSL1m+pXXCxOxCvtU qOlipoCOycBjpLlzjj1xxRci+ssiZeOhxdejILf5LO1gXf6pP+ROdW4ySp9L3dAWnNDcnj6U 2voYk7/RpRUTpecvkxnwiOoiIQ7BatjkssFy+0sZOYNbOmoqU/Gq+LeFqFYKDV8gNmAoxBvk L6EtXUNfTBjiMHyjA/HMMq27Ja3/Y73xlFpTVp7byQoTwF4p1uZOOXjFzqIyW25GvEekDRF8 IpYd6/BomxHzvMZ2sQ/VXaMAEQEAAc0uUGllcnJpY2sgQm91dmllciA8cGllcnJpY2suYm91 dmllckBsaW5hcm8ub3JnPsLBDgQTAQoAOBYhBGa5lOyhT38uWroIH3+QVA0KHNAPBQJivXYM AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEH+QVA0KHNAPX58L/1DYzrEO4TU9ZhJE tKcw/+mCZrzHxPNlQtENJ5NULAJWVaJ/8kRQ3Et5hQYhYDKK+3I+0Tl/tYuUeKNV74dFE7mv PmikCXBGN5hv5povhinZ9T14S2xkMgym2T3DbkeaYFSmu8Z89jm/AQVt3ZDRjV6vrVfvVW0L F6wPJSOLIvKjOc8/+NXrKLrV/YTEi2R1ovIPXcK7NP6tvzAEg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kQpZhCiLUK7DrA97xA1OT1bJJYkC3y4seo 0VHOnZTpnOyZ+8Ejs6gcMiEboFHEEt9P+3mrlVJL/cHpGRtg0ZKJ4QC8UmCE3arzv7KCAc+2 dRDWiCoRovqXGE2PdAW8788qH5DEXnwfzDhnCQ9Eot0Eyi41d4PWI8TWZFi9KzGXJO82O9gW 5SYuJaKzCAgNeAy3gUVUUPrUsul1oe2PeWMFUhWKrqko0/Qo4HkwTZY6S16drTMncoUahSAl X4Z3BbSPXPq0v1JJBYNBL9qmjULEX+NbtRd3v0OfB5L49sSAC2zIO8S9Cufiibqx3mxZTaJ1 ZtfdHNZotF092MIH0IQC3poExQpV/WBYFAI= In-Reply-To: <87o6ll6mso.fsf@draig.linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@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-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org On 2/19/26 2:38 AM, Alex Bennée wrote: > Pierrick Bouvier writes: > >> On 2/13/26 7:48 AM, Alex Bennée wrote: >>> The VBSA test is a subset of the wider Arm architecture compliance >>> suites (ACS) which validate machines meet particular minimum set of >>> requirements. The VBSA is for virtual machines so it makes sense we >>> should check the -M virt machine is compliant. >>> Fortunately there are prebuilt binaries published via github so all >>> we >>> need to do is build an EFI partition and place things in the right >>> place. >>> There are some additional Linux based tests which are left for >>> later. >>> Signed-off-by: Alex Bennée >>> --- >>> tests/functional/aarch64/meson.build | 1 + >>> tests/functional/aarch64/test_virt_vbsa.py | 99 ++++++++++++++++++++++ >>> 2 files changed, 100 insertions(+) >>> create mode 100755 tests/functional/aarch64/test_virt_vbsa.py >>> diff --git a/tests/functional/aarch64/meson.build >>> b/tests/functional/aarch64/meson.build >>> index 49eca120589..7ea8c22b048 100644 >>> --- a/tests/functional/aarch64/meson.build >>> +++ b/tests/functional/aarch64/meson.build >>> @@ -46,6 +46,7 @@ tests_aarch64_system_thorough = [ >>> 'tuxrun', >>> 'virt', >>> 'virt_gpu', >>> + 'virt_vbsa', >>> 'xen', >>> 'xlnx_versal', >>> ] >>> diff --git a/tests/functional/aarch64/test_virt_vbsa.py b/tests/functional/aarch64/test_virt_vbsa.py >>> new file mode 100755 >>> index 00000000000..53cabf9d6c5 >>> --- /dev/null >>> +++ b/tests/functional/aarch64/test_virt_vbsa.py >>> @@ -0,0 +1,99 @@ >>> +#!/usr/bin/env python3 >>> +# >>> +# Functional test that runs the Arm VBSA conformance tests. >>> +# >>> +# Copyright (c) 2026 Linaro Ltd. >>> +# >>> +# Author: >>> +# Alex Bennée >>> +# >>> +# SPDX-License-Identifier: GPL-2.0-or-later >>> + >>> +import shutil >>> +from subprocess import check_call, DEVNULL >>> + >>> +from qemu_test import QemuSystemTest, Asset >>> +from qemu_test import wait_for_console_pattern, get_qemu_img, skipIfMissingCommands >>> +from qemu_test import exec_command_and_wait_for_pattern as ec_and_wait >>> + >>> + >>> +@skipIfMissingCommands("mformat", "mcopy", "mmd") >>> +class Aarch64VirtMachine(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) >>> + >> >> May be worth adding a comment with README url: >> https://github.com/ARM-software/sysarch-acs/blob/main/docs/vbsa/README.md >> >>> + ASSET_VBSA_EFI = Asset('https://github.com/ARM-software/sysarch-acs/raw/refs/heads/main' >>> + '/prebuilt_images/VBSA/v25.12_VBSA_0.7.0/Vbsa.efi', >>> + '80f37d2fb86d152d95dec4d05ff099c9e47ee8a89314268e08056b0e1359e1fa') >>> + >>> + ASSET_BSA_SHELL = Asset('https://github.com/ARM-software/bsa-acs/raw/refs/heads/main/' >>> + 'prebuilt_images/BSA_DT/v20.05_05_ALPHA/Shell.efi', >>> + '763e7b293fa9d1582153ea8fd0cf60e2a7a87d092d35d342cf9b3b697f47b588') >>> + >>> + def test_aarch64_vbsa_uefi_tests(self): >>> + """ >>> + Launch the UEFI based VBSA test from an EFI file-system >>> + """ >>> + >>> + self.vm.set_console() >>> + >>> + # virt machine wi >>> + self.set_machine('virt') >>> + self.vm.add_args('-M', 'virt,gic-version=max,virtualization=on') >>> + self.vm.add_args('-cpu', 'max','-m', '1024') >>> + >>> + # We will use the QEMU firmware blobs to boot >>> + code_path = self.build_file('pc-bios', 'edk2-aarch64-code.fd') >>> + vars_source = self.build_file('pc-bios', 'edk2-arm-vars.fd') >>> + vars_path = self.scratch_file('vars.fd') >>> + shutil.copy(vars_source, vars_path) >>> + >>> + self.vm.add_args('-drive', f'if=pflash,format=raw,readonly=on,file={code_path}') >>> + self.vm.add_args('-drive', f'if=pflash,format=raw,file={vars_path}') >>> + >>> + # Build an EFI FAT32 file-system for the UEFI tests >>> + vbsa_efi = self.ASSET_VBSA_EFI.fetch() >>> + bsa_shell = self.ASSET_BSA_SHELL.fetch() >>> + >>> + img_path = self.scratch_file('vbsa.img') >>> + qemu_img = get_qemu_img(self) >>> + check_call([qemu_img, 'create', '-f', 'raw', img_path, '64M'], >>> + stdout=DEVNULL, stderr=DEVNULL) >>> + >>> + check_call(['mformat', '-i', img_path, '-v', 'VBSA', '::'], >>> + stdout=DEVNULL, stderr=DEVNULL) >>> + >>> + check_call(['mmd', '-i', img_path, '::/EFI'], >>> + stdout=DEVNULL, stderr=DEVNULL) >>> + >>> + check_call(['mmd', '-i', img_path, '::/EFI/BOOT'], >>> + stdout=DEVNULL, stderr=DEVNULL) >>> + >>> + check_call(['mcopy', '-i', img_path, bsa_shell, '::/EFI/BOOT/BOOTAA64.EFI'], >>> + stdout=DEVNULL, stderr=DEVNULL) >>> + >>> + check_call(['mcopy', '-i', img_path, vbsa_efi, '::/Vbsa.efi'], >>> + stdout=DEVNULL, stderr=DEVNULL) >>> + >>> + self.vm.add_args('-drive', f'file={img_path},format=raw,if=none,id=drive0') >>> + self.vm.add_args('-device', 'virtio-blk-pci,drive=drive0') >>> + >>> + self.vm.launch() >>> + >>> + # wait for EFI prompt >>> + self.wait_for_console_pattern('Shell>') >>> + >>> + # Start the VBSA tests >>> + ec_and_wait(self, "FS0:Vbsa.efi", 'VBSA Architecture Compliance Suite') >>> + >>> + # could we parse the summary somehow? >>> + >>> + self.wait_for_console_pattern('VBSA tests complete. Reset the system.') >>> + >> >> What happens in case there is an error, does the test app hangs, or >> still exit with message under? > > The failures I had were generally hangs but ideally we would parse the > the summary data and generate our response based on that. Unfortunately > that is at odds with the current send/wait for pass/fail message > infrastructure. > I'm not sure you need something so complicated, all we needed is to return an error if any test is failing,(assuming they all pass now?). I don't know the output format, but let's imagine a failure is reported with "not ok ... details ...", all you need to modify is the final wait_for_console_pattern: wait_for_console_pattern(self, 'VBSA tests complete. Reset the system.', failure_message='not ok') So it will catch any failure without having to parse anything. Regards, Pierrick