[PATCH 00/21] qemu capability testing cleanups and improvements (part 5)

This series applies on top of 'part 4' fetch everything from my repo: git fetch https://gitlab.com/pipo.sk/libvirt.git aarch-send In this part tests for the 'aarch64' platform are converted to use real capabilities. Peter Krempa (21): virDomainPCIAddressSetExtensionAlloc: Remove return value qemuxml2argvdata: Do not symlink output files for aarch64 gic tests qemuxml2argvtest: Use real capabilities in tests for picking the aarch64 GIC version qemuxml2argvtest: Convert DO_TEST_GIC to use real latest capabilities qemuxml2argvtest: Convert the rest of GIC tests to latest capabilities qemuxml2argvtest: Add real-caps versions of 'aarch64-virt-virtio' qemuxml2argvtest: Drop "aarch64-virt-2.6-virtio-pci-default" case qemuxml2argv: Test default aarch64 cofig without PCIe support qemuxml2argvtest: Modernize 'balloon-mmio-deflate' qemuxml2argvtest: Don't symlink output files for 'mach-virt-' cases qemuxml2argvtest: Modernize all 'mach-virt-' aarch64 test cases qemuxml2argvtest: Update 'aarch64-virtio-pci-manual-addresses' case qemuxml2*test: Drop fake-caps invocation of 'aarch64-virtio-pci-manual-addresses' qemuxml2(argv|xml)test: Modernize testing of USB controllers on aarch64 qemuxml2argvtest: Modernize the rest of 'aarch64' cases qemuxml2xmlout: Do not symlink output files for 'aarch64-gic' cases qemuxml2xmltest: Modernize 'aarch64-gic*' test cases qemuxml2xmloutdata: Don't symlink output data for 'mach-virt*' cases qemuxml2xmltest: Modernize 'mach-virt*' cases qemuxml2xmltest: Convert rest of 'aarch64' cases to real capabilities testutilsqemu: Drop fake capability testing infrastructure for 'aarch64' src/conf/domain_addr.c | 13 +- ...h64-aavmf-virtio-mmio.aarch64-latest.args} | 20 +- ...rch64-cpu-passthrough.aarch64-latest.args} | 26 +-- .../aarch64-gic-default-both.args | 33 ++- .../aarch64-gic-default-v2.args | 33 ++- .../aarch64-gic-default-v3.args | 33 ++- ...=> aarch64-gic-default.aarch64-4.2.0.args} | 14 +- ...> aarch64-gic-default.aarch64-latest.args} | 17 +- .../qemuxml2argvdata/aarch64-gic-default.args | 1 - tests/qemuxml2argvdata/aarch64-gic-host.args | 6 +- ...=> aarch64-gic-invalid.aarch64-latest.err} | 0 .../aarch64-gic-none-both.args | 33 ++- .../aarch64-gic-none-tcg.args | 6 +- .../qemuxml2argvdata/aarch64-gic-none-v2.args | 33 ++- .../qemuxml2argvdata/aarch64-gic-none-v3.args | 33 ++- ...gs => aarch64-gic-none.aarch64-4.2.0.args} | 8 +- .../aarch64-gic-none.aarch64-latest.args | 32 +++ tests/qemuxml2argvdata/aarch64-gic-none.args | 1 - ...> aarch64-gic-not-virt.aarch64-latest.err} | 0 tests/qemuxml2argvdata/aarch64-gic-v2.args | 6 +- tests/qemuxml2argvdata/aarch64-gic-v3.args | 6 +- .../aarch64-pci-serial.aarch64-latest.args | 38 +++ ...arch64-tpm-wrong-model.aarch64-latest.err} | 0 ...arch64-traditional-pci.aarch64-latest.args | 37 +++ .../aarch64-traditional-pci.args | 34 --- .../aarch64-usb-controller-qemu-xhci.args | 30 --- .../aarch64-usb-controller-qemu-xhci.xml | 16 -- ...arch64-usb-controller.aarch64-latest.args} | 11 +- ...ec-xhci.xml => aarch64-usb-controller.xml} | 6 + ...aarch64-video-default.aarch64-latest.args} | 13 +- ...4-video-virtio-gpu-pci.aarch64-latest.args | 37 +++ .../aarch64-video-virtio-gpu-pci.args | 35 --- .../aarch64-virt-2.6-virtio-pci-default.xml | 46 ---- ...ch64-virt-default-nic.aarch64-latest.args} | 10 +- ...ch64-virt-virtio-MMIO.aarch64.latest.args} | 20 +- ...=> aarch64-virt-virtio.aarch64-4.2.0.args} | 22 +- .../aarch64-virt-virtio.aarch64-latest.args | 55 +++++ ...o-pci-manual-addresses.aarch64-latest.args | 49 ++++ .../aarch64-virtio-pci-manual-addresses.xml | 4 +- .../balloon-mmio-deflate.aarch64-latest.args | 37 +++ ...h-virt-console-native.aarch64-latest.args} | 7 +- .../mach-virt-console-native.args | 1 - ...ch-virt-console-virtio.aarch64-latest.args | 37 +++ ...serial+console-native.aarch64-latest.args} | 12 +- .../mach-virt-serial+console-native.args | 1 - ...ch-virt-serial-compat.aarch64-latest.args} | 12 +- .../mach-virt-serial-compat.args | 1 - ...-serial-invalid-machine.x86_64-latest.err} | 0 ...ch-virt-serial-native.aarch64-latest.args} | 12 +- .../mach-virt-serial-pci.aarch64-latest.args | 37 +++ .../mach-virt-serial-usb.aarch64-latest.args | 37 +++ tests/qemuxml2argvtest.c | 217 +++++++----------- ...ch64-aavmf-virtio-mmio.aarch64-latest.xml} | 1 + ...arch64-gic-default-both.aarch64-latest.xml | 26 +++ .../aarch64-gic-default-both.xml | 1 - .../aarch64-gic-default-v2.aarch64-latest.xml | 26 +++ .../aarch64-gic-default-v2.xml | 1 - .../aarch64-gic-default-v3.aarch64-latest.xml | 26 +++ .../aarch64-gic-default-v3.xml | 1 - .../aarch64-gic-default.aarch64-latest.xml | 26 +++ .../aarch64-gic-default.xml | 1 - .../aarch64-gic-host.aarch64-latest.xml | 26 +++ tests/qemuxml2xmloutdata/aarch64-gic-host.xml | 1 - .../aarch64-gic-none-both.aarch64-latest.xml | 26 +++ .../aarch64-gic-none-both.xml | 1 - ...> aarch64-gic-none-tcg.aarch64-latest.xml} | 1 + .../aarch64-gic-none-v2.aarch64-latest.xml | 26 +++ .../aarch64-gic-none-v2.xml | 1 - .../aarch64-gic-none-v3.aarch64-latest.xml | 26 +++ .../aarch64-gic-none-v3.xml | 1 - .../aarch64-gic-none.aarch64-latest.xml | 26 +++ tests/qemuxml2xmloutdata/aarch64-gic-none.xml | 1 - .../aarch64-gic-v2.aarch64-latest.xml | 26 +++ tests/qemuxml2xmloutdata/aarch64-gic-v2.xml | 1 - .../aarch64-gic-v3.aarch64-latest.xml | 26 +++ tests/qemuxml2xmloutdata/aarch64-gic-v3.xml | 1 - ... => aarch64-pci-serial.aarch64-latest.xml} | 19 +- ...arch64-traditional-pci.aarch64-latest.xml} | 3 + .../aarch64-usb-controller.aarch64-latest.xml | 36 +++ ... aarch64-video-default.aarch64-latest.xml} | 22 +- ...4-video-virtio-gpu-pci.aarch64-latest.xml} | 4 +- ...o-pci-manual-addresses.aarch64-latest.xml} | 24 +- ...ch-virt-console-native.aarch64-latest.xml} | 4 + .../mach-virt-console-native.xml | 1 - ...ach-virt-console-virtio.aarch64-latest.xml | 44 ++++ ...-serial+console-native.aarch64-latest.xml} | 14 +- .../mach-virt-serial+console-native.xml | 1 - ...mach-virt-serial-compat.aarch64-latest.xml | 36 +++ ...mach-virt-serial-native.aarch64-latest.xml | 36 +++ .../mach-virt-serial-native.xml | 1 - ...> mach-virt-serial-pci.aarch64-latest.xml} | 19 +- ...> mach-virt-serial-usb.aarch64-latest.xml} | 3 + tests/qemuxml2xmltest.c | 153 ++++++------ tests/testutilsqemu.c | 6 - 94 files changed, 1396 insertions(+), 557 deletions(-) rename tests/qemuxml2argvdata/{aarch64-aavmf-virtio-mmio.args => aarch64-aavmf-virtio-mmio.aarch64-latest.args} (57%) rename tests/qemuxml2argvdata/{aarch64-virtio-pci-manual-addresses.args => aarch64-cpu-passthrough.aarch64-latest.args} (52%) mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-default-both.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-default-v2.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-default-v3.args rename tests/qemuxml2argvdata/{balloon-mmio-deflate.args => aarch64-gic-default.aarch64-4.2.0.args} (71%) rename tests/qemuxml2argvdata/{aarch64-pci-serial.args => aarch64-gic-default.aarch64-latest.args} (55%) delete mode 120000 tests/qemuxml2argvdata/aarch64-gic-default.args rename tests/qemuxml2argvdata/{aarch64-gic-invalid.err => aarch64-gic-invalid.aarch64-latest.err} (100%) mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-none-both.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-none-v2.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-none-v3.args rename tests/qemuxml2argvdata/{aarch64-cpu-passthrough.args => aarch64-gic-none.aarch64-4.2.0.args} (67%) create mode 100644 tests/qemuxml2argvdata/aarch64-gic-none.aarch64-latest.args delete mode 120000 tests/qemuxml2argvdata/aarch64-gic-none.args rename tests/qemuxml2argvdata/{aarch64-gic-not-virt.err => aarch64-gic-not-virt.aarch64-latest.err} (100%) create mode 100644 tests/qemuxml2argvdata/aarch64-pci-serial.aarch64-latest.args rename tests/qemuxml2argvdata/{aarch64-tpm-wrong-model.err => aarch64-tpm-wrong-model.aarch64-latest.err} (100%) create mode 100644 tests/qemuxml2argvdata/aarch64-traditional-pci.aarch64-latest.args delete mode 100644 tests/qemuxml2argvdata/aarch64-traditional-pci.args delete mode 100644 tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.args delete mode 100644 tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.xml rename tests/qemuxml2argvdata/{aarch64-usb-controller-nec-xhci.args => aarch64-usb-controller.aarch64-latest.args} (55%) rename tests/qemuxml2argvdata/{aarch64-usb-controller-nec-xhci.xml => aarch64-usb-controller.xml} (61%) rename tests/qemuxml2argvdata/{aarch64-video-default.args => aarch64-video-default.aarch64-latest.args} (54%) create mode 100644 tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.aarch64-latest.args delete mode 100644 tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args delete mode 100644 tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.xml rename tests/qemuxml2argvdata/{aarch64-virt-default-nic.args => aarch64-virt-default-nic.aarch64-latest.args} (56%) rename tests/qemuxml2argvdata/{aarch64-virt-virtio.args => aarch64-virt-virtio-MMIO.aarch64.latest.args} (58%) rename tests/qemuxml2argvdata/{aarch64-virt-2.6-virtio-pci-default.args => aarch64-virt-virtio.aarch64-4.2.0.args} (63%) create mode 100644 tests/qemuxml2argvdata/aarch64-virt-virtio.aarch64-latest.args create mode 100644 tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.aarch64-latest.args create mode 100644 tests/qemuxml2argvdata/balloon-mmio-deflate.aarch64-latest.args rename tests/qemuxml2argvdata/{mach-virt-serial-native.args => mach-virt-console-native.aarch64-latest.args} (67%) delete mode 120000 tests/qemuxml2argvdata/mach-virt-console-native.args create mode 100644 tests/qemuxml2argvdata/mach-virt-console-virtio.aarch64-latest.args rename tests/qemuxml2argvdata/{mach-virt-serial-pci.args => mach-virt-serial+console-native.aarch64-latest.args} (65%) delete mode 120000 tests/qemuxml2argvdata/mach-virt-serial+console-native.args rename tests/qemuxml2argvdata/{mach-virt-serial-usb.args => mach-virt-serial-compat.aarch64-latest.args} (64%) delete mode 120000 tests/qemuxml2argvdata/mach-virt-serial-compat.args rename tests/qemuxml2argvdata/{mach-virt-serial-invalid-machine.err => mach-virt-serial-invalid-machine.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{mach-virt-console-virtio.args => mach-virt-serial-native.aarch64-latest.args} (62%) create mode 100644 tests/qemuxml2argvdata/mach-virt-serial-pci.aarch64-latest.args create mode 100644 tests/qemuxml2argvdata/mach-virt-serial-usb.aarch64-latest.args rename tests/qemuxml2xmloutdata/{aarch64-aavmf-virtio-mmio.xml => aarch64-aavmf-virtio-mmio.aarch64-latest.xml} (96%) create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-default-both.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-default-v2.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-default-v3.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-default.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-default.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-host.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-host.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-none-both.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml rename tests/qemuxml2xmloutdata/{aarch64-gic-none-tcg.xml => aarch64-gic-none-tcg.aarch64-latest.xml} (93%) create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-none-v2.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-none-v3.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-none.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-none.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-v2.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-v2.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-v3.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/aarch64-gic-v3.xml rename tests/qemuxml2xmloutdata/{aarch64-pci-serial.xml => aarch64-pci-serial.aarch64-latest.xml} (70%) rename tests/qemuxml2xmloutdata/{aarch64-traditional-pci.xml => aarch64-traditional-pci.aarch64-latest.xml} (93%) create mode 100644 tests/qemuxml2xmloutdata/aarch64-usb-controller.aarch64-latest.xml rename tests/qemuxml2xmloutdata/{aarch64-video-default.xml => aarch64-video-default.aarch64-latest.xml} (67%) rename tests/qemuxml2xmloutdata/{aarch64-video-virtio-gpu-pci.xml => aarch64-video-virtio-gpu-pci.aarch64-latest.xml} (95%) rename tests/qemuxml2xmloutdata/{aarch64-virtio-pci-manual-addresses.xml => aarch64-virtio-pci-manual-addresses.aarch64-latest.xml} (68%) rename tests/qemuxml2xmloutdata/{mach-virt-serial-compat.xml => mach-virt-console-native.aarch64-latest.xml} (84%) delete mode 120000 tests/qemuxml2xmloutdata/mach-virt-console-native.xml create mode 100644 tests/qemuxml2xmloutdata/mach-virt-console-virtio.aarch64-latest.xml rename tests/qemuxml2xmloutdata/{mach-virt-console-virtio.xml => mach-virt-serial+console-native.aarch64-latest.xml} (68%) delete mode 120000 tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml create mode 100644 tests/qemuxml2xmloutdata/mach-virt-serial-compat.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/mach-virt-serial-native.aarch64-latest.xml delete mode 120000 tests/qemuxml2xmloutdata/mach-virt-serial-native.xml rename tests/qemuxml2xmloutdata/{mach-virt-serial-pci.xml => mach-virt-serial-pci.aarch64-latest.xml} (71%) rename tests/qemuxml2xmloutdata/{mach-virt-serial-usb.xml => mach-virt-serial-usb.aarch64-latest.xml} (93%) -- 2.39.2

The function always returns 0. Remove the return value and refactor caller. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/conf/domain_addr.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index b6534f502c..cf30ad297c 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -974,21 +974,19 @@ virDomainPCIAddressSetExtensionFree(virDomainZPCIAddressIds *zpciIds) } -static int +static void virDomainPCIAddressSetExtensionAlloc(virDomainPCIAddressSet *addrs, virPCIDeviceAddressExtensionFlags extFlags) { if (extFlags & VIR_PCI_ADDRESS_EXTENSION_ZPCI) { if (addrs->zpciIds) - return 0; + return; addrs->zpciIds = g_new0(virDomainZPCIAddressIds, 1); addrs->zpciIds->uids = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, NULL); addrs->zpciIds->fids = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, NULL); } - - return 0; } @@ -1002,14 +1000,9 @@ virDomainPCIAddressSetAlloc(unsigned int nbuses, addrs->buses = g_new0(virDomainPCIAddressBus, nbuses); addrs->nbuses = nbuses; - if (virDomainPCIAddressSetExtensionAlloc(addrs, extFlags) < 0) - goto error; + virDomainPCIAddressSetExtensionAlloc(addrs, extFlags); return addrs; - - error: - virDomainPCIAddressSetFree(addrs); - return NULL; } -- 2.39.2

