From: "Alex Bennée" <alex.bennee@linaro.org>
To: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Cc: qemu-devel@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
qemu-arm@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
"Kyle Evans" <kevans@freebsd.org>,
"Brad Smith" <brad@comstyle.com>, "Warner Losh" <imp@bsdimp.com>
Subject: Re: [PATCH v2 7/7] tests/functional: add Arm VBSA uefi conformance test
Date: Thu, 26 Feb 2026 20:48:09 +0000 [thread overview]
Message-ID: <87y0kfxmd2.fsf@draig.linaro.org> (raw)
In-Reply-To: <a42315f0-e84b-46b3-9fac-299f9894de16@linaro.org> (Pierrick Bouvier's message of "Thu, 26 Feb 2026 11:26:17 -0800")
Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
> On 2/26/26 10:53 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.
>> Message-ID: <20260213154859.1551283-7-alex.bennee@linaro.org>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> v2
>> - use the VBSA prebuilt shell
>> - fail the test if we see FAILED in the console stream
>> ---
>> 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..3da06904ea9
>> --- /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 <alex.bennee@linaro.org>
>> +#
>> +# 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='FAILED',
>> + vm=vm)
>> +
>> + 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/sysarch-acs/raw/refs/heads/main'
>> + '/prebuilt_images/VBSA/v25.12_VBSA_0.7.0/Shell.efi',
>> + 'e526604f0d329b481c6a1f62f7a0db8ea24ce8178b2c6abda8e247425f38775c')
>> +
>> + 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.')
>> +
>
> Same comment than on v1:
> https://lore.kernel.org/qemu-devel/5befbd0e-5f0f-41c4-99a7-1cf17bfe5454@linaro.org/
>
> In case a failing output would not contain any string easy to
> identify, I'm fine with current patch, but since I didn't receive any
> answer on previous series, I'm not sure if it has been tried.
That's why I added the FAILED catch.
>
> Regards,
> Pierrick
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2026-02-26 20:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 18:52 [PATCH v2 0/7] testing/next: libvirt-ci, tests/vm and vbsa functional test Alex Bennée
2026-02-26 18:52 ` [PATCH v2 1/7] tests/docker: upgrade most non-lcitool debian tests to debian 13 Alex Bennée
2026-02-26 18:52 ` [PATCH v2 2/7] tests/docker: migrate legacy-test-cross compilers to trixie Alex Bennée
2026-02-27 9:40 ` Thomas Huth
2026-02-26 18:52 ` [PATCH v2 3/7] tests/vm: bump OpenBSD to the current 7.8 release Alex Bennée
2026-02-26 18:52 ` [PATCH v2 4/7] tests/vm: remove unused import Alex Bennée
2026-02-26 18:53 ` [PATCH v2 5/7] tests/vm: fix interactive boot Alex Bennée
2026-02-26 18:53 ` [PATCH v2 6/7] tests/vm: build openbsd from lcitool data (!567) Alex Bennée
2026-02-26 18:53 ` [PATCH v2 7/7] tests/functional: add Arm VBSA uefi conformance test Alex Bennée
2026-02-26 19:18 ` Mohamed Mediouni
2026-02-26 19:26 ` Pierrick Bouvier
2026-02-26 20:48 ` Alex Bennée [this message]
2026-02-26 21:45 ` Pierrick Bouvier
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=87y0kfxmd2.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=brad@comstyle.com \
--cc=imp@bsdimp.com \
--cc=kevans@freebsd.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.