From 53cdfd7994a5c3352ec9a998a8fb003a008b91ac Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Thu, 9 Jun 2022 15:02:19 +0200 Subject: [PATCH] tests: Use minimal hardware for firmware tests When testing firmware selection, we don't really care about any of the hardware assigned to the VM, and in fact it's better to keep it as minimal as possible to make sure that the focus remains on the firmware bits. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- .../firmware-auto-bios.x86_64-latest.args | 12 +---- tests/qemuxml2argvdata/firmware-auto-bios.xml | 53 +------------------ ...mware-auto-efi-aarch64.aarch64-latest.args | 6 +-- .../firmware-auto-efi-aarch64.xml | 18 +------ ...-auto-efi-loader-secure.x86_64-latest.args | 12 +---- .../firmware-auto-efi-loader-secure.xml | 53 +------------------ ...to-efi-no-enrolled-keys.x86_64-latest.args | 3 -- .../firmware-auto-efi-no-enrolled-keys.xml | 32 +---------- .../firmware-auto-efi.x86_64-latest.args | 12 +---- tests/qemuxml2argvdata/firmware-auto-efi.xml | 53 +------------------ ...manual-bios-rw-implicit.x86_64-latest.args | 8 +-- .../firmware-manual-bios-rw-implicit.xml | 21 +------- ...firmware-manual-bios-rw.x86_64-latest.args | 8 +-- .../firmware-manual-bios-rw.xml | 21 +------- .../firmware-manual-bios.args | 11 +--- .../qemuxml2argvdata/firmware-manual-bios.xml | 26 +-------- .../firmware-manual-efi-acpi-aarch64.args | 1 - .../firmware-manual-efi-acpi-aarch64.xml | 4 +- .../firmware-manual-efi-acpi-q35.args | 1 - .../firmware-manual-efi-acpi-q35.xml | 4 +- .../firmware-manual-efi-no-path.xml | 5 +- .../firmware-manual-efi-noacpi-aarch64.args | 1 - .../firmware-manual-efi-noacpi-aarch64.xml | 4 +- .../firmware-manual-efi-noacpi-q35.xml | 4 +- ...e-manual-efi-nvram-file.x86_64-latest.args | 4 +- .../firmware-manual-efi-nvram-file.xml | 6 +-- ...efi-nvram-network-iscsi.x86_64-latest.args | 4 +- ...irmware-manual-efi-nvram-network-iscsi.xml | 9 +--- ...l-efi-nvram-network-nbd.x86_64-latest.args | 4 +- .../firmware-manual-efi-nvram-network-nbd.xml | 9 +--- ...nual-efi-nvram-template.x86_64-latest.args | 4 +- .../firmware-manual-efi-nvram-template.xml | 6 +-- .../firmware-manual-efi-secure.args | 9 +--- .../firmware-manual-efi-secure.xml | 19 +------ .../qemuxml2argvdata/firmware-manual-efi.args | 7 +-- .../qemuxml2argvdata/firmware-manual-efi.xml | 21 +------- .../firmware-manual-noefi-acpi-aarch64.xml | 7 +-- .../firmware-manual-noefi-acpi-q35.args | 4 -- .../firmware-manual-noefi-acpi-q35.xml | 7 +-- .../firmware-manual-noefi-noacpi-aarch64.args | 4 -- .../firmware-manual-noefi-noacpi-aarch64.xml | 7 +-- .../firmware-manual-noefi-noacpi-q35.args | 4 -- .../firmware-manual-noefi-noacpi-q35.xml | 7 +-- .../firmware-auto-bios.x86_64-latest.xml | 43 ++------------- ...rmware-auto-efi-aarch64.aarch64-latest.xml | 12 ++--- ...e-auto-efi-loader-secure.x86_64-latest.xml | 43 ++------------- ...uto-efi-no-enrolled-keys.x86_64-latest.xml | 37 ++++++++++++- .../firmware-auto-efi.x86_64-latest.xml | 43 ++------------- ...re-manual-efi-nvram-file.x86_64-latest.xml | 9 +--- ...-efi-nvram-network-iscsi.x86_64-latest.xml | 11 ++-- ...al-efi-nvram-network-nbd.x86_64-latest.xml | 11 ++-- .../firmware-manual-efi.xml | 21 ++------ 52 files changed, 111 insertions(+), 634 deletions(-) mode change 120000 => 100644 tests/qemuxml2xmloutdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml diff --git a/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args index dd159e2604..1d45a8cfba 100644 --- a/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args @@ -26,17 +26,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ -no-shutdown \ --global ICH9-LPC.disable_s3=0 \ --global ICH9-LPC.disable_s4=1 \ --boot menu=on,strict=on \ --device '{"driver":"i82801b11-bridge","id":"pci.1","bus":"pcie.0","addr":"0x1e"}' \ --device '{"driver":"pci-bridge","chassis_nr":2,"id":"pci.2","bus":"pci.1","addr":"0x0"}' \ --device '{"driver":"ioh3420","port":8,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1"}' \ --device '{"driver":"ich9-usb-ehci1","id":"usb","bus":"pcie.0","addr":"0x1d.0x7"}' \ --device '{"driver":"ich9-usb-uhci1","masterbus":"usb.0","firstport":0,"bus":"pcie.0","multifunction":true,"addr":"0x1d"}' \ --device '{"driver":"ich9-usb-uhci2","masterbus":"usb.0","firstport":2,"bus":"pcie.0","addr":"0x1d.0x1"}' \ --device '{"driver":"ich9-usb-uhci3","masterbus":"usb.0","firstport":4,"bus":"pcie.0","addr":"0x1d.0x2"}' \ +-boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ --device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x1"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-bios.xml b/tests/qemuxml2argvdata/firmware-auto-bios.xml index 18ceafa948..0abbddb22e 100644 --- a/tests/qemuxml2argvdata/firmware-auto-bios.xml +++ b/tests/qemuxml2argvdata/firmware-auto-bios.xml @@ -2,67 +2,18 @@ fedora 63840878-0deb-4095-97e6-fc444d9bc9fa 8192 - 8192 1 hvm /some/user/nvram/path/guest_VARS.fd - - - - - - destroy - restart - restart - - - - /usr/bin/qemu-system-x86_64 - -
- - - -
- - - -
- - - -
- - -
- - - - -
- - - - -
- - - - -
- - - - -
- + + diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-aarch64.aarch64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-aarch64.aarch64-latest.args index 484905d863..93f808aba9 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-aarch64.aarch64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi-aarch64.aarch64-latest.args @@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-aarch64test/.config \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ -machine virt-4.0,usb=off,dump-guest-core=off,gic-version=2,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=mach-virt.ram \ -accel tcg \ --cpu cortex-a53 \ +-cpu cortex-a15 \ -m 1024 \ -object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ @@ -30,10 +30,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-aarch64test/.config \ -rtc base=utc \ -no-shutdown \ -boot strict=on \ --kernel /aarch64.kernel \ --initrd /aarch64.initrd \ --append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ --dtb /aarch64.dtb \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-aarch64.xml b/tests/qemuxml2argvdata/firmware-auto-efi-aarch64.xml index 48605f7198..1e8dfffb5b 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-aarch64.xml +++ b/tests/qemuxml2argvdata/firmware-auto-efi-aarch64.xml @@ -2,30 +2,16 @@ aarch64test 496d7ea8-9739-544b-4ebd-ef08be936e8b 1048576 - 1048576 1 hvm - /aarch64.kernel - /aarch64.initrd - earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait - /aarch64.dtb - - - - - - cortex-a53 - - - destroy - restart - restart /usr/bin/qemu-system-aarch64 + + diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args index 1bf6ec65bd..37564db12c 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args @@ -30,17 +30,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ -no-shutdown \ --global ICH9-LPC.disable_s3=0 \ --global ICH9-LPC.disable_s4=1 \ --boot menu=on,strict=on \ --device '{"driver":"i82801b11-bridge","id":"pci.1","bus":"pcie.0","addr":"0x1e"}' \ --device '{"driver":"pci-bridge","chassis_nr":2,"id":"pci.2","bus":"pci.1","addr":"0x0"}' \ --device '{"driver":"ioh3420","port":8,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1"}' \ --device '{"driver":"ich9-usb-ehci1","id":"usb","bus":"pcie.0","addr":"0x1d.0x7"}' \ --device '{"driver":"ich9-usb-uhci1","masterbus":"usb.0","firstport":0,"bus":"pcie.0","multifunction":true,"addr":"0x1d"}' \ --device '{"driver":"ich9-usb-uhci2","masterbus":"usb.0","firstport":2,"bus":"pcie.0","addr":"0x1d.0x1"}' \ --device '{"driver":"ich9-usb-uhci3","masterbus":"usb.0","firstport":4,"bus":"pcie.0","addr":"0x1d.0x2"}' \ +-boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ --device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x1"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.xml b/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.xml index 67c93fdbb9..1b94c25f32 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.xml +++ b/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.xml @@ -2,67 +2,18 @@ fedora 63840878-0deb-4095-97e6-fc444d9bc9fa 8192 - 8192 1 hvm /some/user/nvram/path/guest_VARS.fd - - - - - - destroy - restart - restart - - - - /usr/bin/qemu-system-x86_64 - -
- - - -
- - - -
- - - -
- - -
- - - - -
- - - - -
- - - - -
- - - - -
- + + diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args index 57fc34cc4d..b2cc6d3ab8 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args @@ -30,9 +30,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -rtc base=utc \ -no-shutdown \ -boot strict=on \ --device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \ --device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \ --device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.xml b/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.xml index 352908f745..e9717000a3 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.xml +++ b/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.xml @@ -2,49 +2,19 @@ fedora 63840878-0deb-4095-97e6-fc444d9bc9fa 8192 - 8192 1 hvm - - - - - qemu64 - - - destroy - restart - destroy /usr/bin/qemu-system-x86_64 - - - - -
- - - - -
- - -
- - -
- - - -