Upcoming patches will be modifying the tests for selecting the GIC version to use real capabilities. This in certain cases will show that a different version is picked. Using symlinks makes it inconvenient to do the modifications and unobvious what changed. Remove the symlinks and replace them by real output files. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../aarch64-gic-default-both.args | 31 ++++++++++++++++++- .../aarch64-gic-default-v2.args | 31 ++++++++++++++++++- .../aarch64-gic-default-v3.args | 31 ++++++++++++++++++- .../qemuxml2argvdata/aarch64-gic-default.args | 31 ++++++++++++++++++- .../aarch64-gic-none-both.args | 31 ++++++++++++++++++- .../qemuxml2argvdata/aarch64-gic-none-v2.args | 31 ++++++++++++++++++- .../qemuxml2argvdata/aarch64-gic-none-v3.args | 31 ++++++++++++++++++- tests/qemuxml2argvdata/aarch64-gic-none.args | 31 ++++++++++++++++++- 8 files changed, 240 insertions(+), 8 deletions(-) mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-default-both.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-default-v2.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-default-v3.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-default.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-none-both.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-none-v2.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-none-v3.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-none.args diff --git a/tests/qemuxml2argvdata/aarch64-gic-default-both.args b/tests/qemuxml2argvdata/aarch64-gic-default-both.args deleted file mode 120000 index 6209eff4b0..0000000000 --- a/tests/qemuxml2argvdata/aarch64-gic-default-both.args +++ /dev/null @@ -1 +0,0 @@ -aarch64-gic-v3.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/aarch64-gic-default-both.args b/tests/qemuxml2argvdata/aarch64-gic-default-both.args new file mode 100644 index 0000000000..9f604422c4 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-default-both.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-default-v2.args b/tests/qemuxml2argvdata/aarch64-gic-default-v2.args deleted file mode 120000 index 04ecd4ce76..0000000000 --- a/tests/qemuxml2argvdata/aarch64-gic-default-v2.args +++ /dev/null @@ -1 +0,0 @@ -aarch64-gic-v2.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/aarch64-gic-default-v2.args b/tests/qemuxml2argvdata/aarch64-gic-default-v2.args new file mode 100644 index 0000000000..07dd297842 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-default-v2.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-default-v3.args b/tests/qemuxml2argvdata/aarch64-gic-default-v3.args deleted file mode 120000 index 6209eff4b0..0000000000 --- a/tests/qemuxml2argvdata/aarch64-gic-default-v3.args +++ /dev/null @@ -1 +0,0 @@ -aarch64-gic-v3.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/aarch64-gic-default-v3.args b/tests/qemuxml2argvdata/aarch64-gic-default-v3.args new file mode 100644 index 0000000000..9f604422c4 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-default-v3.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-default.args b/tests/qemuxml2argvdata/aarch64-gic-default.args deleted file mode 120000 index 04ecd4ce76..0000000000 --- a/tests/qemuxml2argvdata/aarch64-gic-default.args +++ /dev/null @@ -1 +0,0 @@ -aarch64-gic-v2.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/aarch64-gic-default.args b/tests/qemuxml2argvdata/aarch64-gic-default.args new file mode 100644 index 0000000000..07dd297842 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-default.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-both.args b/tests/qemuxml2argvdata/aarch64-gic-none-both.args deleted file mode 120000 index 6209eff4b0..0000000000 --- a/tests/qemuxml2argvdata/aarch64-gic-none-both.args +++ /dev/null @@ -1 +0,0 @@ -aarch64-gic-v3.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-both.args b/tests/qemuxml2argvdata/aarch64-gic-none-both.args new file mode 100644 index 0000000000..9f604422c4 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-none-both.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-v2.args b/tests/qemuxml2argvdata/aarch64-gic-none-v2.args deleted file mode 120000 index 04ecd4ce76..0000000000 --- a/tests/qemuxml2argvdata/aarch64-gic-none-v2.args +++ /dev/null @@ -1 +0,0 @@ -aarch64-gic-v2.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-v2.args b/tests/qemuxml2argvdata/aarch64-gic-none-v2.args new file mode 100644 index 0000000000..07dd297842 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-none-v2.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-v3.args b/tests/qemuxml2argvdata/aarch64-gic-none-v3.args deleted file mode 120000 index 6209eff4b0..0000000000 --- a/tests/qemuxml2argvdata/aarch64-gic-none-v3.args +++ /dev/null @@ -1 +0,0 @@ -aarch64-gic-v3.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-v3.args b/tests/qemuxml2argvdata/aarch64-gic-none-v3.args new file mode 100644 index 0000000000..9f604422c4 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-none-v3.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-none.args b/tests/qemuxml2argvdata/aarch64-gic-none.args deleted file mode 120000 index 04ecd4ce76..0000000000 --- a/tests/qemuxml2argvdata/aarch64-gic-none.args +++ /dev/null @@ -1 +0,0 @@ -aarch64-gic-v2.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/aarch64-gic-none.args b/tests/qemuxml2argvdata/aarch64-gic-none.args new file mode 100644 index 0000000000..07dd297842 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-none.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on -- 2.39.2

Convert 'aarch64-gic-default' and 'aarch64-gic-none' cases to use real capabilities both latest and locked to 4.2.0 to show what would happen with a real qemu. Note that the qemuTestSetHostArch() calls are needed as real caps override the setting once used. Once we convert all tests to real data this can be dropped. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...=> aarch64-gic-default.aarch64-4.2.0.args} | 3 +- .../aarch64-gic-default.aarch64-latest.args | 32 +++++++++++++++++++ ...gs => aarch64-gic-none.aarch64-4.2.0.args} | 3 +- .../aarch64-gic-none.aarch64-latest.args | 32 +++++++++++++++++++ tests/qemuxml2argvtest.c | 26 ++++++++++++--- 5 files changed, 90 insertions(+), 6 deletions(-) rename tests/qemuxml2argvdata/{aarch64-gic-default.args => aarch64-gic-default.aarch64-4.2.0.args} (86%) create mode 100644 tests/qemuxml2argvdata/aarch64-gic-default.aarch64-latest.args rename tests/qemuxml2argvdata/{aarch64-gic-none.args => aarch64-gic-none.aarch64-4.2.0.args} (86%) create mode 100644 tests/qemuxml2argvdata/aarch64-gic-none.aarch64-latest.args diff --git a/tests/qemuxml2argvdata/aarch64-gic-default.args b/tests/qemuxml2argvdata/aarch64-gic-default.aarch64-4.2.0.args similarity index 86% rename from tests/qemuxml2argvdata/aarch64-gic-default.args rename to tests/qemuxml2argvdata/aarch64-gic-default.aarch64-4.2.0.args index 07dd297842..34c9f79ea1 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-default.args +++ b/tests/qemuxml2argvdata/aarch64-gic-default.aarch64-4.2.0.args @@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -name guest=aarch64test,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-machine virt-4.2,usb=off,gic-version=3,dump-guest-core=off \ -accel kvm \ -cpu host \ -m 1024 \ @@ -27,4 +27,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-default.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-gic-default.aarch64-latest.args new file mode 100644 index 0000000000..0d7a1c259a --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-default.aarch64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-none.args b/tests/qemuxml2argvdata/aarch64-gic-none.aarch64-4.2.0.args similarity index 86% rename from tests/qemuxml2argvdata/aarch64-gic-none.args rename to tests/qemuxml2argvdata/aarch64-gic-none.aarch64-4.2.0.args index 07dd297842..34c9f79ea1 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-none.args +++ b/tests/qemuxml2argvdata/aarch64-gic-none.aarch64-4.2.0.args @@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -name guest=aarch64test,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-machine virt-4.2,usb=off,gic-version=3,dump-guest-core=off \ -accel kvm \ -cpu host \ -m 1024 \ @@ -27,4 +27,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-none.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-gic-none.aarch64-latest.args new file mode 100644 index 0000000000..0d7a1c259a --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-gic-none.aarch64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram \ +-accel kvm \ +-cpu host \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2e72ebf8e3..772caca47e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2390,8 +2390,17 @@ mymain(void) DO_TEST("aarch64-cpu-passthrough", QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-none", GIC_NONE, - QEMU_CAPS_KVM); + DO_TEST_FULL("aarch64-gic-none", ".aarch64-4.2.0", + ARG_GIC, GIC_NONE, + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "4.2.0", + ARG_END); + DO_TEST_FULL("aarch64-gic-none", ".aarch64-latest", + ARG_GIC, GIC_NONE, + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "latest", + ARG_END); + qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64); DO_TEST_GIC("aarch64-gic-none-v2", GIC_V2, QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-none-v3", GIC_V3, @@ -2399,8 +2408,17 @@ mymain(void) DO_TEST_GIC("aarch64-gic-none-both", GIC_BOTH, QEMU_CAPS_KVM); DO_TEST_FULL("aarch64-gic-none-tcg", "", ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_GIC("aarch64-gic-default", GIC_NONE, - QEMU_CAPS_KVM); + DO_TEST_FULL("aarch64-gic-default", ".aarch64-4.2.0", + ARG_GIC, GIC_NONE, + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "4.2.0", + ARG_END); + DO_TEST_FULL("aarch64-gic-default", ".aarch64-latest", + ARG_GIC, GIC_NONE, + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "latest", + ARG_END); + qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64); DO_TEST_GIC("aarch64-gic-default-v2", GIC_V2, QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-default-v3", GIC_V3, -- 2.39.2

Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../aarch64-gic-default-both.args | 6 +- .../aarch64-gic-default-v2.args | 6 +- .../aarch64-gic-default-v3.args | 6 +- tests/qemuxml2argvdata/aarch64-gic-host.args | 6 +- .../aarch64-gic-none-both.args | 6 +- .../qemuxml2argvdata/aarch64-gic-none-v2.args | 6 +- .../qemuxml2argvdata/aarch64-gic-none-v3.args | 6 +- tests/qemuxml2argvdata/aarch64-gic-v2.args | 6 +- tests/qemuxml2argvdata/aarch64-gic-v3.args | 6 +- tests/qemuxml2argvtest.c | 61 +++++++------------ 10 files changed, 59 insertions(+), 56 deletions(-) diff --git a/tests/qemuxml2argvdata/aarch64-gic-default-both.args b/tests/qemuxml2argvdata/aarch64-gic-default-both.args index 9f604422c4..0d7a1c259a 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-default-both.args +++ b/tests/qemuxml2argvdata/aarch64-gic-default-both.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=3,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-default-v2.args b/tests/qemuxml2argvdata/aarch64-gic-default-v2.args index 07dd297842..fe06bd19ac 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-default-v2.args +++ b/tests/qemuxml2argvdata/aarch64-gic-default-v2.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-default-v3.args b/tests/qemuxml2argvdata/aarch64-gic-default-v3.args index 9f604422c4..0d7a1c259a 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-default-v3.args +++ b/tests/qemuxml2argvdata/aarch64-gic-default-v3.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=3,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-host.args b/tests/qemuxml2argvdata/aarch64-gic-host.args index bee6ededdf..9f9799917d 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-host.args +++ b/tests/qemuxml2argvdata/aarch64-gic-host.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=host,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=host,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-both.args b/tests/qemuxml2argvdata/aarch64-gic-none-both.args index 9f604422c4..0d7a1c259a 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-none-both.args +++ b/tests/qemuxml2argvdata/aarch64-gic-none-both.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=3,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-v2.args b/tests/qemuxml2argvdata/aarch64-gic-none-v2.args index 07dd297842..fe06bd19ac 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-none-v2.args +++ b/tests/qemuxml2argvdata/aarch64-gic-none-v2.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-v3.args b/tests/qemuxml2argvdata/aarch64-gic-none-v3.args index 9f604422c4..0d7a1c259a 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-none-v3.args +++ b/tests/qemuxml2argvdata/aarch64-gic-none-v3.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=3,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-v2.args b/tests/qemuxml2argvdata/aarch64-gic-v2.args index 07dd297842..fe06bd19ac 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-v2.args +++ b/tests/qemuxml2argvdata/aarch64-gic-v2.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-v3.args b/tests/qemuxml2argvdata/aarch64-gic-v3.args index 9f604422c4..0d7a1c259a 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-v3.args +++ b/tests/qemuxml2argvdata/aarch64-gic-v3.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=3,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 772caca47e..2498469dc9 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -915,10 +915,13 @@ mymain(void) # define DO_TEST_NOCAPS(name) \ DO_TEST_FULL(name, "", ARG_END) -# define DO_TEST_GIC(name, gic, ...) \ +/* GIC tests use 'latest' capabilities */ +# define DO_TEST_GIC(name, gic) \ DO_TEST_FULL(name, "", \ ARG_GIC, gic, \ - ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) + ARG_CAPS_ARCH, "aarch64", \ + ARG_CAPS_VER, "latest", \ + ARG_END) # define DO_TEST_FAILURE(name, ...) \ DO_TEST_FULL(name, "", \ @@ -2400,13 +2403,10 @@ mymain(void) ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", ARG_END); + DO_TEST_GIC("aarch64-gic-none-v2", GIC_V2); + DO_TEST_GIC("aarch64-gic-none-v3", GIC_V3); + DO_TEST_GIC("aarch64-gic-none-both", GIC_BOTH); qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64); - DO_TEST_GIC("aarch64-gic-none-v2", GIC_V2, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-none-v3", GIC_V3, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-none-both", GIC_BOTH, - QEMU_CAPS_KVM); DO_TEST_FULL("aarch64-gic-none-tcg", "", ARG_GIC, GIC_BOTH, ARG_END); DO_TEST_FULL("aarch64-gic-default", ".aarch64-4.2.0", ARG_GIC, GIC_NONE, @@ -2418,37 +2418,22 @@ mymain(void) ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", ARG_END); + DO_TEST_GIC("aarch64-gic-default-v2", GIC_V2); + DO_TEST_GIC("aarch64-gic-default-v3", GIC_V3); + DO_TEST_GIC("aarch64-gic-default-both", GIC_BOTH); + DO_TEST_GIC("aarch64-gic-v2", GIC_NONE); + DO_TEST_GIC("aarch64-gic-v2", GIC_V2); + DO_TEST_GIC("aarch64-gic-v2", GIC_V3); + DO_TEST_GIC("aarch64-gic-v2", GIC_BOTH); + DO_TEST_GIC("aarch64-gic-v3", GIC_NONE); + DO_TEST_GIC("aarch64-gic-v3", GIC_V2); + DO_TEST_GIC("aarch64-gic-v3", GIC_V3); + DO_TEST_GIC("aarch64-gic-v3", GIC_BOTH); + DO_TEST_GIC("aarch64-gic-host", GIC_NONE); + DO_TEST_GIC("aarch64-gic-host", GIC_V2); + DO_TEST_GIC("aarch64-gic-host", GIC_V3); + DO_TEST_GIC("aarch64-gic-host", GIC_BOTH); qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64); - DO_TEST_GIC("aarch64-gic-default-v2", GIC_V2, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-default-v3", GIC_V3, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-default-both", GIC_BOTH, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-v2", GIC_NONE, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-v2", GIC_V2, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-v2", GIC_V3, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-v2", GIC_BOTH, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-v3", GIC_NONE, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-v3", GIC_V2, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-v3", GIC_V3, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-v3", GIC_BOTH, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-host", GIC_NONE, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-host", GIC_V2, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-host", GIC_V3, - QEMU_CAPS_KVM); - DO_TEST_GIC("aarch64-gic-host", GIC_BOTH, - QEMU_CAPS_KVM); DO_TEST_PARSE_ERROR("aarch64-gic-invalid", QEMU_CAPS_KVM); DO_TEST_PARSE_ERROR("aarch64-gic-not-virt", -- 2.39.2

Convert the two negative cases to use real capapbilities as well as the positive case for situations when KVM is not used by stripping the QEMU_CAPS_KVM flag. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...err => aarch64-gic-invalid.aarch64-latest.err} | 0 tests/qemuxml2argvdata/aarch64-gic-none-tcg.args | 6 ++++-- ...rr => aarch64-gic-not-virt.aarch64-latest.err} | 0 tests/qemuxml2argvtest.c | 15 ++++++++------- 4 files changed, 12 insertions(+), 9 deletions(-) rename tests/qemuxml2argvdata/{aarch64-gic-invalid.err => aarch64-gic-invalid.aarch64-latest.err} (100%) rename tests/qemuxml2argvdata/{aarch64-gic-not-virt.err => aarch64-gic-not-virt.aarch64-latest.err} (100%) diff --git a/tests/qemuxml2argvdata/aarch64-gic-invalid.err b/tests/qemuxml2argvdata/aarch64-gic-invalid.aarch64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/aarch64-gic-invalid.err rename to tests/qemuxml2argvdata/aarch64-gic-invalid.aarch64-latest.err diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args b/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args index 16a02b74bd..029ef5230d 100644 --- a/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args +++ b/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=guest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ -cpu cortex-a57 \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-gic-not-virt.err b/tests/qemuxml2argvdata/aarch64-gic-not-virt.aarch64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/aarch64-gic-not-virt.err rename to tests/qemuxml2argvdata/aarch64-gic-not-virt.aarch64-latest.err diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2498469dc9..61e5a93fdc 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2406,8 +2406,12 @@ mymain(void) DO_TEST_GIC("aarch64-gic-none-v2", GIC_V2); DO_TEST_GIC("aarch64-gic-none-v3", GIC_V3); DO_TEST_GIC("aarch64-gic-none-both", GIC_BOTH); - qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64); - DO_TEST_FULL("aarch64-gic-none-tcg", "", ARG_GIC, GIC_BOTH, ARG_END); + DO_TEST_FULL("aarch64-gic-none-tcg", "", + ARG_GIC, GIC_BOTH, + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "latest", + ARG_QEMU_CAPS_DEL, QEMU_CAPS_KVM, QEMU_CAPS_LAST, + ARG_END); DO_TEST_FULL("aarch64-gic-default", ".aarch64-4.2.0", ARG_GIC, GIC_NONE, ARG_CAPS_ARCH, "aarch64", @@ -2433,11 +2437,8 @@ mymain(void) DO_TEST_GIC("aarch64-gic-host", GIC_V2); DO_TEST_GIC("aarch64-gic-host", GIC_V3); DO_TEST_GIC("aarch64-gic-host", GIC_BOTH); - qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64); - DO_TEST_PARSE_ERROR("aarch64-gic-invalid", - QEMU_CAPS_KVM); - DO_TEST_PARSE_ERROR("aarch64-gic-not-virt", - QEMU_CAPS_KVM); + DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-gic-invalid", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-gic-not-virt", "aarch64"); DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-gic-not-arm", "ppc64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-kvm-32-on-64", "aarch64"); DO_TEST("aarch64-pci-serial", -- 2.39.2

