]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: Fix firmware descriptor masking test
authorAndrea Bolognani <abologna@redhat.com>
Wed, 15 Mar 2023 19:51:51 +0000 (20:51 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 22 Mar 2023 12:49:53 +0000 (13:49 +0100)
commit3030010fa9c52f5951ac4e69b0785cb801bd8376
tree2c5b5db4b9bfd0d1dcd02b67e4a84ba2c6d90e01
parentbf6a6f90a950e0da6265c77f02d6ca325ed7353e
tests: Fix firmware descriptor masking test

Right now we're checking that firmware descriptor masking works
as intended by creating an empty file matching 60-ovmf-sb.json
in name.

However, that firmware descriptors contains the details for a
perfectly valid and quite common situation: Secure Boot being
supported by the firmware build, but being effectively disabled
by the lack of certificates in the NVRAM template.

Unmask that firmware descriptor, and instead create a dummy one
that has higher priority than all other OVMF builds and points
to paths that are obviously incorrect, which should make it
easy to notice it getting accidentally unmasked in the future.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemufirmwaredata/etc/qemu/firmware/42-masked.json [moved from tests/qemufirmwaredata/etc/qemu/firmware/60-ovmf-sb.json with 100% similarity]
tests/qemufirmwaredata/usr/share/qemu/firmware/42-masked.json [new file with mode: 0644]
tests/qemufirmwaretest.c
tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args
tests/qemuxml2xmloutdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml