[PATCH 16/29] tests: Add firmware-manual-efi-qemuvars-aarch64

Andrea Bolognani via Devel posted 29 patches 1 week, 3 days ago
[PATCH 16/29] tests: Add firmware-manual-efi-qemuvars-aarch64
Posted by Andrea Bolognani via Devel 1 week, 3 days ago
This test case demonstrates how to manually configure an aarch64
guest to use the uefi-vars device.

It currently fails because the QEMU driver does not yet recognize
the firmware type as EFI, and so rejects the attempt to use ACPI
together with it. That will change in a future commit.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 ...al-efi-qemuvars-aarch64.aarch64-latest.err |  1 +
 .../firmware-manual-efi-qemuvars-aarch64.xml  | 19 +++++++++++++++++++
 tests/qemuxmlconftest.c                       |  1 +
 3 files changed, 21 insertions(+)
 create mode 100644 tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-aarch64.aarch64-latest.err
 create mode 100644 tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-aarch64.xml

diff --git a/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-aarch64.aarch64-latest.err b/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-aarch64.aarch64-latest.err
new file mode 100644
index 0000000000..4fe79bdacf
--- /dev/null
+++ b/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-aarch64.aarch64-latest.err
@@ -0,0 +1 @@
+unsupported configuration: ACPI requires UEFI on this architecture
diff --git a/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-aarch64.xml b/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-aarch64.xml
new file mode 100644
index 0000000000..28e3343eec
--- /dev/null
+++ b/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-aarch64.xml
@@ -0,0 +1,19 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt-4.0'>hvm</type>
+    <loader type='rom'>/usr/share/edk2/aarch64/QEMU_EFI.qemuvars.fd</loader>
+    <nvram format='json'>/path/to/guest.json</nvram>
+  </os>
+  <features>
+    <acpi/>
+  </features>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='usb' model='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
index 1e20957656..fa768df1a2 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -1561,6 +1561,7 @@ mymain(void)
                                   ARG_END);
 
     DO_TEST_CAPS_LATEST_FAILURE("firmware-manual-efi-qemuvars-q35");
+    DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("firmware-manual-efi-qemuvars-aarch64", "aarch64");
 
     /* Make sure all combinations of ACPI and UEFI behave as expected */
     DO_TEST_CAPS_ARCH_LATEST("firmware-manual-efi-acpi-aarch64", "aarch64");
-- 
2.52.0