Add a version for 'latest' caps as well as '4.2.0'. The test demonstrates that with a real qemu PCIe will be used instead of MMIO. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../aarch64-virt-virtio.aarch64-4.2.0.args | 54 ++++++++++++++++++ .../aarch64-virt-virtio.aarch64-latest.args | 55 +++++++++++++++++++ tests/qemuxml2argvtest.c | 3 + 3 files changed, 112 insertions(+) create mode 100644 tests/qemuxml2argvdata/aarch64-virt-virtio.aarch64-4.2.0.args create mode 100644 tests/qemuxml2argvdata/aarch64-virt-virtio.aarch64-latest.args diff --git a/tests/qemuxml2argvdata/aarch64-virt-virtio.aarch64-4.2.0.args b/tests/qemuxml2argvdata/aarch64-virt-virtio.aarch64-4.2.0.args new file mode 100644 index 0000000000..a2804668da --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-virt-virtio.aarch64-4.2.0.args @@ -0,0 +1,54 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ +-machine virt-4.2,usb=off,gic-version=2,dump-guest-core=off \ +-accel tcg \ +-cpu cortex-a53 \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-kernel /aarch64.kernel \ +-initrd /aarch64.initrd \ +-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ +-dtb /aarch64.dtb \ +-device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \ +-device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ +-device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ +-device pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \ +-device pcie-root-port,port=12,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \ +-device pcie-root-port,port=13,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \ +-device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x0 \ +-blockdev '{"driver":"file","filename":"/aarch64.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ +-device virtio-blk-pci,scsi=off,bus=pci.3,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \ +-netdev user,id=hostnet0 \ +-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.1,addr=0x0 \ +-chardev pty,id=charserial0 \ +-serial chardev:charserial0 \ +-chardev pty,id=charconsole1 \ +-device virtconsole,chardev=charconsole1,id=console1 \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \ +-object rng-random,id=objrng0,filename=/dev/random \ +-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.5,addr=0x0 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-virt-virtio.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-virt-virtio.aarch64-latest.args new file mode 100644 index 0000000000..296c0c2f3a --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-virt-virtio.aarch64-latest.args @@ -0,0 +1,55 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ +-accel tcg \ +-cpu cortex-a53 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-kernel /aarch64.kernel \ +-initrd /aarch64.initrd \ +-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ +-dtb /aarch64.dtb \ +-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":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \ +-device '{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' \ +-device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"}' \ +-device '{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x5"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.2","addr":"0x0"}' \ +-blockdev '{"driver":"file","filename":"/aarch64.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.3","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \ +-netdev user,id=hostnet0 \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.1","addr":"0x0"}' \ +-chardev pty,id=charserial0 \ +-serial chardev:charserial0 \ +-chardev pty,id=charconsole1 \ +-device '{"driver":"virtconsole","chardev":"charconsole1","id":"console1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.4","addr":"0x0"}' \ +-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/random"}' \ +-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.5","addr":"0x0"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 61e5a93fdc..5644825650 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2353,6 +2353,9 @@ mymain(void) QEMU_CAPS_DEVICE_PL011, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST_CAPS_ARCH_VER("aarch64-virt-virtio", "aarch64", "4.2.0"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-virtio", "aarch64"); + /* Demonstrates the virtio-pci default... namely that there isn't any! q35 style PCI controllers will be added if the binary supports it, but virtio-mmio is always used unless PCI addresses are manually -- 2.39.2

The test data is effectively identical to the 'aarch64-virtio-pci-default' case. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../aarch64-virt-2.6-virtio-pci-default.args | 50 ------------------- .../aarch64-virt-2.6-virtio-pci-default.xml | 46 ----------------- tests/qemuxml2argvtest.c | 7 --- 3 files changed, 103 deletions(-) delete mode 100644 tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.args delete mode 100644 tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.xml diff --git a/tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.args b/tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.args deleted file mode 100644 index 288bc9f07f..0000000000 --- a/tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.args +++ /dev/null @@ -1,50 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ -XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ -XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -/usr/bin/qemu-system-aarch64 \ --name guest=aarch64test,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt-2.6,usb=off,gic-version=2,dump-guest-core=off \ --accel tcg \ --cpu cortex-a53 \ --m 1024 \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --kernel /aarch64.kernel \ --initrd /aarch64.initrd \ --append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ --dtb /aarch64.dtb \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device ioh3420,port=16,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \ --device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x2 \ --blockdev '{"driver":"file","filename":"/aarch64.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ --blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ --device virtio-blk-pci,bus=pci.2,addr=0x3,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \ --netdev user,id=hostnet0 \ --device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.2,addr=0x1 \ --chardev pty,id=charserial0 \ --serial chardev:charserial0 \ --chardev pty,id=charconsole1 \ --device virtconsole,chardev=charconsole1,id=console1 \ --audiodev '{"id":"audio1","driver":"none"}' \ --device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x4 \ --object rng-random,id=objrng0,filename=/dev/random \ --device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.2,addr=0x5 \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.xml b/tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.xml deleted file mode 100644 index 43bc0089c9..0000000000 --- a/tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.xml +++ /dev/null @@ -1,46 +0,0 @@ -<domain type="qemu"> - <name>aarch64test</name> - <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> - <memory>1048576</memory> - <currentMemory>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch="aarch64" machine="virt-2.6">hvm</type> - <kernel>/aarch64.kernel</kernel> - <initrd>/aarch64.initrd</initrd> - <dtb>/aarch64.dtb</dtb> - <cmdline>earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait</cmdline> - </os> - <features> - <apic/> - <pae/> - </features> - <cpu match='exact'> - <model>cortex-a53</model> - </cpu> - <clock offset="utc"/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-aarch64</emulator> - <disk type='file' device='disk'> - <source file='/aarch64.raw'/> - <target dev='vda' bus='virtio'/> - </disk> - <interface type='user'> - <mac address='52:54:00:09:a4:37'/> - </interface> - <console type='pty'/> - <console type='pty'> - <target type='virtio' port='0'/> - </console> - <memballoon model='virtio'/> - <!-- - This actually doesn't work in practice because vexpress only has - 4 virtio slots available, rng makes 5 --> - <rng model='virtio'> - <backend model='random'>/dev/random</backend> - </rng> - </devices> -</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 5644825650..044566426d 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2362,13 +2362,6 @@ mymain(void) specified. */ DO_TEST_CAPS_ARCH_VER("aarch64-virtio-pci-default", "aarch64", "4.2.0"); DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-default", "aarch64"); - DO_TEST("aarch64-virt-2.6-virtio-pci-default", - QEMU_CAPS_DEVICE_VIRTIO_MMIO, - QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, - QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PL011, - QEMU_CAPS_DEVICE_IOH3420); /* Example of using virtio-pci with no explicit PCI controller but with manual PCI addresses */ DO_TEST("aarch64-virtio-pci-manual-addresses", -- 2.39.2

Use real caps and clear out flags for PCIe so that we have a real-ish example of an aarch64 machine using mmio. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...ch64-virt-virtio-MMIO.aarch64.latest.args} | 20 ++++++++++--------- tests/qemuxml2argvtest.c | 12 +++++++---- 2 files changed, 19 insertions(+), 13 deletions(-) rename tests/qemuxml2argvdata/{aarch64-virt-virtio.args => aarch64-virt-virtio-MMIO.aarch64.latest.args} (58%) diff --git a/tests/qemuxml2argvdata/aarch64-virt-virtio.args b/tests/qemuxml2argvdata/aarch64-virt-virtio-MMIO.aarch64.latest.args similarity index 58% rename from tests/qemuxml2argvdata/aarch64-virt-virtio.args rename to tests/qemuxml2argvdata/aarch64-virt-virtio-MMIO.aarch64.latest.args index 65cf1f4c35..cfc3195d0f 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-virtio.args +++ b/tests/qemuxml2argvdata/aarch64-virt-virtio-MMIO.aarch64.latest.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ -cpu cortex-a53 \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ @@ -30,18 +31,19 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -initrd /aarch64.initrd \ -append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ -dtb /aarch64.dtb \ --device virtio-serial-device,id=virtio-serial0 \ +-device '{"driver":"virtio-serial-device","id":"virtio-serial0"}' \ -blockdev '{"driver":"file","filename":"/aarch64.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ --device virtio-blk-device,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \ +-device '{"driver":"virtio-blk-device","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \ -netdev user,id=hostnet0 \ --device virtio-net-device,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37 \ +-device '{"driver":"virtio-net-device","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37"}' \ -chardev pty,id=charserial0 \ -serial chardev:charserial0 \ -chardev pty,id=charconsole1 \ --device virtconsole,chardev=charconsole1,id=console1 \ +-device '{"driver":"virtconsole","chardev":"charconsole1","id":"console1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ --device virtio-balloon-device,id=balloon0 \ --object rng-random,id=objrng0,filename=/dev/random \ --device virtio-rng-device,rng=objrng0,id=rng0 \ +-device '{"driver":"virtio-balloon-device","id":"balloon0"}' \ +-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/random"}' \ +-device '{"driver":"virtio-rng-device","rng":"objrng0","id":"rng0"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 044566426d..0bf5bf23b0 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2348,10 +2348,14 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("arm-vexpressa9-virtio", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("arm-virt-virtio", "aarch64"); - DO_TEST("aarch64-virt-virtio", - QEMU_CAPS_DEVICE_VIRTIO_MMIO, - QEMU_CAPS_DEVICE_PL011, - QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); + /* test default config if pcie bus is not available */ + DO_TEST_FULL("aarch64-virt-virtio", "-MMIO.aarch64.latest", + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "latest", + ARG_QEMU_CAPS_DEL, + QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_LAST, ARG_END); DO_TEST_CAPS_ARCH_VER("aarch64-virt-virtio", "aarch64", "4.2.0"); DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-virtio", "aarch64"); -- 2.39.2

Use real capabilities and mask-out support for PCIe. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...e.args => balloon-mmio-deflate.aarch64-latest.args} | 8 +++++--- tests/qemuxml2argvtest.c | 10 +++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) rename tests/qemuxml2argvdata/{balloon-mmio-deflate.args => balloon-mmio-deflate.aarch64-latest.args} (67%) diff --git a/tests/qemuxml2argvdata/balloon-mmio-deflate.args b/tests/qemuxml2argvdata/balloon-mmio-deflate.aarch64-latest.args similarity index 67% rename from tests/qemuxml2argvdata/balloon-mmio-deflate.args rename to tests/qemuxml2argvdata/balloon-mmio-deflate.aarch64-latest.args index 1c05dd6484..c26a05bf81 100644 --- a/tests/qemuxml2argvdata/balloon-mmio-deflate.args +++ b/tests/qemuxml2argvdata/balloon-mmio-deflate.aarch64-latest.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ -cpu cortex-a53 \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ @@ -31,5 +32,6 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ -dtb /aarch64.dtb \ -audiodev '{"id":"audio1","driver":"none"}' \ --device virtio-balloon-device,id=balloon0,deflate-on-oom=on \ +-device '{"driver":"virtio-balloon-device","id":"balloon0","deflate-on-oom":true}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 0bf5bf23b0..93c246bc9b 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1703,9 +1703,13 @@ mymain(void) DO_TEST("balloon-device-deflate", QEMU_CAPS_VIRTIO_BALLOON_AUTODEFLATE); DO_TEST_CAPS_ARCH_LATEST("balloon-ccw-deflate", "s390x"); - DO_TEST("balloon-mmio-deflate", - QEMU_CAPS_DEVICE_VIRTIO_MMIO, - QEMU_CAPS_VIRTIO_BALLOON_AUTODEFLATE); + DO_TEST_FULL("balloon-mmio-deflate", ".aarch64-latest", + ARG_CAPS_ARCH, "aarch64", + ARG_CAPS_VER, "latest", + ARG_QEMU_CAPS_DEL, + QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_LAST, ARG_END); DO_TEST("balloon-device-deflate-off", QEMU_CAPS_VIRTIO_BALLOON_AUTODEFLATE); DO_TEST_NOCAPS("balloon-device-auto"); -- 2.39.2

