You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
3.4 KiB
84 lines
3.4 KiB
From ac7bc252920e687868b62596ac4b7b41abc228ff Mon Sep 17 00:00:00 2001
|
|
Message-ID: <ac7bc252920e687868b62596ac4b7b41abc228ff.1772815313.git.jdenemar@redhat.com>
|
|
From: Andrea Bolognani <abologna@redhat.com>
|
|
Date: Thu, 22 Jan 2026 14:42:34 +0100
|
|
Subject: [PATCH] tests: Add firmware-auto-efi-varstore-q35
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
This test case demonstrates how to explicitly opt into using
|
|
the uefi-vars device for an x86_64 guest.
|
|
|
|
Normally the firmware autoselection process will pick a UEFI
|
|
build that is loaded via pflash, but by including the <varstore>
|
|
element in the input XML we can tell the QEMU driver that we
|
|
want want the uefi-vars device to be used instead.
|
|
|
|
Currently this results in an error, because the firmware
|
|
autoselection algorithm doesn't yet know how to properly handle
|
|
the scenario. A future commit will address this and make things
|
|
work as expected.
|
|
|
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
(cherry picked from commit d8e0e9c3cecbcc11f84b31d1ba50344ac1f2749d)
|
|
|
|
https://issues.redhat.com/browse/RHEL-82645
|
|
|
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
---
|
|
...are-auto-efi-varstore-q35.x86_64-latest.err | 1 +
|
|
.../firmware-auto-efi-varstore-q35.xml | 18 ++++++++++++++++++
|
|
tests/qemuxmlconftest.c | 1 +
|
|
3 files changed, 20 insertions(+)
|
|
create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-varstore-q35.x86_64-latest.err
|
|
create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-varstore-q35.xml
|
|
|
|
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-varstore-q35.x86_64-latest.err b/tests/qemuxmlconfdata/firmware-auto-efi-varstore-q35.x86_64-latest.err
|
|
new file mode 100644
|
|
index 0000000000..b45d304221
|
|
--- /dev/null
|
|
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-varstore-q35.x86_64-latest.err
|
|
@@ -0,0 +1 @@
|
|
+Only one of NVRAM/varstore can be used
|
|
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-varstore-q35.xml b/tests/qemuxmlconfdata/firmware-auto-efi-varstore-q35.xml
|
|
new file mode 100644
|
|
index 0000000000..9cda95403e
|
|
--- /dev/null
|
|
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-varstore-q35.xml
|
|
@@ -0,0 +1,18 @@
|
|
+<domain type='kvm'>
|
|
+ <name>guest</name>
|
|
+ <uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
|
|
+ <memory unit='KiB'>1048576</memory>
|
|
+ <vcpu placement='static'>1</vcpu>
|
|
+ <os firmware='efi'>
|
|
+ <type arch='x86_64' machine='pc-q35-8.2'>hvm</type>
|
|
+ <varstore/>
|
|
+ </os>
|
|
+ <features>
|
|
+ <acpi/>
|
|
+ </features>
|
|
+ <devices>
|
|
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
|
|
+ <controller type='usb' model='none'/>
|
|
+ <memballoon model='none'/>
|
|
+ </devices>
|
|
+</domain>
|
|
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
|
|
index 4c97dac317..b82ba0f205 100644
|
|
--- a/tests/qemuxmlconftest.c
|
|
+++ b/tests/qemuxmlconftest.c
|
|
@@ -1665,6 +1665,7 @@ mymain(void)
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi-nvram-file");
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi-nvram-network-nbd");
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi-nvram-network-iscsi");
|
|
+ DO_TEST_CAPS_LATEST_PARSE_ERROR("firmware-auto-efi-varstore-q35");
|
|
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi-format-loader-qcow2");
|
|
DO_TEST_CAPS_LATEST_PARSE_ERROR("firmware-auto-efi-format-loader-qcow2-rom");
|
|
--
|
|
2.53.0
|
|
|