]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Add invalid firmware descriptor
authorAndrea Bolognani <abologna@redhat.com>
Thu, 29 Feb 2024 18:34:16 +0000 (19:34 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 4 Mar 2024 13:36:41 +0000 (14:36 +0100)
This is guaranteed to keep failing even after loongarch64
support is introduced.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemufirmwaredata/usr/share/qemu/firmware/93-invalid.json [new file with mode: 0644]
tests/qemufirmwaretest.c

diff --git a/tests/qemufirmwaredata/usr/share/qemu/firmware/93-invalid.json b/tests/qemufirmwaredata/usr/share/qemu/firmware/93-invalid.json
new file mode 100644 (file)
index 0000000..5e75b9a
--- /dev/null
@@ -0,0 +1,5 @@
+{
+    "firmware": {
+        "invalid": true
+    }
+}
index 3a3aedb1c73fca77954efdf56d24d2cc09cc3227..1b5baf5c5e277b402ac0ce56b1dc694f871de61d 100644 (file)
@@ -102,6 +102,7 @@ testFWPrecedence(const void *opaque G_GNUC_UNUSED)
         PREFIX "/share/qemu/firmware/60-edk2-ovmf-x64-inteltdx.json",
         PREFIX "/share/qemu/firmware/90-combined.json",
         PREFIX "/share/qemu/firmware/91-bios.json",
+        PREFIX "/share/qemu/firmware/93-invalid.json",
         NULL
     };
     const char **e;
@@ -279,6 +280,7 @@ mymain(void)
     DO_PARSE_TEST("usr/share/qemu/firmware/60-edk2-ovmf-x64-inteltdx.json");
     DO_PARSE_TEST("usr/share/qemu/firmware/90-combined.json");
     DO_PARSE_TEST("usr/share/qemu/firmware/91-bios.json");
+    DO_PARSE_FAILURE_TEST("usr/share/qemu/firmware/93-invalid.json");
 
     if (virTestRun("QEMU FW precedence test", testFWPrecedence, NULL) < 0)
         ret = -1;