Make the output changes of upcoming modernization more visible. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../mach-virt-console-native.args | 32 ++++++++++++++++++- .../mach-virt-serial+console-native.args | 32 ++++++++++++++++++- .../mach-virt-serial-compat.args | 32 ++++++++++++++++++- 3 files changed, 93 insertions(+), 3 deletions(-) mode change 120000 => 100644 tests/qemuxml2argvdata/mach-virt-console-native.args mode change 120000 => 100644 tests/qemuxml2argvdata/mach-virt-serial+console-native.args mode change 120000 => 100644 tests/qemuxml2argvdata/mach-virt-serial-compat.args diff --git a/tests/qemuxml2argvdata/mach-virt-console-native.args b/tests/qemuxml2argvdata/mach-virt-console-native.args deleted file mode 120000 index c7abf01bd6..0000000000 --- a/tests/qemuxml2argvdata/mach-virt-console-native.args +++ /dev/null @@ -1 +0,0 @@ -mach-virt-serial-native.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/mach-virt-console-native.args b/tests/qemuxml2argvdata/mach-virt-console-native.args new file mode 100644 index 0000000000..f9f8f49d97 --- /dev/null +++ b/tests/qemuxml2argvdata/mach-virt-console-native.args @@ -0,0 +1,31 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-guest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=guest,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-accel tcg \ +-m 512 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-chardev pty,id=charserial0 \ +-serial chardev:charserial0 \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/mach-virt-serial+console-native.args b/tests/qemuxml2argvdata/mach-virt-serial+console-native.args deleted file mode 120000 index c7abf01bd6..0000000000 --- a/tests/qemuxml2argvdata/mach-virt-serial+console-native.args +++ /dev/null @@ -1 +0,0 @@ -mach-virt-serial-native.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/mach-virt-serial+console-native.args b/tests/qemuxml2argvdata/mach-virt-serial+console-native.args new file mode 100644 index 0000000000..f9f8f49d97 --- /dev/null +++ b/tests/qemuxml2argvdata/mach-virt-serial+console-native.args @@ -0,0 +1,31 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-guest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=guest,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-accel tcg \ +-m 512 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-chardev pty,id=charserial0 \ +-serial chardev:charserial0 \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/mach-virt-serial-compat.args b/tests/qemuxml2argvdata/mach-virt-serial-compat.args deleted file mode 120000 index c7abf01bd6..0000000000 --- a/tests/qemuxml2argvdata/mach-virt-serial-compat.args +++ /dev/null @@ -1 +0,0 @@ -mach-virt-serial-native.args \ No newline at end of file diff --git a/tests/qemuxml2argvdata/mach-virt-serial-compat.args b/tests/qemuxml2argvdata/mach-virt-serial-compat.args new file mode 100644 index 0000000000..f9f8f49d97 --- /dev/null +++ b/tests/qemuxml2argvdata/mach-virt-serial-compat.args @@ -0,0 +1,31 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-guest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=guest,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-accel tcg \ +-m 512 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-chardev pty,id=charserial0 \ +-serial chardev:charserial0 \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=on -- 2.39.2

