]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Add firmware-auto-efi-loader-path
authorAndrea Bolognani <abologna@redhat.com>
Thu, 16 Mar 2023 18:10:29 +0000 (19:10 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 22 Mar 2023 12:49:53 +0000 (13:49 +0100)
This is identical to the existing
firmware-auto-efi-loader-path-nonstandard test case, but uses
a standard firmware path.

Right now the two test cases behave identically, but that's
going to change in the future.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxml2argvdata/firmware-auto-efi-loader-path.x86_64-latest.err [new file with mode: 0644]
tests/qemuxml2argvdata/firmware-auto-efi-loader-path.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c

diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-loader-path.x86_64-latest.err b/tests/qemuxml2argvdata/firmware-auto-efi-loader-path.x86_64-latest.err
new file mode 100644 (file)
index 0000000..3f90a88
--- /dev/null
@@ -0,0 +1 @@
+loader attribute 'readonly' cannot be specified when firmware autoselection is enabled
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-loader-path.xml b/tests/qemuxml2argvdata/firmware-auto-efi-loader-path.xml
new file mode 100644 (file)
index 0000000..3e0af7e
--- /dev/null
@@ -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-4.0'>hvm</type>
+    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
+  </os>
+  <features>
+    <acpi/>
+  </features>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' model='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
index 9a2950f8adc618e58ba00c272224f02c64bd8729..3175f59c4883459920e5b543ee3496bcc8c62673 100644 (file)
@@ -1116,6 +1116,7 @@ mymain(void)
     DO_TEST_CAPS_LATEST("firmware-auto-efi-nvram");
     DO_TEST_CAPS_LATEST("firmware-auto-efi-loader-secure");
     DO_TEST_CAPS_LATEST_PARSE_ERROR("firmware-auto-efi-loader-insecure");
+    DO_TEST_CAPS_LATEST_PARSE_ERROR("firmware-auto-efi-loader-path");
     DO_TEST_CAPS_LATEST_PARSE_ERROR("firmware-auto-efi-loader-path-nonstandard");
     DO_TEST_CAPS_LATEST("firmware-auto-efi-secboot");
     DO_TEST_CAPS_LATEST("firmware-auto-efi-no-secboot");