Use real capabilities. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...h-virt-console-native.aarch64-latest.args} | 7 +++- ...h-virt-console-virtio.aarch64-latest.args} | 13 +++++-- ...serial+console-native.aarch64-latest.args} | 7 +++- ...ch-virt-serial-compat.aarch64-latest.args} | 7 +++- ...-serial-invalid-machine.x86_64-latest.err} | 0 ...ch-virt-serial-native.aarch64-latest.args} | 7 +++- .../mach-virt-serial-pci.aarch64-latest.args | 37 +++++++++++++++++++ .../mach-virt-serial-pci.args | 34 ----------------- .../mach-virt-serial-usb.aarch64-latest.args | 37 +++++++++++++++++++ .../mach-virt-serial-usb.args | 34 ----------------- tests/qemuxml2argvtest.c | 30 ++++----------- 11 files changed, 111 insertions(+), 102 deletions(-) rename tests/qemuxml2argvdata/{mach-virt-console-native.args => mach-virt-console-native.aarch64-latest.args} (67%) rename tests/qemuxml2argvdata/{mach-virt-console-virtio.args => mach-virt-console-virtio.aarch64-latest.args} (50%) rename tests/qemuxml2argvdata/{mach-virt-serial-native.args => mach-virt-serial+console-native.aarch64-latest.args} (67%) rename tests/qemuxml2argvdata/{mach-virt-serial+console-native.args => mach-virt-serial-compat.aarch64-latest.args} (67%) rename tests/qemuxml2argvdata/{mach-virt-serial-invalid-machine.err => mach-virt-serial-invalid-machine.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{mach-virt-serial-compat.args => mach-virt-serial-native.aarch64-latest.args} (67%) create mode 100644 tests/qemuxml2argvdata/mach-virt-serial-pci.aarch64-latest.args delete mode 100644 tests/qemuxml2argvdata/mach-virt-serial-pci.args create mode 100644 tests/qemuxml2argvdata/mach-virt-serial-usb.aarch64-latest.args delete mode 100644 tests/qemuxml2argvdata/mach-virt-serial-usb.args diff --git a/tests/qemuxml2argvdata/mach-virt-console-native.args b/tests/qemuxml2argvdata/mach-virt-console-native.aarch64-latest.args similarity index 67% rename from tests/qemuxml2argvdata/mach-virt-console-native.args rename to tests/qemuxml2argvdata/mach-virt-console-native.aarch64-latest.args index f9f8f49d97..7324c37696 100644 --- a/tests/qemuxml2argvdata/mach-virt-console-native.args +++ b/tests/qemuxml2argvdata/mach-virt-console-native.aarch64-latest.args @@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=guest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ +-cpu cortex-a15 \ -m 512 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":536870912}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ @@ -28,4 +30,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ -chardev pty,id=charserial0 \ -serial chardev:charserial0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/mach-virt-console-virtio.args b/tests/qemuxml2argvdata/mach-virt-console-virtio.aarch64-latest.args similarity index 50% rename from tests/qemuxml2argvdata/mach-virt-console-virtio.args rename to tests/qemuxml2argvdata/mach-virt-console-virtio.aarch64-latest.args index 9e0cbf403e..926ca90ba1 100644 --- a/tests/qemuxml2argvdata/mach-virt-console-virtio.args +++ b/tests/qemuxml2argvdata/mach-virt-console-virtio.aarch64-latest.args @@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=guest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ +-cpu cortex-a15 \ -m 512 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":536870912}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ @@ -25,8 +27,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --device virtio-serial-device,id=virtio-serial0 \ +-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":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.1","addr":"0x0"}' \ -chardev pty,id=charconsole0 \ --device virtconsole,chardev=charconsole0,id=console0 \ +-device '{"driver":"virtconsole","chardev":"charconsole0","id":"console0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/mach-virt-serial-native.args b/tests/qemuxml2argvdata/mach-virt-serial+console-native.aarch64-latest.args similarity index 67% rename from tests/qemuxml2argvdata/mach-virt-serial-native.args rename to tests/qemuxml2argvdata/mach-virt-serial+console-native.aarch64-latest.args index f9f8f49d97..7324c37696 100644 --- a/tests/qemuxml2argvdata/mach-virt-serial-native.args +++ b/tests/qemuxml2argvdata/mach-virt-serial+console-native.aarch64-latest.args @@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=guest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ +-cpu cortex-a15 \ -m 512 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":536870912}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ @@ -28,4 +30,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ -chardev pty,id=charserial0 \ -serial chardev:charserial0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/mach-virt-serial+console-native.args b/tests/qemuxml2argvdata/mach-virt-serial-compat.aarch64-latest.args similarity index 67% rename from tests/qemuxml2argvdata/mach-virt-serial+console-native.args rename to tests/qemuxml2argvdata/mach-virt-serial-compat.aarch64-latest.args index f9f8f49d97..7324c37696 100644 --- a/tests/qemuxml2argvdata/mach-virt-serial+console-native.args +++ b/tests/qemuxml2argvdata/mach-virt-serial-compat.aarch64-latest.args @@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=guest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ +-cpu cortex-a15 \ -m 512 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":536870912}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ @@ -28,4 +30,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ -chardev pty,id=charserial0 \ -serial chardev:charserial0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/mach-virt-serial-invalid-machine.err b/tests/qemuxml2argvdata/mach-virt-serial-invalid-machine.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/mach-virt-serial-invalid-machine.err rename to tests/qemuxml2argvdata/mach-virt-serial-invalid-machine.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/mach-virt-serial-compat.args b/tests/qemuxml2argvdata/mach-virt-serial-native.aarch64-latest.args similarity index 67% rename from tests/qemuxml2argvdata/mach-virt-serial-compat.args rename to tests/qemuxml2argvdata/mach-virt-serial-native.aarch64-latest.args index f9f8f49d97..7324c37696 100644 --- a/tests/qemuxml2argvdata/mach-virt-serial-compat.args +++ b/tests/qemuxml2argvdata/mach-virt-serial-native.aarch64-latest.args @@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=guest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ +-cpu cortex-a15 \ -m 512 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":536870912}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ @@ -28,4 +30,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ -chardev pty,id=charserial0 \ -serial chardev:charserial0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/mach-virt-serial-pci.aarch64-latest.args b/tests/qemuxml2argvdata/mach-virt-serial-pci.aarch64-latest.args new file mode 100644 index 0000000000..8654cb2f6a --- /dev/null +++ b/tests/qemuxml2argvdata/mach-virt-serial-pci.aarch64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-guest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=guest,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ +-accel tcg \ +-cpu cortex-a15 \ +-m 512 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":536870912}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-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-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \ +-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"pci-serial","chardev":"charserial0","id":"serial0","bus":"pci.2","addr":"0x1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/mach-virt-serial-pci.args b/tests/qemuxml2argvdata/mach-virt-serial-pci.args deleted file mode 100644 index 5cea9553c9..0000000000 --- a/tests/qemuxml2argvdata/mach-virt-serial-pci.args +++ /dev/null @@ -1,34 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/var/lib/libvirt/qemu/domain--1-guest \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ -XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ -XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ -/usr/bin/qemu-system-aarch64 \ --name guest=guest,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ --accel tcg \ --m 512 \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device pcie-root-port,port=16,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \ --chardev pty,id=charserial0 \ --device pci-serial,chardev=charserial0,id=serial0,bus=pci.2,addr=0x1 \ --audiodev '{"id":"audio1","driver":"none"}' \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/mach-virt-serial-usb.aarch64-latest.args b/tests/qemuxml2argvdata/mach-virt-serial-usb.aarch64-latest.args new file mode 100644 index 0000000000..e672cb1a1e --- /dev/null +++ b/tests/qemuxml2argvdata/mach-virt-serial-usb.aarch64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-guest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=guest,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ +-accel tcg \ +-cpu cortex-a15 \ +-m 512 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":536870912}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-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"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"usb-serial","chardev":"charserial0","id":"serial0","bus":"usb.0","port":"1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/mach-virt-serial-usb.args b/tests/qemuxml2argvdata/mach-virt-serial-usb.args deleted file mode 100644 index d9f65930c3..0000000000 --- a/tests/qemuxml2argvdata/mach-virt-serial-usb.args +++ /dev/null @@ -1,34 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/var/lib/libvirt/qemu/domain--1-guest \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ -XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ -XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ -/usr/bin/qemu-system-aarch64 \ --name guest=guest,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ --accel tcg \ --m 512 \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \ --device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ --device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ --chardev pty,id=charserial0 \ --device usb-serial,chardev=charserial0,id=serial0,bus=usb.0,port=1 \ --audiodev '{"id":"audio1","driver":"none"}' \ --msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 93c246bc9b..faa5077112 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1999,28 +1999,14 @@ mymain(void) DO_TEST_PARSE_ERROR_NOCAPS("pseries-serial-invalid-machine"); DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("pseries-spaprvio-invalid", "ppc64"); - DO_TEST("mach-virt-serial-native", - QEMU_CAPS_DEVICE_PL011); - DO_TEST("mach-virt-serial+console-native", - QEMU_CAPS_DEVICE_PL011); - DO_TEST("mach-virt-serial-compat", - QEMU_CAPS_DEVICE_PL011); - DO_TEST("mach-virt-serial-pci", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_SERIAL); - DO_TEST("mach-virt-serial-usb", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, - QEMU_CAPS_DEVICE_QEMU_XHCI, - QEMU_CAPS_DEVICE_USB_SERIAL); - DO_TEST("mach-virt-console-native", - QEMU_CAPS_DEVICE_PL011); - DO_TEST("mach-virt-console-virtio", - QEMU_CAPS_DEVICE_VIRTIO_MMIO); - DO_TEST_PARSE_ERROR_NOCAPS("mach-virt-serial-invalid-machine"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-native", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial+console-native", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-compat", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-pci", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-usb", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-console-native", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-console-virtio", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("mach-virt-serial-invalid-machine", "x86_64"); DO_TEST("video-device-pciaddr-default", QEMU_CAPS_KVM, -- 2.39.2

With all supported qemu versions we'll pick PCIe to use for the implicit address busses (those lacking an explicit controller) and thus the addresses must reflect that. Update the test to add the new flags, and fix the addresses. Additionally add a real-caps version of the test. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...o-pci-manual-addresses.aarch64-latest.args | 49 ++++++++++++ .../aarch64-virtio-pci-manual-addresses.args | 10 ++- .../aarch64-virtio-pci-manual-addresses.xml | 4 +- tests/qemuxml2argvtest.c | 4 + ...io-pci-manual-addresses.aarch64-latest.xml | 75 +++++++++++++++++++ .../aarch64-virtio-pci-manual-addresses.xml | 24 ++++-- tests/qemuxml2xmltest.c | 4 + 7 files changed, 157 insertions(+), 13 deletions(-) create mode 100644 tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.aarch64-latest.args create mode 100644 tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.aarch64-latest.xml diff --git a/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.aarch64-latest.args new file mode 100644 index 0000000000..dcf5d187fa --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.aarch64-latest.args @@ -0,0 +1,49 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ +-accel tcg \ +-cpu cortex-a53 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-kernel /aarch64.kernel \ +-initrd /aarch64.initrd \ +-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ +-dtb /aarch64.dtb \ +-device '{"driver":"i82801b11-bridge","id":"pci.1","bus":"pcie.0","addr":"0x1"}' \ +-device '{"driver":"pci-bridge","chassis_nr":2,"id":"pci.2","bus":"pci.1","addr":"0x0"}' \ +-device '{"driver":"pcie-root-port","port":16,"chassis":3,"id":"pci.3","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \ +-device '{"driver":"pcie-root-port","port":17,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x1"}' \ +-device '{"driver":"pcie-root-port","port":18,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x2"}' \ +-device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.4","addr":"0x0"}' \ +-blockdev '{"driver":"file","filename":"/aarch64.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ +-device '{"driver":"scsi-hd","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":0,"device_id":"drive-scsi0-0-0-0","drive":"libvirt-1-format","id":"scsi0-0-0-0","bootindex":1}' \ +-netdev user,id=hostnet0 \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.3","addr":"0x0"}' \ +-netdev user,id=hostnet1 \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet1","id":"net1","mac":"52:54:00:09:a4:38","bus":"pci.5","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/aarch64-virtio-pci-manual-addresses.args b/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.args index 65c2b3b706..bdc5e7b798 100644 --- a/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.args +++ b/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.args @@ -32,14 +32,16 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -dtb /aarch64.dtb \ -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device pci-bridge,chassis_nr=3,id=pci.3,bus=pci.1,addr=0x1 \ --device virtio-scsi-pci,id=scsi0,bus=pci.3,addr=0x1 \ +-device pcie-root-port,port=16,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,addr=0x2 \ +-device pcie-root-port,port=17,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x1 \ +-device pcie-root-port,port=18,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x2 \ +-device virtio-scsi-pci,id=scsi0,bus=pci.4,addr=0x0 \ -blockdev '{"driver":"file","filename":"/aarch64.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,device_id=drive-scsi0-0-0-0,drive=libvirt-1-format,id=scsi0-0-0-0,bootindex=1 \ -netdev user,id=hostnet0 \ --device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.3,addr=0x2 \ +-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.3,addr=0x0 \ -netdev user,id=hostnet1 \ --device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:09:a4:38,bus=pci.2,addr=0x1 \ +-device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:09:a4:38,bus=pci.5,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.xml b/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.xml index fee32588f7..d1c3ccc70e 100644 --- a/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.xml +++ b/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.xml @@ -41,12 +41,12 @@ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </controller> <controller type='scsi' index='0' model='virtio-scsi'> - <address type='pci' domain='0x0000' bus='0x03' slot='0x01' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </controller> <interface type='user'> <mac address='52:54:00:09:a4:37'/> <model type='virtio'/> - <address type='pci' domain='0x0000' bus='0x03' slot='0x02' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:09:a4:38'/> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index faa5077112..7b2ae88658 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2358,11 +2358,15 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-default", "aarch64"); /* Example of using virtio-pci with no explicit PCI controller but with manual PCI addresses */ + DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-manual-addresses", "aarch64"); DO_TEST("aarch64-virtio-pci-manual-addresses", QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, + QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, + QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-video-virtio-gpu-pci", diff --git a/tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.aarch64-latest.xml new file mode 100644 index 0000000000..63c2636f5e --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.aarch64-latest.xml @@ -0,0 +1,75 @@ +<domain type='qemu'> + <name>aarch64test</name> + <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <kernel>/aarch64.kernel</kernel> + <initrd>/aarch64.initrd</initrd> + <cmdline>earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait</cmdline> + <dtb>/aarch64.dtb</dtb> + <boot dev='hd'/> + </os> + <features> + <apic/> + <pae/> + <gic version='2'/> + </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='allow'>cortex-a53</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/aarch64.raw'/> + <target dev='sda' bus='scsi'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='pci' index='1' model='dmi-to-pci-bridge'> + <model name='i82801b11-bridge'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </controller> + <controller type='pci' index='2' model='pci-bridge'> + <model name='pci-bridge'/> + <target chassisNr='2'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </controller> + <controller type='scsi' index='0' model='virtio-scsi'> + <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='3' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='3' port='0x10'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='4' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='4' port='0x11'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> + </controller> + <controller type='pci' index='5' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='5' port='0x12'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/> + </controller> + <interface type='user'> + <mac address='52:54:00:09:a4:37'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + </interface> + <interface type='user'> + <mac address='52:54:00:09:a4:38'/> + <model type='virtio'/> + <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> + </interface> + <audio id='1' type='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.xml b/tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.xml index 7c90f21f39..63c2636f5e 100644 --- a/tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.xml +++ b/tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.xml @@ -43,22 +43,32 @@ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </controller> <controller type='scsi' index='0' model='virtio-scsi'> - <address type='pci' domain='0x0000' bus='0x03' slot='0x01' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </controller> - <controller type='pci' index='3' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='3'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> + <controller type='pci' index='3' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='3' port='0x10'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='4' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='4' port='0x11'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> + </controller> + <controller type='pci' index='5' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='5' port='0x12'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/> </controller> <interface type='user'> <mac address='52:54:00:09:a4:37'/> <model type='virtio'/> - <address type='pci' domain='0x0000' bus='0x03' slot='0x02' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:09:a4:38'/> <model type='virtio'/> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> </interface> <audio id='1' type='none'/> </devices> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index a8a6cd6ca7..328f8cba6a 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -935,11 +935,15 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-default", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-manual-addresses", "aarch64"); DO_TEST("aarch64-virtio-pci-manual-addresses", QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, + QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, + QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-video-virtio-gpu-pci", -- 2.39.2

The fake-caps version was kept as an example that the code behaves the same with real capabilities. Now it's not needed any more. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../aarch64-virtio-pci-manual-addresses.args | 47 ------------ tests/qemuxml2argvtest.c | 10 --- .../aarch64-virtio-pci-manual-addresses.xml | 75 ------------------- tests/qemuxml2xmltest.c | 10 --- 4 files changed, 142 deletions(-) delete mode 100644 tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.args delete mode 100644 tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.xml diff --git a/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.args b/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.args deleted file mode 100644 index bdc5e7b798..0000000000 --- a/tests/qemuxml2argvdata/aarch64-virtio-pci-manual-addresses.args +++ /dev/null @@ -1,47 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \ -XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \ -XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -/usr/bin/qemu-system-aarch64 \ --name guest=aarch64test,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ --accel tcg \ --cpu cortex-a53 \ --m 1024 \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --kernel /aarch64.kernel \ --initrd /aarch64.initrd \ --append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ --dtb /aarch64.dtb \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device pcie-root-port,port=16,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,addr=0x2 \ --device pcie-root-port,port=17,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x1 \ --device pcie-root-port,port=18,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x2 \ --device virtio-scsi-pci,id=scsi0,bus=pci.4,addr=0x0 \ --blockdev '{"driver":"file","filename":"/aarch64.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ --blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ --device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,device_id=drive-scsi0-0-0-0,drive=libvirt-1-format,id=scsi0-0-0-0,bootindex=1 \ --netdev user,id=hostnet0 \ --device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.3,addr=0x0 \ --netdev user,id=hostnet1 \ --device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:09:a4:38,bus=pci.5,addr=0x0 \ --audiodev '{"id":"audio1","driver":"none"}' \ --msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7b2ae88658..93e6d095c2 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2359,16 +2359,6 @@ mymain(void) /* Example of using virtio-pci with no explicit PCI controller but with manual PCI addresses */ DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-manual-addresses", "aarch64"); - DO_TEST("aarch64-virtio-pci-manual-addresses", - QEMU_CAPS_DEVICE_VIRTIO_MMIO, - QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, - QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, - QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, - QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-video-virtio-gpu-pci", QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, diff --git a/tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.xml b/tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.xml deleted file mode 100644 index 63c2636f5e..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-virtio-pci-manual-addresses.xml +++ /dev/null @@ -1,75 +0,0 @@ -<domain type='qemu'> - <name>aarch64test</name> - <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='aarch64' machine='virt'>hvm</type> - <kernel>/aarch64.kernel</kernel> - <initrd>/aarch64.initrd</initrd> - <cmdline>earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait</cmdline> - <dtb>/aarch64.dtb</dtb> - <boot dev='hd'/> - </os> - <features> - <apic/> - <pae/> - <gic version='2'/> - </features> - <cpu mode='custom' match='exact' check='none'> - <model fallback='allow'>cortex-a53</model> - </cpu> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-aarch64</emulator> - <disk type='file' device='disk'> - <driver name='qemu' type='raw'/> - <source file='/aarch64.raw'/> - <target dev='sda' bus='scsi'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='scsi' index='0' model='virtio-scsi'> - <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> - <model name='pcie-root-port'/> - <target chassis='3' port='0x10'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> - </controller> - <controller type='pci' index='4' model='pcie-root-port'> - <model name='pcie-root-port'/> - <target chassis='4' port='0x11'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> - </controller> - <controller type='pci' index='5' model='pcie-root-port'> - <model name='pcie-root-port'/> - <target chassis='5' port='0x12'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/> - </controller> - <interface type='user'> - <mac address='52:54:00:09:a4:37'/> - <model type='virtio'/> - <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> - </interface> - <interface type='user'> - <mac address='52:54:00:09:a4:38'/> - <model type='virtio'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> - </interface> - <audio id='1' type='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 328f8cba6a..9b8669cd4f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -936,16 +936,6 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-default", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-manual-addresses", "aarch64"); - DO_TEST("aarch64-virtio-pci-manual-addresses", - QEMU_CAPS_DEVICE_VIRTIO_MMIO, - QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, - QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, - QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, - QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-video-virtio-gpu-pci", QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, -- 2.39.2

All supported qemu versions at this point support both 'qemu-xhci' and 'nec-xhci' controllers. To allow using real capabilities restructure the tests so that we test both controllers explicitly as well as the selection of the default model. Also add a xml2xml test invocation of the unified test. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../aarch64-usb-controller-qemu-xhci.args | 30 ---------------- .../aarch64-usb-controller-qemu-xhci.xml | 16 --------- ...arch64-usb-controller.aarch64-latest.args} | 11 ++++-- ...ec-xhci.xml => aarch64-usb-controller.xml} | 6 ++++ tests/qemuxml2argvtest.c | 9 +---- .../aarch64-usb-controller.aarch64-latest.xml | 36 +++++++++++++++++++ tests/qemuxml2xmltest.c | 2 ++ 7 files changed, 53 insertions(+), 57 deletions(-) delete mode 100644 tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.args delete mode 100644 tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.xml rename tests/qemuxml2argvdata/{aarch64-usb-controller-nec-xhci.args => aarch64-usb-controller.aarch64-latest.args} (55%) rename tests/qemuxml2argvdata/{aarch64-usb-controller-nec-xhci.xml => aarch64-usb-controller.xml} (61%) create mode 100644 tests/qemuxml2xmloutdata/aarch64-usb-controller.aarch64-latest.xml diff --git a/tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.args b/tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.args deleted file mode 100644 index 099d8617b6..0000000000 --- a/tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.args +++ /dev/null @@ -1,30 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -/usr/bin/qemu-system-aarch64 \ --name guest=QEMUGuest1,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ --accel tcg \ --m 214 \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --device qemu-xhci,id=usb,bus=pcie.0,addr=0x1 \ --audiodev '{"id":"audio1","driver":"none"}' \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.xml b/tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.xml deleted file mode 100644 index 1b7320f433..0000000000 --- a/tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.xml +++ /dev/null @@ -1,16 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='aarch64' machine='virt'>hvm</type> - </os> - <devices> - <emulator>/usr/bin/qemu-system-aarch64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.args b/tests/qemuxml2argvdata/aarch64-usb-controller.aarch64-latest.args similarity index 55% rename from tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.args rename to tests/qemuxml2argvdata/aarch64-usb-controller.aarch64-latest.args index ce7cd798cc..0879a1fb91 100644 --- a/tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.args +++ b/tests/qemuxml2argvdata/aarch64-usb-controller.aarch64-latest.args @@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=QEMUGuest1,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ +-cpu cortex-a15 \ -m 214 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":224395264}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ @@ -25,6 +27,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --device nec-usb-xhci,id=usb,bus=pcie.0,addr=0x1 \ +-device '{"driver":"qemu-xhci","id":"usb","bus":"pcie.0","addr":"0x1"}' \ +-device '{"driver":"nec-usb-xhci","id":"usb1","bus":"pcie.0","addr":"0x2"}' \ +-device '{"driver":"qemu-xhci","id":"usb2","bus":"pcie.0","addr":"0x3"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.xml b/tests/qemuxml2argvdata/aarch64-usb-controller.xml similarity index 61% rename from tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.xml rename to tests/qemuxml2argvdata/aarch64-usb-controller.xml index 1b7320f433..b95503ed26 100644 --- a/tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.xml +++ b/tests/qemuxml2argvdata/aarch64-usb-controller.xml @@ -11,6 +11,12 @@ <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </controller> + <controller type='usb' index='1' model='nec-xhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </controller> + <controller type='usb' index='2' model='qemu-xhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </controller> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 93e6d095c2..a10bed05d5 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2554,14 +2554,7 @@ mymain(void) DO_TEST_CAPS_LATEST_PPC64("ppc64-tpmproxy-single"); DO_TEST_CAPS_LATEST_PPC64("ppc64-tpmproxy-with-tpm"); - DO_TEST("aarch64-usb-controller-qemu-xhci", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_NEC_USB_XHCI, - QEMU_CAPS_DEVICE_QEMU_XHCI); - - DO_TEST("aarch64-usb-controller-nec-xhci", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_NEC_USB_XHCI); + DO_TEST_CAPS_ARCH_LATEST("aarch64-usb-controller", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("sparc-minimal", "sparc"); diff --git a/tests/qemuxml2xmloutdata/aarch64-usb-controller.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-usb-controller.aarch64-latest.xml new file mode 100644 index 0000000000..0e0f797cd5 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-usb-controller.aarch64-latest.xml @@ -0,0 +1,36 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='2'/> + </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='qemu-xhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </controller> + <controller type='usb' index='1' model='nec-xhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </controller> + <controller type='usb' index='2' model='qemu-xhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 9b8669cd4f..23239fdbba 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -986,6 +986,8 @@ mymain(void) /* SVE aarch64 CPU features work on modern QEMU */ DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-usb-controller", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("memory-hotplug-ppc64-nonuma", "ppc64"); DO_TEST_FULL("memory-hotplug-ppc64-nonuma-abi-update", "", WHEN_BOTH, ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, -- 2.39.2

Use real capabilities for them. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...h64-aavmf-virtio-mmio.aarch64-latest.args} | 20 +++++----- ...rch64-cpu-passthrough.aarch64-latest.args} | 10 +++-- ...=> aarch64-pci-serial.aarch64-latest.args} | 15 ++++--- ...arch64-tpm-wrong-model.aarch64-latest.err} | 0 ...arch64-traditional-pci.aarch64-latest.args | 37 +++++++++++++++++ .../aarch64-traditional-pci.args | 34 ---------------- ...aarch64-video-default.aarch64-latest.args} | 13 +++--- ...4-video-virtio-gpu-pci.aarch64-latest.args | 37 +++++++++++++++++ .../aarch64-video-virtio-gpu-pci.args | 35 ---------------- ...ch64-virt-default-nic.aarch64-latest.args} | 10 +++-- tests/qemuxml2argvtest.c | 40 ++++--------------- 11 files changed, 123 insertions(+), 128 deletions(-) rename tests/qemuxml2argvdata/{aarch64-aavmf-virtio-mmio.args => aarch64-aavmf-virtio-mmio.aarch64-latest.args} (57%) rename tests/qemuxml2argvdata/{aarch64-cpu-passthrough.args => aarch64-cpu-passthrough.aarch64-latest.args} (58%) rename tests/qemuxml2argvdata/{aarch64-pci-serial.args => aarch64-pci-serial.aarch64-latest.args} (52%) rename tests/qemuxml2argvdata/{aarch64-tpm-wrong-model.err => aarch64-tpm-wrong-model.aarch64-latest.err} (100%) create mode 100644 tests/qemuxml2argvdata/aarch64-traditional-pci.aarch64-latest.args delete mode 100644 tests/qemuxml2argvdata/aarch64-traditional-pci.args rename tests/qemuxml2argvdata/{aarch64-video-default.args => aarch64-video-default.aarch64-latest.args} (54%) create mode 100644 tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.aarch64-latest.args delete mode 100644 tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args rename tests/qemuxml2argvdata/{aarch64-virt-default-nic.args => aarch64-virt-default-nic.aarch64-latest.args} (56%) diff --git a/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args b/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.aarch64-latest.args similarity index 57% rename from tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args rename to tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.aarch64-latest.args index c387eb6989..220ed0213a 100644 --- a/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args +++ b/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.aarch64-latest.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ -cpu cortex-a53 \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ @@ -30,16 +31,17 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -initrd /aarch64.initrd \ -append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ -dtb /aarch64.dtb \ --device virtio-serial-device,id=virtio-serial0 \ +-device '{"driver":"virtio-serial-device","id":"virtio-serial0"}' \ -blockdev '{"driver":"file","filename":"/aarch64.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ --device virtio-blk-device,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \ +-device '{"driver":"virtio-blk-device","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \ -netdev user,id=hostnet0 \ --device virtio-net-device,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37 \ +-device '{"driver":"virtio-net-device","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37"}' \ -chardev pty,id=charconsole0 \ --device virtconsole,chardev=charconsole0,id=console0 \ +-device '{"driver":"virtconsole","chardev":"charconsole0","id":"console0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ --device virtio-balloon-device,id=balloon0 \ --object rng-random,id=objrng0,filename=/dev/random \ --device virtio-rng-device,rng=objrng0,id=rng0 \ +-device '{"driver":"virtio-balloon-device","id":"balloon0"}' \ +-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/random"}' \ +-device '{"driver":"virtio-rng-device","rng":"objrng0","id":"rng0"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-cpu-passthrough.args b/tests/qemuxml2argvdata/aarch64-cpu-passthrough.aarch64-latest.args similarity index 58% rename from tests/qemuxml2argvdata/aarch64-cpu-passthrough.args rename to tests/qemuxml2argvdata/aarch64-cpu-passthrough.aarch64-latest.args index 1b6007f822..09e85ae107 100644 --- a/tests/qemuxml2argvdata/aarch64-cpu-passthrough.args +++ b/tests/qemuxml2argvdata/aarch64-cpu-passthrough.aarch64-latest.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel kvm \ -cpu host \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ @@ -26,8 +27,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-shutdown \ -no-acpi \ -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"}' \ -blockdev '{"driver":"file","filename":"/aarch64.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ --device virtio-blk-device,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \ +-device '{"driver":"virtio-blk-pci","bus":"pci.1","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-pci-serial.args b/tests/qemuxml2argvdata/aarch64-pci-serial.aarch64-latest.args similarity index 52% rename from tests/qemuxml2argvdata/aarch64-pci-serial.args rename to tests/qemuxml2argvdata/aarch64-pci-serial.aarch64-latest.args index 3bc1435c33..703462ce11 100644 --- a/tests/qemuxml2argvdata/aarch64-pci-serial.args +++ b/tests/qemuxml2argvdata/aarch64-pci-serial.aarch64-latest.args @@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64test,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ +-cpu cortex-a15 \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ @@ -25,11 +27,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device pcie-root-port,port=16,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \ +-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \ +-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \ +-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \ -add-fd set=0,fd=1751,opaque=serial0-log \ -chardev pty,id=charserial0,logfile=/dev/fdset/0,logappend=on \ --device pci-serial,chardev=charserial0,id=serial0,bus=pci.2,addr=0x1 \ +-device '{"driver":"pci-serial","chardev":"charserial0","id":"serial0","bus":"pci.2","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-tpm-wrong-model.err b/tests/qemuxml2argvdata/aarch64-tpm-wrong-model.aarch64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/aarch64-tpm-wrong-model.err rename to tests/qemuxml2argvdata/aarch64-tpm-wrong-model.aarch64-latest.err diff --git a/tests/qemuxml2argvdata/aarch64-traditional-pci.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-traditional-pci.aarch64-latest.args new file mode 100644 index 0000000000..4a5c94d951 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-traditional-pci.aarch64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-guest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=guest,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ +-accel tcg \ +-cpu cortex-a15 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-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-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \ +-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"pci-serial","chardev":"charserial0","id":"serial0","bus":"pci.2","addr":"0x1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-traditional-pci.args b/tests/qemuxml2argvdata/aarch64-traditional-pci.args deleted file mode 100644 index ba419aa46d..0000000000 --- a/tests/qemuxml2argvdata/aarch64-traditional-pci.args +++ /dev/null @@ -1,34 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/var/lib/libvirt/qemu/domain--1-guest \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ -XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ -XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ -/usr/bin/qemu-system-aarch64 \ --name guest=guest,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ --accel tcg \ --m 1024 \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \ --device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \ --device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \ --chardev pty,id=charserial0 \ --device pci-serial,chardev=charserial0,id=serial0,bus=pci.2,addr=0x1 \ --audiodev '{"id":"audio1","driver":"none"}' \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-video-default.args b/tests/qemuxml2argvdata/aarch64-video-default.aarch64-latest.args similarity index 54% rename from tests/qemuxml2argvdata/aarch64-video-default.args rename to tests/qemuxml2argvdata/aarch64-video-default.aarch64-latest.args index ab19ac1c75..e3135fc2e6 100644 --- a/tests/qemuxml2argvdata/aarch64-video-default.args +++ b/tests/qemuxml2argvdata/aarch64-video-default.aarch64-latest.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64-vgpu,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ -cpu cortex-a57 \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid f3197c89-6457-44fe-b26d-897090ba6541 \ @@ -25,10 +26,10 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device ioh3420,port=16,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \ +-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"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -vnc 127.0.0.1:0,audiodev=audio1 \ --device virtio-gpu-pci,id=video0,max_outputs=1,bus=pci.2,addr=0x1 \ +-device '{"driver":"virtio-gpu-pci","id":"video0","max_outputs":1,"bus":"pci.1","addr":"0x0"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.aarch64-latest.args new file mode 100644 index 0000000000..ca31701d94 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.aarch64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=aarch64-vgpu,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ +-accel tcg \ +-cpu cortex-a57 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid f3197c89-6457-44fe-b26d-897090ba6541 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-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","multifunction":true,"addr":"0x1.0x1"}' \ +-netdev user,id=hostnet0 \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:73:34:53","bootindex":1,"bus":"pci.1","addr":"0x0"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-gpu-pci","id":"video0","max_outputs":1,"bus":"pci.2","addr":"0x0"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args b/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args deleted file mode 100644 index 74529a9168..0000000000 --- a/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args +++ /dev/null @@ -1,35 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/.local/share \ -XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/.cache \ -XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/.config \ -/usr/bin/qemu-system-aarch64 \ --name guest=aarch64-vgpu,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64-vgpu/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ --accel tcg \ --cpu cortex-a57 \ --m 1024 \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid f3197c89-6457-44fe-b26d-897090ba6541 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --device ioh3420,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \ --device ioh3420,port=9,chassis=2,id=pci.2,bus=pcie.0,multifunction=on,addr=0x1.0x1 \ --netdev user,id=hostnet0 \ --device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:73:34:53,bootindex=1,bus=pci.1,addr=0x0 \ --audiodev '{"id":"audio1","driver":"none"}' \ --device virtio-gpu-pci,id=video0,max_outputs=1,bus=pci.2,addr=0x0 \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/aarch64-virt-default-nic.args b/tests/qemuxml2argvdata/aarch64-virt-default-nic.aarch64-latest.args similarity index 56% rename from tests/qemuxml2argvdata/aarch64-virt-default-nic.args rename to tests/qemuxml2argvdata/aarch64-virt-default-nic.aarch64-latest.args index 2c60c8d57b..3628a9b65b 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-default-nic.args +++ b/tests/qemuxml2argvdata/aarch64-virt-default-nic.aarch64-latest.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64-virt-default/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=aarch64-virt-default-nic,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64-virt-default/master-key.aes \ --machine virt,usb=off,gic-version=2,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64-virt-default/master-key.aes"}' \ +-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \ -accel tcg \ -cpu cortex-a53 \ -m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ @@ -29,7 +30,10 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64-virt-default/.config \ -kernel /aarch64.kernel \ -initrd /aarch64.initrd \ -append console=ttyAMA0 \ +-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"}' \ -netdev user,id=hostnet0 \ --device virtio-net-device,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37 \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","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/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a10bed05d5..e055d372fa 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2119,7 +2119,7 @@ mymain(void) DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-pstate"); DO_TEST_CAPS_LATEST_PPC64("tpm-emulator-spapr"); DO_TEST_CAPS_ARCH_LATEST("aarch64-tpm", "aarch64"); - DO_TEST_PARSE_ERROR_NOCAPS("aarch64-tpm-wrong-model"); + DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-tpm-wrong-model", "aarch64"); DO_TEST_CAPS_LATEST("tpm-external"); g_setenv(TEST_TPM_ENV_VAR, TPM_VER_2_0, true); @@ -2359,24 +2359,11 @@ mymain(void) /* Example of using virtio-pci with no explicit PCI controller but with manual PCI addresses */ DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-manual-addresses", "aarch64"); - DO_TEST("aarch64-video-virtio-gpu-pci", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_VIRTIO_GPU); - DO_TEST("aarch64-video-default", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_VNC); - DO_TEST("aarch64-aavmf-virtio-mmio", - QEMU_CAPS_DEVICE_VIRTIO_MMIO, - QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); - DO_TEST("aarch64-virt-default-nic", - QEMU_CAPS_DEVICE_VIRTIO_MMIO); - qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64); - DO_TEST("aarch64-cpu-passthrough", - QEMU_CAPS_DEVICE_VIRTIO_MMIO, - QEMU_CAPS_KVM); + DO_TEST_CAPS_ARCH_LATEST("aarch64-video-virtio-gpu-pci", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-video-default", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-aavmf-virtio-mmio", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-default-nic", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-cpu-passthrough", "aarch64"); DO_TEST_FULL("aarch64-gic-none", ".aarch64-4.2.0", ARG_GIC, GIC_NONE, ARG_CAPS_ARCH, "aarch64", @@ -2425,19 +2412,8 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-gic-not-virt", "aarch64"); DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-gic-not-arm", "ppc64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-kvm-32-on-64", "aarch64"); - DO_TEST("aarch64-pci-serial", - QEMU_CAPS_DEVICE_PCI_SERIAL, - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT); - DO_TEST("aarch64-traditional-pci", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_SERIAL); + DO_TEST_CAPS_ARCH_LATEST("aarch64-pci-serial", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-traditional-pci", "aarch64"); /* aarch64 doesn't support the same CPU features as x86 */ DO_TEST_CAPS_ARCH_LATEST_FAILURE("aarch64-features-wrong", "aarch64"); -- 2.39.2

Upcoming patch will be modifying all of them to use real capabilities. This way it will be more obvious what will change. Keeping the symlinks around is tedious for humans to do. Waste some storage instead. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../aarch64-gic-default-both.xml | 26 ++++++++++++++++++- .../aarch64-gic-default-v2.xml | 26 ++++++++++++++++++- .../aarch64-gic-default-v3.xml | 26 ++++++++++++++++++- .../aarch64-gic-default.xml | 26 ++++++++++++++++++- tests/qemuxml2xmloutdata/aarch64-gic-host.xml | 26 ++++++++++++++++++- .../aarch64-gic-none-both.xml | 26 ++++++++++++++++++- .../aarch64-gic-none-v2.xml | 26 ++++++++++++++++++- .../aarch64-gic-none-v3.xml | 26 ++++++++++++++++++- tests/qemuxml2xmloutdata/aarch64-gic-none.xml | 26 ++++++++++++++++++- tests/qemuxml2xmloutdata/aarch64-gic-v2.xml | 26 ++++++++++++++++++- tests/qemuxml2xmloutdata/aarch64-gic-v3.xml | 26 ++++++++++++++++++- 11 files changed, 275 insertions(+), 11 deletions(-) mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-default.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-host.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-none.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-v2.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/aarch64-gic-v3.xml diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml deleted file mode 120000 index bf9d58c385..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-v3.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml new file mode 100644 index 0000000000..247d6025f7 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='3'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml deleted file mode 120000 index ee470fb1fa..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-v2.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml new file mode 100644 index 0000000000..474e641ccd --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='2'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml deleted file mode 120000 index bf9d58c385..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-v3.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml new file mode 100644 index 0000000000..247d6025f7 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='3'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default.xml deleted file mode 120000 index ee470fb1fa..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-default.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-v2.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default.xml new file mode 100644 index 0000000000..474e641ccd --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-default.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='2'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-host.xml b/tests/qemuxml2xmloutdata/aarch64-gic-host.xml deleted file mode 120000 index 03f9d288fa..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-host.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-host.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-host.xml b/tests/qemuxml2xmloutdata/aarch64-gic-host.xml new file mode 100644 index 0000000000..0598473318 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-host.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='host'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml deleted file mode 120000 index bf9d58c385..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-v3.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml new file mode 100644 index 0000000000..247d6025f7 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='3'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml deleted file mode 120000 index ee470fb1fa..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-v2.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml new file mode 100644 index 0000000000..474e641ccd --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='2'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml deleted file mode 120000 index bf9d58c385..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-v3.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml new file mode 100644 index 0000000000..247d6025f7 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='3'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none.xml deleted file mode 120000 index ee470fb1fa..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-none.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-v2.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none.xml new file mode 100644 index 0000000000..474e641ccd --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-none.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='2'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-v2.xml b/tests/qemuxml2xmloutdata/aarch64-gic-v2.xml deleted file mode 120000 index ee470fb1fa..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-v2.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-v2.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-v2.xml b/tests/qemuxml2xmloutdata/aarch64-gic-v2.xml new file mode 100644 index 0000000000..474e641ccd --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-v2.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='2'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-v3.xml b/tests/qemuxml2xmloutdata/aarch64-gic-v3.xml deleted file mode 120000 index bf9d58c385..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-v3.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/aarch64-gic-v3.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-v3.xml b/tests/qemuxml2xmloutdata/aarch64-gic-v3.xml new file mode 100644 index 0000000000..247d6025f7 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-v3.xml @@ -0,0 +1,25 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='3'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> -- 2.39.2

Use real capabilities for them. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...rch64-gic-default-both.aarch64-latest.xml} | 1 + ...aarch64-gic-default-v2.aarch64-latest.xml} | 1 + ...aarch64-gic-default-v3.aarch64-latest.xml} | 1 + ...=> aarch64-gic-default.aarch64-latest.xml} | 1 + .../aarch64-gic-default.xml | 25 ------ ...ml => aarch64-gic-host.aarch64-latest.xml} | 1 + ... aarch64-gic-none-both.aarch64-latest.xml} | 1 + ...> aarch64-gic-none-tcg.aarch64-latest.xml} | 1 + ...=> aarch64-gic-none-v2.aarch64-latest.xml} | 1 + .../aarch64-gic-none-v3.aarch64-latest.xml | 26 ++++++ .../aarch64-gic-none.aarch64-latest.xml | 26 ++++++ ....xml => aarch64-gic-v2.aarch64-latest.xml} | 1 + tests/qemuxml2xmloutdata/aarch64-gic-v2.xml | 25 ------ .../aarch64-gic-v3.aarch64-latest.xml | 26 ++++++ tests/qemuxml2xmloutdata/aarch64-gic-v3.xml | 25 ------ tests/qemuxml2xmltest.c | 84 ++++++++++++++----- 16 files changed, 150 insertions(+), 96 deletions(-) rename tests/qemuxml2xmloutdata/{aarch64-gic-default-both.xml => aarch64-gic-default-both.aarch64-latest.xml} (92%) rename tests/qemuxml2xmloutdata/{aarch64-gic-none-v2.xml => aarch64-gic-default-v2.aarch64-latest.xml} (92%) rename tests/qemuxml2xmloutdata/{aarch64-gic-none-both.xml => aarch64-gic-default-v3.aarch64-latest.xml} (92%) rename tests/qemuxml2xmloutdata/{aarch64-gic-default-v3.xml => aarch64-gic-default.aarch64-latest.xml} (92%) delete mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-default.xml rename tests/qemuxml2xmloutdata/{aarch64-gic-host.xml => aarch64-gic-host.aarch64-latest.xml} (92%) rename tests/qemuxml2xmloutdata/{aarch64-gic-none-v3.xml => aarch64-gic-none-both.aarch64-latest.xml} (92%) rename tests/qemuxml2xmloutdata/{aarch64-gic-none-tcg.xml => aarch64-gic-none-tcg.aarch64-latest.xml} (93%) rename tests/qemuxml2xmloutdata/{aarch64-gic-default-v2.xml => aarch64-gic-none-v2.aarch64-latest.xml} (92%) create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-none-v3.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-none.aarch64-latest.xml rename tests/qemuxml2xmloutdata/{aarch64-gic-none.xml => aarch64-gic-v2.aarch64-latest.xml} (92%) delete mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-v2.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-v3.aarch64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/aarch64-gic-v3.xml diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default-both.aarch64-latest.xml similarity index 92% rename from tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml rename to tests/qemuxml2xmloutdata/aarch64-gic-default-both.aarch64-latest.xml index 247d6025f7..5b2fb7df75 100644 --- a/tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml +++ b/tests/qemuxml2xmloutdata/aarch64-gic-default-both.aarch64-latest.xml @@ -19,6 +19,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <audio id='1' type='none'/> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default-v2.aarch64-latest.xml similarity index 92% rename from tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml rename to tests/qemuxml2xmloutdata/aarch64-gic-default-v2.aarch64-latest.xml index 474e641ccd..d2148fefa0 100644 --- a/tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml +++ b/tests/qemuxml2xmloutdata/aarch64-gic-default-v2.aarch64-latest.xml @@ -19,6 +19,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <audio id='1' type='none'/> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default-v3.aarch64-latest.xml similarity index 92% rename from tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml rename to tests/qemuxml2xmloutdata/aarch64-gic-default-v3.aarch64-latest.xml index 247d6025f7..5b2fb7df75 100644 --- a/tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml +++ b/tests/qemuxml2xmloutdata/aarch64-gic-default-v3.aarch64-latest.xml @@ -19,6 +19,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <audio id='1' type='none'/> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default.aarch64-latest.xml similarity index 92% rename from tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml rename to tests/qemuxml2xmloutdata/aarch64-gic-default.aarch64-latest.xml index 247d6025f7..5b2fb7df75 100644 --- a/tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml +++ b/tests/qemuxml2xmloutdata/aarch64-gic-default.aarch64-latest.xml @@ -19,6 +19,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <audio id='1' type='none'/> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default.xml b/tests/qemuxml2xmloutdata/aarch64-gic-default.xml deleted file mode 100644 index 474e641ccd..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-default.xml +++ /dev/null @@ -1,25 +0,0 @@ -<domain type='kvm'> - <name>aarch64test</name> - <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='aarch64' machine='virt'>hvm</type> - <boot dev='hd'/> - </os> - <features> - <gic version='2'/> - </features> - <cpu mode='host-passthrough' check='none'/> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-aarch64</emulator> - <controller type='usb' index='0' model='none'/> - <audio id='1' type='none'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-host.xml b/tests/qemuxml2xmloutdata/aarch64-gic-host.aarch64-latest.xml similarity index 92% rename from tests/qemuxml2xmloutdata/aarch64-gic-host.xml rename to tests/qemuxml2xmloutdata/aarch64-gic-host.aarch64-latest.xml index 0598473318..eb3b0531cd 100644 --- a/tests/qemuxml2xmloutdata/aarch64-gic-host.xml +++ b/tests/qemuxml2xmloutdata/aarch64-gic-host.aarch64-latest.xml @@ -19,6 +19,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <audio id='1' type='none'/> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none-both.aarch64-latest.xml similarity index 92% rename from tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml rename to tests/qemuxml2xmloutdata/aarch64-gic-none-both.aarch64-latest.xml index 247d6025f7..5b2fb7df75 100644 --- a/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml +++ b/tests/qemuxml2xmloutdata/aarch64-gic-none-both.aarch64-latest.xml @@ -19,6 +19,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <audio id='1' type='none'/> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-tcg.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none-tcg.aarch64-latest.xml similarity index 93% rename from tests/qemuxml2xmloutdata/aarch64-gic-none-tcg.xml rename to tests/qemuxml2xmloutdata/aarch64-gic-none-tcg.aarch64-latest.xml index c71b1cde62..ab274a1ef1 100644 --- a/tests/qemuxml2xmloutdata/aarch64-gic-none-tcg.xml +++ b/tests/qemuxml2xmloutdata/aarch64-gic-none-tcg.aarch64-latest.xml @@ -21,6 +21,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <audio id='1' type='none'/> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none-v2.aarch64-latest.xml similarity index 92% rename from tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml rename to tests/qemuxml2xmloutdata/aarch64-gic-none-v2.aarch64-latest.xml index 474e641ccd..d2148fefa0 100644 --- a/tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml +++ b/tests/qemuxml2xmloutdata/aarch64-gic-none-v2.aarch64-latest.xml @@ -19,6 +19,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <audio id='1' type='none'/> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.aarch64-latest.xml new file mode 100644 index 0000000000..5b2fb7df75 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-none-v3.aarch64-latest.xml @@ -0,0 +1,26 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='3'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-gic-none.aarch64-latest.xml new file mode 100644 index 0000000000..5b2fb7df75 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-none.aarch64-latest.xml @@ -0,0 +1,26 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='3'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-none.xml b/tests/qemuxml2xmloutdata/aarch64-gic-v2.aarch64-latest.xml similarity index 92% rename from tests/qemuxml2xmloutdata/aarch64-gic-none.xml rename to tests/qemuxml2xmloutdata/aarch64-gic-v2.aarch64-latest.xml index 474e641ccd..d2148fefa0 100644 --- a/tests/qemuxml2xmloutdata/aarch64-gic-none.xml +++ b/tests/qemuxml2xmloutdata/aarch64-gic-v2.aarch64-latest.xml @@ -19,6 +19,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <audio id='1' type='none'/> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-v2.xml b/tests/qemuxml2xmloutdata/aarch64-gic-v2.xml deleted file mode 100644 index 474e641ccd..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-v2.xml +++ /dev/null @@ -1,25 +0,0 @@ -<domain type='kvm'> - <name>aarch64test</name> - <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='aarch64' machine='virt'>hvm</type> - <boot dev='hd'/> - </os> - <features> - <gic version='2'/> - </features> - <cpu mode='host-passthrough' check='none'/> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-aarch64</emulator> - <controller type='usb' index='0' model='none'/> - <audio id='1' type='none'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-v3.aarch64-latest.xml b/tests/qemuxml2xmloutdata/aarch64-gic-v3.aarch64-latest.xml new file mode 100644 index 0000000000..5b2fb7df75 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-gic-v3.aarch64-latest.xml @@ -0,0 +1,26 @@ +<domain type='kvm'> + <name>aarch64test</name> + <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='3'/> + </features> + <cpu mode='host-passthrough' check='none'/> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-gic-v3.xml b/tests/qemuxml2xmloutdata/aarch64-gic-v3.xml deleted file mode 100644 index 247d6025f7..0000000000 --- a/tests/qemuxml2xmloutdata/aarch64-gic-v3.xml +++ /dev/null @@ -1,25 +0,0 @@ -<domain type='kvm'> - <name>aarch64test</name> - <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='aarch64' machine='virt'>hvm</type> - <boot dev='hd'/> - </os> - <features> - <gic version='3'/> - </features> - <cpu mode='host-passthrough' check='none'/> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-aarch64</emulator> - <controller type='usb' index='0' model='none'/> - <audio id='1' type='none'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 23239fdbba..61474ecb0d 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -961,27 +961,69 @@ mymain(void) QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_VNC); - DO_TEST_FULL("aarch64-gic-none", "", WHEN_BOTH, ARG_GIC, GIC_NONE, ARG_END); - DO_TEST_FULL("aarch64-gic-none-v2", "", WHEN_BOTH, ARG_GIC, GIC_V2, ARG_END); - DO_TEST_FULL("aarch64-gic-none-v3", "", WHEN_BOTH, ARG_GIC, GIC_V3, ARG_END); - DO_TEST_FULL("aarch64-gic-none-both", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_FULL("aarch64-gic-none-tcg", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_FULL("aarch64-gic-default", "", WHEN_BOTH, ARG_GIC, GIC_NONE, ARG_END); - DO_TEST_FULL("aarch64-gic-default-v2", "", WHEN_BOTH, ARG_GIC, GIC_V2, ARG_END); - DO_TEST_FULL("aarch64-gic-default-v3", "", WHEN_BOTH, ARG_GIC, GIC_V3, ARG_END); - DO_TEST_FULL("aarch64-gic-default-both", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_FULL("aarch64-gic-v2", "", WHEN_BOTH, ARG_GIC, GIC_NONE, ARG_END); - DO_TEST_FULL("aarch64-gic-v2", "", WHEN_BOTH, ARG_GIC, GIC_V2, ARG_END); - DO_TEST_FULL("aarch64-gic-v2", "", WHEN_BOTH, ARG_GIC, GIC_V3, ARG_END); - DO_TEST_FULL("aarch64-gic-v2", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_FULL("aarch64-gic-v3", "", WHEN_BOTH, ARG_GIC, GIC_NONE, ARG_END); - DO_TEST_FULL("aarch64-gic-v3", "", WHEN_BOTH, ARG_GIC, GIC_V2, ARG_END); - DO_TEST_FULL("aarch64-gic-v3", "", WHEN_BOTH, ARG_GIC, GIC_V3, ARG_END); - DO_TEST_FULL("aarch64-gic-v3", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_FULL("aarch64-gic-host", "", WHEN_BOTH, ARG_GIC, GIC_NONE, ARG_END); - DO_TEST_FULL("aarch64-gic-host", "", WHEN_BOTH, ARG_GIC, GIC_V2, ARG_END); - DO_TEST_FULL("aarch64-gic-host", "", WHEN_BOTH, ARG_GIC, GIC_V3, ARG_END); - DO_TEST_FULL("aarch64-gic-host", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END); + DO_TEST_FULL("aarch64-gic-none", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_NONE, ARG_END); + DO_TEST_FULL("aarch64-gic-none-v2", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_V2, ARG_END); + DO_TEST_FULL("aarch64-gic-none-v3", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_V3, ARG_END); + DO_TEST_FULL("aarch64-gic-none-both", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_BOTH, ARG_END); + DO_TEST_FULL("aarch64-gic-none-tcg", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_BOTH, ARG_END); + DO_TEST_FULL("aarch64-gic-default", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_NONE, ARG_END); + DO_TEST_FULL("aarch64-gic-default-v2", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_V2, ARG_END); + DO_TEST_FULL("aarch64-gic-default-v3", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_V3, ARG_END); + DO_TEST_FULL("aarch64-gic-default-both", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_BOTH, ARG_END); + DO_TEST_FULL("aarch64-gic-v2", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_NONE, ARG_END); + DO_TEST_FULL("aarch64-gic-v2", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_V2, ARG_END); + DO_TEST_FULL("aarch64-gic-v2", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_V3, ARG_END); + DO_TEST_FULL("aarch64-gic-v2", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_BOTH, ARG_END); + DO_TEST_FULL("aarch64-gic-v3", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_NONE, ARG_END); + DO_TEST_FULL("aarch64-gic-v3", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_V2, ARG_END); + DO_TEST_FULL("aarch64-gic-v3", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_V3, ARG_END); + DO_TEST_FULL("aarch64-gic-v3", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_BOTH, ARG_END); + DO_TEST_FULL("aarch64-gic-host", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_NONE, ARG_END); + DO_TEST_FULL("aarch64-gic-host", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_V2, ARG_END); + DO_TEST_FULL("aarch64-gic-host", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_V3, ARG_END); + DO_TEST_FULL("aarch64-gic-host", ".aarch64-latest", WHEN_BOTH, + ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", + ARG_GIC, GIC_BOTH, ARG_END); /* SVE aarch64 CPU features work on modern QEMU */ DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64"); -- 2.39.2

Replace them with full files so that potential fallout from conversion to real capabilities is more obvious and the test is simpler to add. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../mach-virt-console-native.xml | 33 ++++++++++++++++++- .../mach-virt-serial+console-native.xml | 33 ++++++++++++++++++- .../mach-virt-serial-native.xml | 33 ++++++++++++++++++- 3 files changed, 96 insertions(+), 3 deletions(-) mode change 120000 => 100644 tests/qemuxml2xmloutdata/mach-virt-console-native.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml mode change 120000 => 100644 tests/qemuxml2xmloutdata/mach-virt-serial-native.xml diff --git a/tests/qemuxml2xmloutdata/mach-virt-console-native.xml b/tests/qemuxml2xmloutdata/mach-virt-console-native.xml deleted file mode 120000 index 8b64e06c7f..0000000000 --- a/tests/qemuxml2xmloutdata/mach-virt-console-native.xml +++ /dev/null @@ -1 +0,0 @@ -mach-virt-serial-compat.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/mach-virt-console-native.xml b/tests/qemuxml2xmloutdata/mach-virt-console-native.xml new file mode 100644 index 0000000000..f66fe2916a --- /dev/null +++ b/tests/qemuxml2xmloutdata/mach-virt-console-native.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <memory unit='KiB'>524288</memory> + <currentMemory unit='KiB'>524288</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='2'/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <serial type='pty'> + <target type='system-serial' port='0'> + <model name='pl011'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml b/tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml deleted file mode 120000 index 8b64e06c7f..0000000000 --- a/tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml +++ /dev/null @@ -1 +0,0 @@ -mach-virt-serial-compat.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml b/tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml new file mode 100644 index 0000000000..f66fe2916a --- /dev/null +++ b/tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <memory unit='KiB'>524288</memory> + <currentMemory unit='KiB'>524288</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='2'/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <serial type='pty'> + <target type='system-serial' port='0'> + <model name='pl011'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/mach-virt-serial-native.xml b/tests/qemuxml2xmloutdata/mach-virt-serial-native.xml deleted file mode 120000 index 8b64e06c7f..0000000000 --- a/tests/qemuxml2xmloutdata/mach-virt-serial-native.xml +++ /dev/null @@ -1 +0,0 @@ -mach-virt-serial-compat.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/mach-virt-serial-native.xml b/tests/qemuxml2xmloutdata/mach-virt-serial-native.xml new file mode 100644 index 0000000000..f66fe2916a --- /dev/null +++ b/tests/qemuxml2xmloutdata/mach-virt-serial-native.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <memory unit='KiB'>524288</memory> + <currentMemory unit='KiB'>524288</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <gic version='2'/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <serial type='pty'> + <target type='system-serial' port='0'> + <model name='pl011'/> + </target> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> -- 2.39.2

Use real capabilities. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...ch-virt-console-native.aarch64-latest.xml} | 4 +++ ...ch-virt-console-virtio.aarch64-latest.xml} | 16 +++++++++++- ...-serial+console-native.aarch64-latest.xml} | 4 +++ ...ach-virt-serial-compat.aarch64-latest.xml} | 4 +++ ...ach-virt-serial-native.aarch64-latest.xml} | 4 +++ ...> mach-virt-serial-pci.aarch64-latest.xml} | 19 ++++++++------ ...> mach-virt-serial-usb.aarch64-latest.xml} | 3 +++ tests/qemuxml2xmltest.c | 25 ++++++------------- 8 files changed, 52 insertions(+), 27 deletions(-) rename tests/qemuxml2xmloutdata/{mach-virt-console-native.xml => mach-virt-console-native.aarch64-latest.xml} (84%) rename tests/qemuxml2xmloutdata/{mach-virt-console-virtio.xml => mach-virt-console-virtio.aarch64-latest.xml} (52%) rename tests/qemuxml2xmloutdata/{mach-virt-serial-native.xml => mach-virt-serial+console-native.aarch64-latest.xml} (84%) rename tests/qemuxml2xmloutdata/{mach-virt-serial+console-native.xml => mach-virt-serial-compat.aarch64-latest.xml} (84%) rename tests/qemuxml2xmloutdata/{mach-virt-serial-compat.xml => mach-virt-serial-native.aarch64-latest.xml} (84%) rename tests/qemuxml2xmloutdata/{mach-virt-serial-pci.xml => mach-virt-serial-pci.aarch64-latest.xml} (71%) rename tests/qemuxml2xmloutdata/{mach-virt-serial-usb.xml => mach-virt-serial-usb.aarch64-latest.xml} (93%) diff --git a/tests/qemuxml2xmloutdata/mach-virt-console-native.xml b/tests/qemuxml2xmloutdata/mach-virt-console-native.aarch64-latest.xml similarity index 84% rename from tests/qemuxml2xmloutdata/mach-virt-console-native.xml rename to tests/qemuxml2xmloutdata/mach-virt-console-native.aarch64-latest.xml index f66fe2916a..66da5927e3 100644 --- a/tests/qemuxml2xmloutdata/mach-virt-console-native.xml +++ b/tests/qemuxml2xmloutdata/mach-virt-console-native.aarch64-latest.xml @@ -11,6 +11,9 @@ <features> <gic version='2'/> </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -18,6 +21,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <serial type='pty'> <target type='system-serial' port='0'> <model name='pl011'/> diff --git a/tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml b/tests/qemuxml2xmloutdata/mach-virt-console-virtio.aarch64-latest.xml similarity index 52% rename from tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml rename to tests/qemuxml2xmloutdata/mach-virt-console-virtio.aarch64-latest.xml index 6224089879..e1ff62f2c5 100644 --- a/tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml +++ b/tests/qemuxml2xmloutdata/mach-virt-console-virtio.aarch64-latest.xml @@ -11,6 +11,9 @@ <features> <gic version='2'/> </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -18,8 +21,19 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <controller type='virtio-serial' index='0'> - <address type='virtio-mmio'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='2' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='2' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <console type='pty'> <target type='virtio' port='0'/> diff --git a/tests/qemuxml2xmloutdata/mach-virt-serial-native.xml b/tests/qemuxml2xmloutdata/mach-virt-serial+console-native.aarch64-latest.xml similarity index 84% rename from tests/qemuxml2xmloutdata/mach-virt-serial-native.xml rename to tests/qemuxml2xmloutdata/mach-virt-serial+console-native.aarch64-latest.xml index f66fe2916a..66da5927e3 100644 --- a/tests/qemuxml2xmloutdata/mach-virt-serial-native.xml +++ b/tests/qemuxml2xmloutdata/mach-virt-serial+console-native.aarch64-latest.xml @@ -11,6 +11,9 @@ <features> <gic version='2'/> </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -18,6 +21,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <serial type='pty'> <target type='system-serial' port='0'> <model name='pl011'/> diff --git a/tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml b/tests/qemuxml2xmloutdata/mach-virt-serial-compat.aarch64-latest.xml similarity index 84% rename from tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml rename to tests/qemuxml2xmloutdata/mach-virt-serial-compat.aarch64-latest.xml index f66fe2916a..66da5927e3 100644 --- a/tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml +++ b/tests/qemuxml2xmloutdata/mach-virt-serial-compat.aarch64-latest.xml @@ -11,6 +11,9 @@ <features> <gic version='2'/> </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -18,6 +21,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <serial type='pty'> <target type='system-serial' port='0'> <model name='pl011'/> diff --git a/tests/qemuxml2xmloutdata/mach-virt-serial-compat.xml b/tests/qemuxml2xmloutdata/mach-virt-serial-native.aarch64-latest.xml similarity index 84% rename from tests/qemuxml2xmloutdata/mach-virt-serial-compat.xml rename to tests/qemuxml2xmloutdata/mach-virt-serial-native.aarch64-latest.xml index f66fe2916a..66da5927e3 100644 --- a/tests/qemuxml2xmloutdata/mach-virt-serial-compat.xml +++ b/tests/qemuxml2xmloutdata/mach-virt-serial-native.aarch64-latest.xml @@ -11,6 +11,9 @@ <features> <gic version='2'/> </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -18,6 +21,7 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> <serial type='pty'> <target type='system-serial' port='0'> <model name='pl011'/> diff --git a/tests/qemuxml2xmloutdata/mach-virt-serial-pci.xml b/tests/qemuxml2xmloutdata/mach-virt-serial-pci.aarch64-latest.xml similarity index 71% rename from tests/qemuxml2xmloutdata/mach-virt-serial-pci.xml rename to tests/qemuxml2xmloutdata/mach-virt-serial-pci.aarch64-latest.xml index 09478419e2..abf8407a72 100644 --- a/tests/qemuxml2xmloutdata/mach-virt-serial-pci.xml +++ b/tests/qemuxml2xmloutdata/mach-virt-serial-pci.aarch64-latest.xml @@ -11,6 +11,9 @@ <features> <gic version='2'/> </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -19,19 +22,19 @@ <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> + <controller type='pci' index='2' model='pcie-to-pci-bridge'> + <model name='pcie-pci-bridge'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </controller> <controller type='pci' index='3' model='pcie-root-port'> <model name='pcie-root-port'/> - <target chassis='3' port='0x10'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + <target chassis='3' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <serial type='pty'> <target type='pci-serial' port='0'> diff --git a/tests/qemuxml2xmloutdata/mach-virt-serial-usb.xml b/tests/qemuxml2xmloutdata/mach-virt-serial-usb.aarch64-latest.xml similarity index 93% rename from tests/qemuxml2xmloutdata/mach-virt-serial-usb.xml rename to tests/qemuxml2xmloutdata/mach-virt-serial-usb.aarch64-latest.xml index 0578d7ad72..9afbeee12d 100644 --- a/tests/qemuxml2xmloutdata/mach-virt-serial-usb.xml +++ b/tests/qemuxml2xmloutdata/mach-virt-serial-usb.aarch64-latest.xml @@ -11,6 +11,9 @@ <features> <gic version='2'/> </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 61474ecb0d..64edd26faf 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -643,24 +643,13 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("pseries-console-native", "ppc64"); DO_TEST_CAPS_ARCH_LATEST("pseries-console-virtio", "ppc64"); - DO_TEST_NOCAPS("mach-virt-serial-native"); - DO_TEST_NOCAPS("mach-virt-serial+console-native"); - DO_TEST_NOCAPS("mach-virt-serial-compat"); - DO_TEST("mach-virt-serial-pci", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_SERIAL); - DO_TEST("mach-virt-serial-usb", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, - QEMU_CAPS_DEVICE_QEMU_XHCI, - QEMU_CAPS_DEVICE_USB_SERIAL); - DO_TEST("mach-virt-console-native", - QEMU_CAPS_DEVICE_PL011); - DO_TEST("mach-virt-console-virtio", - QEMU_CAPS_DEVICE_VIRTIO_MMIO); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-native", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial+console-native", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-compat", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-pci", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-usb", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-console-native", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("mach-virt-console-virtio", "aarch64"); DO_TEST_NOCAPS("balloon-device-auto"); DO_TEST_NOCAPS("balloon-device-period"); -- 2.39.2

Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...ch64-aavmf-virtio-mmio.aarch64-latest.xml} | 1 + ... => aarch64-pci-serial.aarch64-latest.xml} | 19 ++++++----- ...arch64-traditional-pci.aarch64-latest.xml} | 3 ++ ... aarch64-video-default.aarch64-latest.xml} | 22 ++++++------- ...4-video-virtio-gpu-pci.aarch64-latest.xml} | 4 +-- tests/qemuxml2xmltest.c | 32 +++---------------- 6 files changed, 31 insertions(+), 50 deletions(-) rename tests/qemuxml2xmloutdata/{aarch64-aavmf-virtio-mmio.xml => aarch64-aavmf-virtio-mmio.aarch64-latest.xml} (96%) rename tests/qemuxml2xmloutdata/{aarch64-pci-serial.xml => aarch64-pci-serial.aarch64-latest.xml} (70%) rename tests/qemuxml2xmloutdata/{aarch64-traditional-pci.xml => aarch64-traditional-pci.aarch64-latest.xml} (93%) rename tests/qemuxml2xmloutdata/{aarch64-video-default.xml => aarch64-video-default.aarch64-latest.xml} (67%) rename tests/qemuxml2xmloutdata/{aarch64-video-virtio-gpu-pci.xml => aarch64-video-virtio-gpu-pci.aarch64-latest.xml} (95%) diff --git a/tests/qemuxml2xmloutdata/aarch64-aavmf-virtio-mmio.xml b/tests/qemuxml2xmloutdata/aarch64-aavmf-virtio-mmio.aarch64-latest.xml similarity index 96% rename from tests/qemuxml2xmloutdata/aarch64-aavmf-virtio-mmio.xml rename to tests/qemuxml2xmloutdata/aarch64-aavmf-virtio-mmio.aarch64-latest.xml index f3eab7b59e..634d8ee683 100644 --- a/tests/qemuxml2xmloutdata/aarch64-aavmf-virtio-mmio.xml +++ b/tests/qemuxml2xmloutdata/aarch64-aavmf-virtio-mmio.aarch64-latest.xml @@ -35,6 +35,7 @@ <controller type='virtio-serial' index='0'> <address type='virtio-mmio'/> </controller> + <controller type='pci' index='0' model='pcie-root'/> <interface type='user'> <mac address='52:54:00:09:a4:37'/> <model type='virtio'/> diff --git a/tests/qemuxml2xmloutdata/aarch64-pci-serial.xml b/tests/qemuxml2xmloutdata/aarch64-pci-serial.aarch64-latest.xml similarity index 70% rename from tests/qemuxml2xmloutdata/aarch64-pci-serial.xml rename to tests/qemuxml2xmloutdata/aarch64-pci-serial.aarch64-latest.xml index 5d69c1cffa..fccaaa7196 100644 --- a/tests/qemuxml2xmloutdata/aarch64-pci-serial.xml +++ b/tests/qemuxml2xmloutdata/aarch64-pci-serial.aarch64-latest.xml @@ -11,6 +11,9 @@ <features> <gic version='2'/> </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -18,19 +21,19 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> + <controller type='pci' index='2' model='pcie-to-pci-bridge'> + <model name='pcie-pci-bridge'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </controller> <controller type='pci' index='3' model='pcie-root-port'> <model name='pcie-root-port'/> - <target chassis='3' port='0x10'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + <target chassis='3' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <serial type='pty'> <log file='/tmp/log' append='on'/> diff --git a/tests/qemuxml2xmloutdata/aarch64-traditional-pci.xml b/tests/qemuxml2xmloutdata/aarch64-traditional-pci.aarch64-latest.xml similarity index 93% rename from tests/qemuxml2xmloutdata/aarch64-traditional-pci.xml rename to tests/qemuxml2xmloutdata/aarch64-traditional-pci.aarch64-latest.xml index 7b2eea7ac7..ce2308d451 100644 --- a/tests/qemuxml2xmloutdata/aarch64-traditional-pci.xml +++ b/tests/qemuxml2xmloutdata/aarch64-traditional-pci.aarch64-latest.xml @@ -11,6 +11,9 @@ <features> <gic version='2'/> </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> diff --git a/tests/qemuxml2xmloutdata/aarch64-video-default.xml b/tests/qemuxml2xmloutdata/aarch64-video-default.aarch64-latest.xml similarity index 67% rename from tests/qemuxml2xmloutdata/aarch64-video-default.xml rename to tests/qemuxml2xmloutdata/aarch64-video-default.aarch64-latest.xml index 13ac217b60..558b8fab3e 100644 --- a/tests/qemuxml2xmloutdata/aarch64-video-default.xml +++ b/tests/qemuxml2xmloutdata/aarch64-video-default.aarch64-latest.xml @@ -21,19 +21,15 @@ <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> - <model name='ioh3420'/> - <target chassis='3' port='0x10'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + <controller type='pci' index='2' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='2' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <graphics type='vnc' port='-1' autoport='yes'> <listen type='address'/> @@ -41,7 +37,7 @@ <audio id='1' type='none'/> <video> <model type='virtio' heads='1' primary='yes'/> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </video> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/aarch64-video-virtio-gpu-pci.xml b/tests/qemuxml2xmloutdata/aarch64-video-virtio-gpu-pci.aarch64-latest.xml similarity index 95% rename from tests/qemuxml2xmloutdata/aarch64-video-virtio-gpu-pci.xml rename to tests/qemuxml2xmloutdata/aarch64-video-virtio-gpu-pci.aarch64-latest.xml index a3e3375f07..a212a28350 100644 --- a/tests/qemuxml2xmloutdata/aarch64-video-virtio-gpu-pci.xml +++ b/tests/qemuxml2xmloutdata/aarch64-video-virtio-gpu-pci.aarch64-latest.xml @@ -21,12 +21,12 @@ <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='pcie-root-port'> - <model name='ioh3420'/> + <model name='pcie-root-port'/> <target chassis='1' port='0x8'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> </controller> <controller type='pci' index='2' model='pcie-root-port'> - <model name='ioh3420'/> + <model name='pcie-root-port'/> <target chassis='2' port='0x9'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1' multifunction='on'/> </controller> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 64edd26faf..e19aba0878 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -920,35 +920,13 @@ mymain(void) DO_TEST_NOCAPS("smbios-multiple-type2"); DO_TEST_NOCAPS("smbios-type-fwcfg"); - DO_TEST("aarch64-aavmf-virtio-mmio", - QEMU_CAPS_DEVICE_VIRTIO_MMIO, - QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST_CAPS_ARCH_LATEST("aarch64-aavmf-virtio-mmio", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-default", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-manual-addresses", "aarch64"); - DO_TEST("aarch64-video-virtio-gpu-pci", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_VIRTIO_GPU); - DO_TEST("aarch64-pci-serial", - QEMU_CAPS_DEVICE_PCI_SERIAL, - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT); - DO_TEST("aarch64-traditional-pci", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_SERIAL); - DO_TEST("aarch64-video-default", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_VIRTIO_GPU, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_VNC); + DO_TEST_CAPS_ARCH_LATEST("aarch64-video-virtio-gpu-pci", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-pci-serial", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-traditional-pci", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("aarch64-video-default", "aarch64"); DO_TEST_FULL("aarch64-gic-none", ".aarch64-latest", WHEN_BOTH, ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", -- 2.39.2

Now that all tests were converted to use real capabilities we don't need it any more. Remove it so that no new tests are added with it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/testutilsqemu.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index f3199755f6..b75241d545 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -29,7 +29,6 @@ static virCPUDef *cpuPower10; static const char *qemu_emulators[VIR_ARCH_LAST] = { [VIR_ARCH_I686] = "/usr/bin/qemu-system-i386", [VIR_ARCH_X86_64] = "/usr/bin/qemu-system-x86_64", - [VIR_ARCH_AARCH64] = "/usr/bin/qemu-system-aarch64", }; static const char *const i386_machines[] = { @@ -39,20 +38,15 @@ static const char *const i386_machines[] = { static const char *const x86_64_machines[] = { "pc", "q35", NULL }; -static const char *const aarch64_machines[] = { - "virt", "virt-2.6", "versatilepb", NULL -}; static const char *const *qemu_machines[VIR_ARCH_LAST] = { [VIR_ARCH_I686] = i386_machines, [VIR_ARCH_X86_64] = x86_64_machines, - [VIR_ARCH_AARCH64] = aarch64_machines, }; static const char *qemu_default_ram_id[VIR_ARCH_LAST] = { [VIR_ARCH_I686] = "pc.ram", [VIR_ARCH_X86_64] = "pc.ram", - [VIR_ARCH_AARCH64] = "mach-virt.ram", }; char * -- 2.39.2

On a Friday in 2023, Peter Krempa wrote:
This series applies on top of 'part 4' fetch everything from my repo:
git fetch https://gitlab.com/pipo.sk/libvirt.git aarch-send
In this part tests for the 'aarch64' platform are converted to use real capabilities.
Peter Krempa (21): virDomainPCIAddressSetExtensionAlloc: Remove return value qemuxml2argvdata: Do not symlink output files for aarch64 gic tests qemuxml2argvtest: Use real capabilities in tests for picking the aarch64 GIC version qemuxml2argvtest: Convert DO_TEST_GIC to use real latest capabilities qemuxml2argvtest: Convert the rest of GIC tests to latest capabilities qemuxml2argvtest: Add real-caps versions of 'aarch64-virt-virtio' qemuxml2argvtest: Drop "aarch64-virt-2.6-virtio-pci-default" case qemuxml2argv: Test default aarch64 cofig without PCIe support qemuxml2argvtest: Modernize 'balloon-mmio-deflate' qemuxml2argvtest: Don't symlink output files for 'mach-virt-' cases qemuxml2argvtest: Modernize all 'mach-virt-' aarch64 test cases qemuxml2argvtest: Update 'aarch64-virtio-pci-manual-addresses' case qemuxml2*test: Drop fake-caps invocation of 'aarch64-virtio-pci-manual-addresses' qemuxml2(argv|xml)test: Modernize testing of USB controllers on aarch64 qemuxml2argvtest: Modernize the rest of 'aarch64' cases qemuxml2xmlout: Do not symlink output files for 'aarch64-gic' cases qemuxml2xmltest: Modernize 'aarch64-gic*' test cases qemuxml2xmloutdata: Don't symlink output data for 'mach-virt*' cases qemuxml2xmltest: Modernize 'mach-virt*' cases qemuxml2xmltest: Convert rest of 'aarch64' cases to real capabilities testutilsqemu: Drop fake capability testing infrastructure for 'aarch64'
src/conf/domain_addr.c | 13 +- ...h64-aavmf-virtio-mmio.aarch64-latest.args} | 20 +- ...rch64-cpu-passthrough.aarch64-latest.args} | 26 +-- [..] tests/qemuxml2xmltest.c | 153 ++++++------ tests/testutilsqemu.c | 6 - 94 files changed, 1396 insertions(+), 557 deletions(-) rename tests/qemuxml2argvdata/{aarch64-aavmf-virtio-mmio.args => aarch64-aavmf-virtio-mmio.aarch64-latest.args} (57%) rename tests/qemuxml2argvdata/{aarch64-virtio-pci-manual-addresses.args => aarch64-cpu-passthrough.aarch64-latest.args} (52%) mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-default-both.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-default-v2.args mode change 120000 => 100644 tests/qemuxml2argvdata/aarch64-gic-default-v3.args [..] rename tests/qemuxml2xmloutdata/{mach-virt-serial-pci.xml => mach-virt-serial-pci.aarch64-latest.xml} (71%) rename tests/qemuxml2xmloutdata/{mach-virt-serial-usb.xml => mach-virt-serial-usb.aarch64-latest.xml} (93%)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (2)
-
Ján Tomko
-
Peter Krempa