[PATCH 00/19] qemu XML testing improvements, part 1 - forgotten test files and network driver

This patch saga aims to improve and simplify testing of qemu XML configs. Part 1 deals with input test files which are not used in qemuxml2argvtest, introduces a mock network driver and adds a checker that all input files are in fact used. Peter Krempa (19): qemuxml2argvtest: Reinstate 'console-compat-chardev' and 'pci-serial-dev-chardev' qemuxml2argvtest: Fix and use 'disk-network-ssh-key' case qemuxml2argvtest: Reinstate 'pseries-vio-address-clash' case qemuxml2argvdata: Move 'smbios-multiple-type2' case to genericxml2xmltest qemuxml2argvtest: Remove duplicated invocations of tests qemuxml2argvtest: Check for duplicate invocation of tests qemuxml2argvmock: Mock qemuInterfaceBridgeConnect qemuxml2argvtest: Add test cases covered only by qemuxml2xmltest - part 1 qemuxml2xmltest: Move 'graphics-listen-network2' case go genericxml2xmltest qemuxml2*test: Add specific test case for interface link state qemuxml*test: Improve 'vhost_queues' test case qemuxml2xmltest: Delete 'interface-driver' case qemu: process: Separate setup of network device objects qemuxml2argvmock: Mock virNetDevSetMTU qemuxml2xmltest: Introduce fake network driver qemuxml2argvtest: Enable 'graphics-listen-network' case virnetworkportxml2xmltest: Add simple versions of bridge/network tests qemuxml2argvtest: Add test cases covered only by qemuxml2xmltest - part 2 qemuxml2argvtest: Add checker that all input files are used src/qemu/qemu_interface.h | 2 +- src/qemu/qemu_process.c | 45 ++-- src/util/virnetdev.h | 2 +- .../graphics-listen-network2.xml | 0 .../smbios-multiple-type2.xml | 0 .../graphics-listen-network2.xml | 35 +++ tests/genericxml2xmltest.c | 3 + tests/qemustatusxml2xmltest.c | 2 +- ...nu-disable-with-timeout.x86_64-latest.args | 36 +++ ...hannel-unix-source-path.x86_64-latest.args | 45 ++++ .../chardev-label.x86_64-latest.args | 41 +++ .../console-compat2.x86_64-latest.args | 40 +++ .../cpu-empty.x86_64-latest.args | 33 +++ ...cpu-host-model-features.x86_64-latest.args | 33 +++ .../cpu-numa-disordered.x86_64-latest.args | 38 +++ .../disk-active-commit.x86_64-latest.args | 38 +++ .../disk-mirror-old.x86_64-latest.args | 45 ++++ .../disk-mirror.x86_64-latest.args | 48 ++++ .../disk-network-ssh-key.x86_64-latest.args | 38 +++ .../qemuxml2argvdata/disk-network-ssh-key.xml | 2 +- .../disk-network-vxhs.x86_64-5.0.0.args | 35 +++ .../downscript.x86_64-latest.args | 43 +++ ...graphics-listen-network.x86_64-latest.args | 37 +++ .../graphics-listen-network.xml | 2 +- .../hostdev-mdev-display.x86_64-latest.args | 34 +++ ...ev-scsi-autogen-address.x86_64-latest.args | 60 +++++ ...hostdev-scsi-large-unit.x86_64-latest.args | 39 +++ .../hostdev-scsi-shareable.x86_64-latest.args | 39 +++ tests/qemuxml2argvdata/interface-driver.xml | 54 ---- .../qemuxml2argvdata/lease.x86_64-latest.args | 39 +++ .../memorybacking-set.x86_64-latest.args | 33 +++ .../memorybacking-unset.x86_64-latest.args | 33 +++ .../metadata-duplicate.x86_64-latest.args | 36 +++ .../metadata.x86_64-latest.args | 36 +++ .../net-bandwidth.x86_64-latest.args | 47 ++++ tests/qemuxml2argvdata/net-bandwidth.xml | 2 +- .../net-bandwidth2.x86_64-latest.args | 44 +++ tests/qemuxml2argvdata/net-bandwidth2.xml | 2 +- .../net-coalesce.x86_64-latest.args | 48 ++++ tests/qemuxml2argvdata/net-coalesce.xml | 6 +- .../net-isolated-port.x86_64-latest.args | 43 +++ tests/qemuxml2argvdata/net-isolated-port.xml | 2 +- .../net-linkstate.x86_64-latest.args | 36 +++ tests/qemuxml2argvdata/net-linkstate.xml | 34 +++ .../net-midonet.x86_64-latest.args | 38 +++ .../net-mtu.x86_64-latest.args | 46 ++++ tests/qemuxml2argvdata/net-mtu.xml | 4 +- .../net-openvswitch.x86_64-latest.args | 38 +++ tests/qemuxml2argvdata/net-openvswitch.xml | 2 +- ...irtio-network-portgroup.x86_64-latest.args | 42 +++ .../net-virtio-network-portgroup.xml | 6 +- ...-virtio-teaming-network.x86_64-latest.args | 39 +++ .../net-virtio-teaming-network.xml | 4 +- .../net-virtio-vhost.x86_64-latest.args | 42 +++ ...{vhost_queues.xml => net-virtio-vhost.xml} | 25 +- ...d-auto-vcpu-no-numatune.x86_64-latest.args | 36 +++ ...static-vcpu-no-numatune.x86_64-latest.args | 36 +++ ...vcpus-topology-mismatch.x86_64-latest.args | 34 +++ .../panic-pseries.ppc64-latest.args | 34 +++ .../pcihole64-gib.x86_64-latest.args | 34 +++ ...pseries-vio-address-clash.ppc64-latest.err | 1 + .../s390-defaultconsole.s390x-latest.args | 33 +++ .../s390-panic.s390x-latest.args | 35 +++ ...eclabel-device-multiple.x86_64-latest.args | 36 +++ ...el-dynamic-none-relabel.x86_64-latest.args | 37 +++ .../seclabel-dynamic-none.x86_64-latest.args | 36 +++ ...serial-target-port-auto.x86_64-latest.args | 42 +++ .../tap-vhost-incorrect.x86_64-latest.args | 40 +++ .../qemuxml2argvdata/tap-vhost-incorrect.xml | 4 +- .../tap-vhost.x86_64-latest.args | 44 +++ tests/qemuxml2argvdata/tap-vhost.xml | 2 +- .../vhost-user-fs-sock.x86_64-latest.args | 34 +++ ...ideo-virtio-gpu-ccw-auto.s390x-latest.args | 36 +++ tests/qemuxml2argvmock.c | 25 ++ tests/qemuxml2argvtest.c | 255 +++++++++++++++++- .../graphics-listen-network.x86_64-latest.xml | 2 +- .../interface-driver.x86_64-latest.xml | 67 ----- .../net-bandwidth.x86_64-latest.xml | 2 +- .../net-bandwidth2.x86_64-latest.xml | 2 +- .../net-coalesce.x86_64-latest.xml | 6 +- .../net-isolated-port.x86_64-latest.xml | 2 +- ...st.xml => net-linkstate.x86_64-latest.xml} | 34 ++- .../net-openvswitch.x86_64-latest.xml | 2 +- ...virtio-network-portgroup.x86_64-latest.xml | 6 +- ...t-virtio-teaming-network.x86_64-latest.xml | 4 +- ...xml => net-virtio-vhost.x86_64-latest.xml} | 29 +- .../tap-vhost-incorrect.x86_64-latest.xml | 4 +- .../tap-vhost.x86_64-latest.xml | 2 +- tests/qemuxml2xmltest.c | 6 +- tests/testutils.c | 14 + tests/testutils.h | 2 + tests/testutilsqemu.h | 3 + .../plug-bridge-basic.xml | 11 + .../plug-network-basic.xml | 10 + tests/virnetworkportxml2xmltest.c | 2 + 95 files changed, 2407 insertions(+), 233 deletions(-) rename tests/{qemuxml2argvdata => genericxml2xmlindata}/graphics-listen-network2.xml (100%) rename tests/{qemuxml2argvdata => genericxml2xmlindata}/smbios-multiple-type2.xml (100%) create mode 100644 tests/genericxml2xmloutdata/graphics-listen-network2.xml create mode 100644 tests/qemuxml2argvdata/boot-menu-disable-with-timeout.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/channel-unix-source-path.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/chardev-label.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/console-compat2.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/cpu-empty.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/cpu-host-model-features.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-active-commit.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-mirror-old.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-mirror.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-network-ssh-key.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-network-vxhs.x86_64-5.0.0.args create mode 100644 tests/qemuxml2argvdata/downscript.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/graphics-listen-network.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-autogen-address.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-large-unit.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-shareable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/interface-driver.xml create mode 100644 tests/qemuxml2argvdata/lease.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/memorybacking-set.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/memorybacking-unset.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/metadata-duplicate.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/metadata.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-bandwidth.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-bandwidth2.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-coalesce.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-isolated-port.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-linkstate.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-linkstate.xml create mode 100644 tests/qemuxml2argvdata/net-midonet.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-mtu.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-openvswitch.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-virtio-network-portgroup.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-virtio-teaming-network.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-virtio-vhost.x86_64-latest.args rename tests/qemuxml2argvdata/{vhost_queues.xml => net-virtio-vhost.xml} (67%) create mode 100644 tests/qemuxml2argvdata/numad-auto-vcpu-no-numatune.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/numad-static-vcpu-no-numatune.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/numavcpus-topology-mismatch.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/panic-pseries.ppc64-latest.args create mode 100644 tests/qemuxml2argvdata/pcihole64-gib.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/pseries-vio-address-clash.ppc64-latest.err create mode 100644 tests/qemuxml2argvdata/s390-defaultconsole.s390x-latest.args create mode 100644 tests/qemuxml2argvdata/s390-panic.s390x-latest.args create mode 100644 tests/qemuxml2argvdata/seclabel-device-multiple.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/seclabel-dynamic-none-relabel.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/seclabel-dynamic-none.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/serial-target-port-auto.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/tap-vhost-incorrect.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/tap-vhost.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/vhost-user-fs-sock.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.s390x-latest.args delete mode 100644 tests/qemuxml2xmloutdata/interface-driver.x86_64-latest.xml rename tests/qemuxml2xmloutdata/{graphics-listen-network2.x86_64-latest.xml => net-linkstate.x86_64-latest.xml} (63%) rename tests/qemuxml2xmloutdata/{vhost_queues.x86_64-latest.xml => net-virtio-vhost.x86_64-latest.xml} (78%) create mode 100644 tests/virnetworkportxml2xmldata/plug-bridge-basic.xml create mode 100644 tests/virnetworkportxml2xmldata/plug-network-basic.xml -- 2.43.0

The tests invocations were accidentaly removed in commit 54257ed51b5132032cedb7e1e7b8c34b9ae52115 Fixes: 54257ed51b5132032cedb7e1e7b8c34b9ae52115 Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2argvtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index b2ea2191dc..94ab5033e7 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1413,6 +1413,8 @@ mymain(void) DO_TEST_CAPS_LATEST("parallel-tcp-chardev"); DO_TEST_CAPS_LATEST("parallel-parport-chardev"); DO_TEST_CAPS_LATEST("parallel-unix-chardev"); + DO_TEST_CAPS_LATEST("console-compat-chardev"); + DO_TEST_CAPS_LATEST("pci-serial-dev-chardev"); DO_TEST_CAPS_LATEST("channel-guestfwd"); DO_TEST_CAPS_LATEST("channel-unix-guestfwd"); -- 2.43.0

The test case was introduced by commit 68599168ea8185689bd227e6d142e3d933558f84 but is only used in the qemunbdkittest. Fix it and make use of it also in qemuxml2argvtest. Fixes: 68599168ea8185689bd227e6d142e3d933558f84 Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../disk-network-ssh-key.x86_64-latest.args | 38 +++++++++++++++++++ .../qemuxml2argvdata/disk-network-ssh-key.xml | 2 +- tests/qemuxml2argvtest.c | 1 + 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/disk-network-ssh-key.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/disk-network-ssh-key.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-ssh-key.x86_64-latest.args new file mode 100644 index 0000000000..b8c1e0796f --- /dev/null +++ b/tests/qemuxml2argvdata/disk-network-ssh-key.x86_64-latest.args @@ -0,0 +1,38 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel kvm \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"nbd","server":{"type":"unix","path":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/nbdkit-libvirt-2-storage.socket"},"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw","file":"libvirt-2-storage"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x2","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":1}' \ +-blockdev '{"driver":"nbd","server":{"type":"unix","path":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/nbdkit-libvirt-1-storage.socket"},"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.0","addr":"0x3","drive":"libvirt-1-format","id":"virtio-disk1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/disk-network-ssh-key.xml b/tests/qemuxml2argvdata/disk-network-ssh-key.xml index fda01e7e68..6328a9b7ef 100644 --- a/tests/qemuxml2argvdata/disk-network-ssh-key.xml +++ b/tests/qemuxml2argvdata/disk-network-ssh-key.xml @@ -33,7 +33,7 @@ <identity username='myuser2' keyfile='/path/to/id_rsa'/> <knownHosts path="/path/to/ssh_known_hosts2"/> </source> - <target dev='vda' bus='virtio'/> + <target dev='vdb' bus='virtio'/> </disk> <controller type='usb' index='0'/> <controller type='pci' index='0' model='pci-root'/> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 94ab5033e7..6cb64dba6f 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1190,6 +1190,7 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-network-ssh"); DO_TEST_CAPS_LATEST_NBDKIT("disk-network-ssh-nbdkit", QEMU_NBDKIT_CAPS_PLUGIN_SSH); DO_TEST_CAPS_LATEST_NBDKIT("disk-network-ssh-password", QEMU_NBDKIT_CAPS_PLUGIN_SSH); + DO_TEST_CAPS_LATEST_NBDKIT("disk-network-ssh-key", QEMU_NBDKIT_CAPS_PLUGIN_SSH); DO_TEST_CAPS_LATEST("disk-no-boot"); DO_TEST_CAPS_LATEST("disk-nvme"); DO_TEST_CAPS_VER("disk-vhostuser-numa", "4.2.0"); -- 2.43.0

The case was removed in commit 8ff73d22c7405049452e2bf7f281f7460a6b9d10 which modernized the cases without an explicit reason. Reinstate it. Fixes: 8ff73d22c7405049452e2bf7f281f7460a6b9d10 Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../qemuxml2argvdata/pseries-vio-address-clash.ppc64-latest.err | 1 + tests/qemuxml2argvtest.c | 1 + 2 files changed, 2 insertions(+) create mode 100644 tests/qemuxml2argvdata/pseries-vio-address-clash.ppc64-latest.err diff --git a/tests/qemuxml2argvdata/pseries-vio-address-clash.ppc64-latest.err b/tests/qemuxml2argvdata/pseries-vio-address-clash.ppc64-latest.err new file mode 100644 index 0000000000..e4eed76f23 --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-vio-address-clash.ppc64-latest.err @@ -0,0 +1 @@ +XML error: spapr-vio address 0x4000 already in use diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6cb64dba6f..5cef8ca382 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1811,6 +1811,7 @@ mymain(void) DO_TEST_CAPS_LATEST_PPC64("pseries-basic"); DO_TEST_CAPS_LATEST_PPC64("pseries-vio"); + DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("pseries-vio-address-clash", "ppc64"); DO_TEST_CAPS_LATEST_PPC64("pseries-usb-default"); DO_TEST_CAPS_LATEST_PPC64("pseries-usb-multi"); DO_TEST_CAPS_LATEST_PPC64("pseries-vio-user-assigned"); -- 2.43.0

The qemu driver explicitly rejects such configuration, thus this is just a generic XML2XML test case. Move it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../smbios-multiple-type2.xml | 0 tests/genericxml2xmltest.c | 2 ++ tests/qemuxml2xmltest.c | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) rename tests/{qemuxml2argvdata => genericxml2xmlindata}/smbios-multiple-type2.xml (100%) diff --git a/tests/qemuxml2argvdata/smbios-multiple-type2.xml b/tests/genericxml2xmlindata/smbios-multiple-type2.xml similarity index 100% rename from tests/qemuxml2argvdata/smbios-multiple-type2.xml rename to tests/genericxml2xmlindata/smbios-multiple-type2.xml diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c index 3cf9bd8159..6025054876 100644 --- a/tests/genericxml2xmltest.c +++ b/tests/genericxml2xmltest.c @@ -216,6 +216,8 @@ mymain(void) DO_TEST_FAIL_INACTIVE("memorytune-colliding-allocs"); DO_TEST_FAIL_INACTIVE("memorytune-colliding-cachetune"); + DO_TEST("smbios-multiple-type2"); + DO_TEST("tseg"); DO_TEST("launch-security-sev"); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 1010b68ebc..8cc0874f65 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -761,7 +761,6 @@ mymain(void) DO_TEST_CAPS_LATEST("tap-vhost-incorrect"); DO_TEST_CAPS_LATEST("shmem-plain-doorbell"); DO_TEST_CAPS_LATEST("smbios"); - DO_TEST_CAPS_LATEST("smbios-multiple-type2"); DO_TEST_CAPS_LATEST("smbios-type-fwcfg"); DO_TEST_CAPS_ARCH_LATEST("aarch64-aavmf-virtio-mmio", "aarch64"); -- 2.43.0

On Fri, Dec 15, 2023 at 13:33:14 +0100, Peter Krempa wrote:
The qemu driver explicitly rejects such configuration, thus this is just a generic XML2XML test case. Move it.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../smbios-multiple-type2.xml | 0 tests/genericxml2xmltest.c | 2 ++ tests/qemuxml2xmltest.c | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) rename tests/{qemuxml2argvdata => genericxml2xmlindata}/smbios-multiple-type2.xml (100%)
Also tests/qemuxml2xmloutdata/smbios-multiple-type2.xml needs to be removed. I've squashed that change in locally.

'parallel-tcp-chardev', 'parallel-parport-chardev' are invoked twice with exactly the same parameters, remove the duplicity. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2argvtest.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 5cef8ca382..ae4f9f8e0a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1408,8 +1408,6 @@ mymain(void) DO_TEST_CAPS_LATEST("serial-tcp-tlsx509-secret-chardev"); VIR_FREE(driver.config->chardevTLSx509secretUUID); driver.config->chardevTLS = 0; - DO_TEST_CAPS_LATEST("parallel-tcp-chardev"); - DO_TEST_CAPS_LATEST("parallel-parport-chardev"); DO_TEST_CAPS_LATEST("serial-many-chardev"); DO_TEST_CAPS_LATEST("parallel-tcp-chardev"); DO_TEST_CAPS_LATEST("parallel-parport-chardev"); -- 2.43.0

Prevent duplicated invocation of tests by tracking use of output files. Some cases need to be exempt from this for now. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemustatusxml2xmltest.c | 2 +- tests/qemuxml2argvtest.c | 37 +++++++++++++++++++++++++++++++---- tests/testutilsqemu.h | 2 ++ 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/tests/qemustatusxml2xmltest.c b/tests/qemustatusxml2xmltest.c index f1589345c3..4796b62853 100644 --- a/tests/qemustatusxml2xmltest.c +++ b/tests/qemustatusxml2xmltest.c @@ -73,7 +73,7 @@ mymain(void) { int ret = 0; g_autoptr(virConnect) conn = NULL; - struct testQemuConf testConf = { NULL, NULL, NULL }; + struct testQemuConf testConf = { NULL, NULL, NULL, NULL }; if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ae4f9f8e0a..a5dce0a2a1 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -273,6 +273,7 @@ testCheckExclusiveFlags(int flags) FLAG_FIPS_HOST | FLAG_REAL_CAPS | FLAG_SLIRP_HELPER | + FLAG_ALLOW_DUPLICATE_OUTPUT | 0, -1); return 0; @@ -477,6 +478,28 @@ testCompareXMLToArgvValidateSchema(virCommand *cmd, } +static int +testInfoCheckDuplicate(struct testQemuInfo *info) +{ + const char *path = info->outfile; + + if (info->flags & FLAG_ALLOW_DUPLICATE_OUTPUT) + return 0; + + if (info->flags & (FLAG_EXPECT_FAILURE | FLAG_EXPECT_PARSE_ERROR)) + path = info->errfile; + + if (g_hash_table_contains(info->conf->duplicateTests, path)) { + fprintf(stderr, "\nduplicate invocation of test case: %s\n'", path); + return -1; + } + + g_hash_table_insert(info->conf->duplicateTests, g_strdup(path), NULL); + + return 0; +} + + static int testCompareXMLToArgv(const void *data) { @@ -503,6 +526,9 @@ testCompareXMLToArgv(const void *data) if (testQemuInfoInitArgs((struct testQemuInfo *) info) < 0) goto cleanup; + if (testInfoCheckDuplicate(info) < 0) + goto cleanup; + if (info->arch != VIR_ARCH_NONE && info->arch != VIR_ARCH_X86_64) qemuTestSetHostArch(&driver, info->arch); @@ -688,12 +714,14 @@ static int mymain(void) { int ret = 0; + g_autoptr(GHashTable) duplicateTests = virHashNew(NULL); g_autoptr(GHashTable) capslatest = testQemuGetLatestCaps(); g_autoptr(GHashTable) qapiSchemaCache = virHashNew((GDestroyNotify) g_hash_table_unref); g_autoptr(GHashTable) capscache = virHashNew(virObjectUnref); struct testQemuConf testConf = { .capslatest = capslatest, .capscache = capscache, - .qapiSchemaCache = qapiSchemaCache }; + .qapiSchemaCache = qapiSchemaCache, + .duplicateTests = duplicateTests }; if (!capslatest) return EXIT_FAILURE; @@ -852,7 +880,7 @@ mymain(void) DO_TEST_CAPS_ARCH_VER_PARSE_ERROR(name, "x86_64", ver) # define DO_TEST_GIC(name, ver, gic) \ - DO_TEST_CAPS_ARCH_VER_FULL(name, "aarch64", ver, ARG_GIC, gic, ARG_END) + DO_TEST_CAPS_ARCH_VER_FULL(name, "aarch64", ver, ARG_GIC, gic, ARG_FLAGS, FLAG_ALLOW_DUPLICATE_OUTPUT, ARG_END) /* Unset or set all envvars here that are copied in qemudBuildCommandLine * using ADD_ENV_COPY, otherwise these tests may fail due to unexpected @@ -1341,7 +1369,7 @@ mymain(void) DO_TEST_CAPS_LATEST("net-vhostuser-multiq"); DO_TEST_CAPS_LATEST_FAILURE("net-vhostuser-fail"); DO_TEST_CAPS_LATEST("net-user"); - DO_TEST_CAPS_ARCH_LATEST_FULL("net-user", "x86_64", ARG_FLAGS, FLAG_SLIRP_HELPER); + DO_TEST_CAPS_ARCH_LATEST_FULL("net-user", "x86_64", ARG_FLAGS, FLAG_SLIRP_HELPER | FLAG_ALLOW_DUPLICATE_OUTPUT); DO_TEST_CAPS_LATEST("net-user-addr"); DO_TEST_CAPS_LATEST("net-user-passt"); DO_TEST_CAPS_VER("net-user-passt", "7.2.0"); @@ -1592,7 +1620,8 @@ mymain(void) ARG_MIGRATE_FD, 7); DO_TEST_CAPS_ARCH_LATEST_FULL("restore-v2-fd", "x86_64", ARG_MIGRATE_FROM, "fd:7", - ARG_MIGRATE_FD, 7); + ARG_MIGRATE_FD, 7, + ARG_FLAGS, FLAG_ALLOW_DUPLICATE_OUTPUT); DO_TEST_CAPS_ARCH_LATEST_FULL("migrate", "x86_64", ARG_MIGRATE_FROM, "tcp:10.0.0.1:5000"); DO_TEST_CAPS_ARCH_LATEST_FULL("migrate-numa-unaligned", "x86_64", diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index 8dbc480756..71e220de3a 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -62,12 +62,14 @@ typedef enum { FLAG_REAL_CAPS = 1 << 3, FLAG_SLIRP_HELPER = 1 << 4, FLAG_SKIP_CONFIG_ACTIVE = 1 << 5, /* Skip 'active' config test in qemuxml2xmltest */ + FLAG_ALLOW_DUPLICATE_OUTPUT = 1 << 6, /* allow multiple tests with the same output file */ } testQemuInfoFlags; struct testQemuConf { GHashTable *capscache; GHashTable *capslatest; GHashTable *qapiSchemaCache; + GHashTable *duplicateTests; /* for checking duplicated invocations */ }; typedef enum { -- 2.43.0

Prepare for test cases which would want to call that function. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_interface.h | 2 +- tests/qemuxml2argvmock.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_interface.h b/src/qemu/qemu_interface.h index 6eed3e6bd7..67cbada36e 100644 --- a/src/qemu/qemu_interface.h +++ b/src/qemu/qemu_interface.h @@ -48,7 +48,7 @@ int qemuInterfaceBridgeConnect(virDomainDef *def, virDomainNetDef *net, int *tapfd, size_t *tapfdSize) - ATTRIBUTE_NONNULL(2); + ATTRIBUTE_NONNULL(2) G_NO_INLINE; int qemuInterfaceOpenVhostNet(virDomainObj *def, virDomainNetDef *net) G_NO_INLINE; diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index 52c44b2ed0..f2696bd4c3 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -113,6 +113,23 @@ virNetDevTapCreate(char **ifname, } } + +int +qemuInterfaceBridgeConnect(virDomainDef *def G_GNUC_UNUSED, + virQEMUDriver *driver G_GNUC_UNUSED, + virDomainNetDef *net G_GNUC_UNUSED, + int *tapfd, + size_t *tapfdSize) +{ + size_t i; + + for (i = 0; i < *tapfdSize; i++) + tapfd[i] = STDERR_FILENO + 100 + i; + + return 0; +} + + int virNetDevSetMAC(const char *ifname G_GNUC_UNUSED, const virMacAddr *macaddr G_GNUC_UNUSED) -- 2.43.0

There were plenty of test cases invoked only from qemuxml2xmltest but not from qemuxml2argvtest, either by accident or it was deemed unneeded. Bulk-add all test cases which fit the above description which don't require faking the network driver. Use same invocation as present in qemuxml2xmltest. Arguably in certain cases we could move the test case to genericxml2xmltest, but this covers the cases when that would not be appropriate. Tests requiring the network driver will be bulk-added when the fake network driver will be implemented. This patch also allows the use of FLAG_SKIP_CONFIG_ACTIVE in qemuxml2argvtest although the flag will be dormant for now. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...nu-disable-with-timeout.x86_64-latest.args | 36 +++++++++++ ...hannel-unix-source-path.x86_64-latest.args | 45 ++++++++++++++ .../chardev-label.x86_64-latest.args | 41 +++++++++++++ .../console-compat2.x86_64-latest.args | 40 +++++++++++++ .../cpu-empty.x86_64-latest.args | 33 ++++++++++ ...cpu-host-model-features.x86_64-latest.args | 33 ++++++++++ .../cpu-numa-disordered.x86_64-latest.args | 38 ++++++++++++ .../disk-active-commit.x86_64-latest.args | 38 ++++++++++++ .../disk-mirror-old.x86_64-latest.args | 45 ++++++++++++++ .../disk-mirror.x86_64-latest.args | 48 +++++++++++++++ .../disk-network-vxhs.x86_64-5.0.0.args | 35 +++++++++++ .../downscript.x86_64-latest.args | 43 +++++++++++++ .../hostdev-mdev-display.x86_64-latest.args | 34 +++++++++++ ...ev-scsi-autogen-address.x86_64-latest.args | 60 +++++++++++++++++++ ...hostdev-scsi-large-unit.x86_64-latest.args | 39 ++++++++++++ .../hostdev-scsi-shareable.x86_64-latest.args | 39 ++++++++++++ .../qemuxml2argvdata/lease.x86_64-latest.args | 39 ++++++++++++ .../memorybacking-set.x86_64-latest.args | 33 ++++++++++ .../memorybacking-unset.x86_64-latest.args | 33 ++++++++++ .../metadata-duplicate.x86_64-latest.args | 36 +++++++++++ .../metadata.x86_64-latest.args | 36 +++++++++++ .../net-midonet.x86_64-latest.args | 38 ++++++++++++ ...d-auto-vcpu-no-numatune.x86_64-latest.args | 36 +++++++++++ ...static-vcpu-no-numatune.x86_64-latest.args | 36 +++++++++++ ...vcpus-topology-mismatch.x86_64-latest.args | 34 +++++++++++ .../panic-pseries.ppc64-latest.args | 34 +++++++++++ .../pcihole64-gib.x86_64-latest.args | 34 +++++++++++ .../s390-defaultconsole.s390x-latest.args | 33 ++++++++++ .../s390-panic.s390x-latest.args | 35 +++++++++++ ...eclabel-device-multiple.x86_64-latest.args | 36 +++++++++++ ...el-dynamic-none-relabel.x86_64-latest.args | 37 ++++++++++++ .../seclabel-dynamic-none.x86_64-latest.args | 36 +++++++++++ ...serial-target-port-auto.x86_64-latest.args | 42 +++++++++++++ .../vhost-user-fs-sock.x86_64-latest.args | 34 +++++++++++ ...ideo-virtio-gpu-ccw-auto.s390x-latest.args | 36 +++++++++++ tests/qemuxml2argvtest.c | 39 ++++++++++++ 36 files changed, 1364 insertions(+) create mode 100644 tests/qemuxml2argvdata/boot-menu-disable-with-timeout.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/channel-unix-source-path.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/chardev-label.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/console-compat2.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/cpu-empty.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/cpu-host-model-features.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-active-commit.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-mirror-old.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-mirror.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-network-vxhs.x86_64-5.0.0.args create mode 100644 tests/qemuxml2argvdata/downscript.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-autogen-address.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-large-unit.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-shareable.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/lease.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/memorybacking-set.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/memorybacking-unset.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/metadata-duplicate.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/metadata.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-midonet.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/numad-auto-vcpu-no-numatune.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/numad-static-vcpu-no-numatune.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/numavcpus-topology-mismatch.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/panic-pseries.ppc64-latest.args create mode 100644 tests/qemuxml2argvdata/pcihole64-gib.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/s390-defaultconsole.s390x-latest.args create mode 100644 tests/qemuxml2argvdata/s390-panic.s390x-latest.args create mode 100644 tests/qemuxml2argvdata/seclabel-device-multiple.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/seclabel-dynamic-none-relabel.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/seclabel-dynamic-none.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/serial-target-port-auto.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/vhost-user-fs-sock.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.s390x-latest.args diff --git a/tests/qemuxml2argvdata/boot-menu-disable-with-timeout.x86_64-latest.args b/tests/qemuxml2argvdata/boot-menu-disable-with-timeout.x86_64-latest.args new file mode 100644 index 0000000000..0831ef754c --- /dev/null +++ b/tests/qemuxml2argvdata/boot-menu-disable-with-timeout.x86_64-latest.args @@ -0,0 +1,36 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot menu=off,strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_cdrom","filename":"/dev/cdrom","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-format","id":"ide0-1-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/channel-unix-source-path.x86_64-latest.args b/tests/qemuxml2argvdata/channel-unix-source-path.x86_64-latest.args new file mode 100644 index 0000000000..821a508a40 --- /dev/null +++ b/tests/qemuxml2argvdata/channel-unix-source-path.x86_64-latest.args @@ -0,0 +1,45 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x2"}' \ +-chardev socket,id=charchannel0,fd=1729,server=on,wait=off \ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \ +-chardev socket,id=charchannel1,fd=1729,server=on,wait=off \ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":2,"chardev":"charchannel1","id":"channel1","name":"org.qemu.guest_agent.1"}' \ +-chardev socket,id=charchannel2,fd=1729,server=on,wait=off \ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":3,"chardev":"charchannel2","id":"channel2","name":"org.qemu.guest_agent.2"}' \ +-chardev socket,id=charchannel3,fd=1729,server=on,wait=off \ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":4,"chardev":"charchannel3","id":"channel3","name":"org.qemu.guest_agent.3"}' \ +-chardev socket,id=charchannel4,fd=1729,server=on,wait=off \ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":5,"chardev":"charchannel4","id":"channel4","name":"org.qemu.guest_agent.4"}' \ +-chardev socket,id=charchannel5,fd=1729,server=on,wait=off \ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":6,"chardev":"charchannel5","id":"channel5","name":"org.qemu.guest_agent.5"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/chardev-label.x86_64-latest.args b/tests/qemuxml2argvdata/chardev-label.x86_64-latest.args new file mode 100644 index 0000000000..9e54c0f7f3 --- /dev/null +++ b/tests/qemuxml2argvdata/chardev-label.x86_64-latest.args @@ -0,0 +1,41 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-machine \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-machine/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-machine/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-machine/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=machine,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-machine/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 2187c512-ff97-47d7-b67c-c02d3bdc219d \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-add-fd set=0,fd=1750,opaque=serial0-source \ +-chardev file,id=charserial0,path=/dev/fdset/0,append=on \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-chardev socket,id=charserial1,path=/tmp/serial.sock \ +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-chardev pipe,id=charrng0,path=/dev/null \ +-object '{"qom-type":"rng-egd","id":"objrng0","chardev":"charrng0"}' \ +-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/console-compat2.x86_64-latest.args b/tests/qemuxml2argvdata/console-compat2.x86_64-latest.args new file mode 100644 index 0000000000..3c56f67018 --- /dev/null +++ b/tests/qemuxml2argvdata/console-compat2.x86_64-latest.args @@ -0,0 +1,40 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-chardev pty,id=charconsole1 \ +-device '{"driver":"virtconsole","chardev":"charconsole1","id":"console1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-empty.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-empty.x86_64-latest.args new file mode 100644 index 0000000000..46bc2fe37a --- /dev/null +++ b/tests/qemuxml2argvdata/cpu-empty.x86_64-latest.args @@ -0,0 +1,33 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-cpu-empty \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-cpu-empty/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-cpu-empty/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-cpu-empty/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=cpu-empty,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-cpu-empty/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel kvm \ +-cpu qemu64 \ +-m size=4000768k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":4096786432}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 1aed4c39-ad6e-4a78-9264-4ce996290d17 \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-host-model-features.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-host-model-features.x86_64-latest.args new file mode 100644 index 0000000000..ae1fe91b7f --- /dev/null +++ b/tests/qemuxml2argvdata/cpu-host-model-features.x86_64-latest.args @@ -0,0 +1,33 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel kvm \ +-cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,lbrv=on,tsc-scale=on,vmcb-clean=on,pause-filter=on,pfthreshold=on,v-vmsave-vmload=on,vgif=on,svme-addr-chk=on,lfence-always-serializing=on,null-sel-clr-base=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,gds-no=on,xsaves=off,abm=on,ds=on,invtsc=off \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args new file mode 100644 index 0000000000..ee6974326d --- /dev/null +++ b/tests/qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args @@ -0,0 +1,38 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=328704k \ +-overcommit mem-lock=off \ +-smp 16,sockets=2,dies=1,cores=4,threads=2 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":112197632}' \ +-numa node,nodeid=0,cpus=0-5,memdev=ram-node0 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":112197632}' \ +-numa node,nodeid=1,cpus=11-15,memdev=ram-node1 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node2","size":112197632}' \ +-numa node,nodeid=2,cpus=6-10,memdev=ram-node2 \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/disk-active-commit.x86_64-latest.args b/tests/qemuxml2argvdata/disk-active-commit.x86_64-latest.args new file mode 100644 index 0000000000..656ea0127a --- /dev/null +++ b/tests/qemuxml2argvdata/disk-active-commit.x86_64-latest.args @@ -0,0 +1,38 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"raw","file":"libvirt-2-storage"}' \ +-blockdev '{"driver":"file","filename":"/tmp/HostVG/QEMUGuest1-snap","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":"libvirt-2-format"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/disk-mirror-old.x86_64-latest.args b/tests/qemuxml2argvdata/disk-mirror-old.x86_64-latest.args new file mode 100644 index 0000000000..c7da90fb5d --- /dev/null +++ b/tests/qemuxml2argvdata/disk-mirror-old.x86_64-latest.args @@ -0,0 +1,45 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"raw","file":"libvirt-4-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-4-format","id":"ide0-0-0","bootindex":1}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2","node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-3-format","read-only":true,"driver":"raw","file":"libvirt-3-storage"}' \ +-device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-3-format","id":"ide0-1-0"}' \ +-blockdev '{"driver":"file","filename":"/tmp/data.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw","file":"libvirt-2-storage"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x2","drive":"libvirt-2-format","id":"virtio-disk0"}' \ +-blockdev '{"driver":"file","filename":"/tmp/logs.img","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.0","addr":"0x3","drive":"libvirt-1-format","id":"virtio-disk1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x4"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/disk-mirror.x86_64-latest.args b/tests/qemuxml2argvdata/disk-mirror.x86_64-latest.args new file mode 100644 index 0000000000..466752fad1 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-mirror.x86_64-latest.args @@ -0,0 +1,48 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-5-format","read-only":false,"driver":"raw","file":"libvirt-5-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-5-format","id":"ide0-0-0","bootindex":1}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2","node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-4-format","read-only":true,"driver":"raw","file":"libvirt-4-storage"}' \ +-device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-4-format","id":"ide0-1-0"}' \ +-blockdev '{"driver":"file","filename":"/tmp/data.img","node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw","file":"libvirt-3-storage"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x2","drive":"libvirt-3-format","id":"virtio-disk0"}' \ +-blockdev '{"driver":"file","filename":"/tmp/logs.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw","file":"libvirt-2-storage"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x3","drive":"libvirt-2-format","id":"virtio-disk1"}' \ +-blockdev '{"driver":"file","filename":"/tmp/data2.img","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.0","addr":"0x4","drive":"libvirt-1-format","id":"virtio-disk2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x5"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/disk-network-vxhs.x86_64-5.0.0.args b/tests/qemuxml2argvdata/disk-network-vxhs.x86_64-5.0.0.args new file mode 100644 index 0000000000..837806b002 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-network-vxhs.x86_64-5.0.0.args @@ -0,0 +1,35 @@ +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-x86_64 \ +-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 pc-i440fx-5.0,usb=off,dump-guest-core=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-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 piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-blockdev '{"driver":"vxhs","vdisk-id":"eb90327c-8302-4725-9e1b-4e85ed4dc251","server":{"host":"192.168.0.1","port":"9999"},"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap","cache":{"direct":true,"no-flush":false}}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \ +-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=libvirt-1-format,id=virtio-disk0,bootindex=1,write-cache=on,serial=eb90327c-8302-4725-9e1b-4e85ed4dc251 \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/downscript.x86_64-latest.args b/tests/qemuxml2argvdata/downscript.x86_64-latest.args new file mode 100644 index 0000000000..bab5789383 --- /dev/null +++ b/tests/qemuxml2argvdata/downscript.x86_64-latest.args @@ -0,0 +1,43 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x9"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/img1","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.0","addr":"0xa","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \ +-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ +-device '{"driver":"virtio-9p-pci","id":"fs0","fsdev":"fsdev-fs0","mount_tag":"fs1","bus":"pci.0","addr":"0x3"}' \ +-fsdev local,security_model=mapped,id=fsdev-fs1,path=/export/fs2 \ +-device '{"driver":"virtio-9p-pci","id":"fs1","fsdev":"fsdev-fs1","mount_tag":"fs2","bus":"pci.0","addr":"0x4"}' \ +-netdev '{"type":"tap","fd":"3","vhost":true,"vhostfd":"44","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:f6:66:88","bus":"pci.0","addr":"0xb"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0xc"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-mdev-display.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-mdev-display.x86_64-latest.args new file mode 100644 index 0000000000..b3e9d12f4e --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-mdev-display.x86_64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest2,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest2/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-vnc 127.0.0.1:0,audiodev=audio1 \ +-device '{"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"bus":"pci.0","addr":"0x2"}' \ +-device '{"driver":"vfio-pci","id":"hostdev0","sysfsdev":"/sys/bus/mdev/devices/53764d0e-85a0-42b4-af5c-2046b460b1dc","display":"on","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-autogen-address.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-autogen-address.x86_64-latest.args new file mode 100644 index 0000000000..6c0ed726ec --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-scsi-autogen-address.x86_64-latest.args @@ -0,0 +1,60 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest2,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest2/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9466-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.0","addr":"0x2"}' \ +-device '{"driver":"virtio-scsi-pci","id":"scsi1","bus":"pci.0","addr":"0x3"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-2-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-2-backend","id":"hostdev0","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":0}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-3-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-3-backend","id":"hostdev1","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":1}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-4-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-4-backend","id":"hostdev2","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":2}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-5-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-5-backend","id":"hostdev3","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":3}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-6-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-6-backend","id":"hostdev4","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":4}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-7-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-7-backend","id":"hostdev5","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":5}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-8-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-8-backend","id":"hostdev6","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":6}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-9-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-9-backend","id":"hostdev7","bus":"scsi1.0","channel":0,"scsi-id":0,"lun":0}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-10-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-10-backend","id":"hostdev8","bus":"scsi1.0","channel":0,"scsi-id":0,"lun":1}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-11-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-11-backend","id":"hostdev9","bus":"scsi1.0","channel":0,"scsi-id":0,"lun":5}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-12-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-12-backend","id":"hostdev10","bus":"scsi1.0","channel":0,"scsi-id":0,"lun":2}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x4"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-large-unit.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-large-unit.x86_64-latest.args new file mode 100644 index 0000000000..f8aca24c05 --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-scsi-large-unit.x86_64-latest.args @@ -0,0 +1,39 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest2,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest2/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9466-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.0","addr":"0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-2-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-2-backend","id":"hostdev0","bus":"scsi0.0","channel":0,"scsi-id":4,"lun":8}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-shareable.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-shareable.x86_64-latest.args new file mode 100644 index 0000000000..f8aca24c05 --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-scsi-shareable.x86_64-latest.args @@ -0,0 +1,39 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest2,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest2/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9466-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.0","addr":"0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-2-backend","read-only":false}' \ +-device '{"driver":"scsi-generic","drive":"libvirt-2-backend","id":"hostdev0","bus":"scsi0.0","channel":0,"scsi-id":4,"lun":8}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/lease.x86_64-latest.args b/tests/qemuxml2argvdata/lease.x86_64-latest.args new file mode 100644 index 0000000000..3daaae18b0 --- /dev/null +++ b/tests/qemuxml2argvdata/lease.x86_64-latest.args @@ -0,0 +1,39 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=220160k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":225443840}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw","file":"libvirt-2-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-2-format","id":"ide0-0-0","bootindex":1}' \ +-blockdev '{"driver":"file","filename":"/root/boot.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-format","id":"ide0-1-0"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/memorybacking-set.x86_64-latest.args b/tests/qemuxml2argvdata/memorybacking-set.x86_64-latest.args new file mode 100644 index 0000000000..9c0fb4bdb6 --- /dev/null +++ b/tests/qemuxml2argvdata/memorybacking-set.x86_64-latest.args @@ -0,0 +1,33 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-SomeDummyGuest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-SomeDummyGuest/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-SomeDummyGuest/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-SomeDummyGuest/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=SomeDummyGuest,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-SomeDummyGuest/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=1048576k \ +-object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/var/lib/libvirt/qemu/ram/-1-SomeDummyGuest/pc.ram","share":true,"x-use-canonical-path-for-ramblock-id":false,"prealloc":true,"size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,cores=1,threads=1 \ +-uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/memorybacking-unset.x86_64-latest.args b/tests/qemuxml2argvdata/memorybacking-unset.x86_64-latest.args new file mode 100644 index 0000000000..5e6d15e37b --- /dev/null +++ b/tests/qemuxml2argvdata/memorybacking-unset.x86_64-latest.args @@ -0,0 +1,33 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-SomeDummyGuest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-SomeDummyGuest/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-SomeDummyGuest/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-SomeDummyGuest/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=SomeDummyGuest,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-SomeDummyGuest/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=1048576k \ +-object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/var/lib/libvirt/qemu/ram/-1-SomeDummyGuest/pc.ram","share":false,"x-use-canonical-path-for-ramblock-id":false,"size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,cores=1,threads=1 \ +-uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/metadata-duplicate.x86_64-latest.args b/tests/qemuxml2argvdata/metadata-duplicate.x86_64-latest.args new file mode 100644 index 0000000000..486a07b157 --- /dev/null +++ b/tests/qemuxml2argvdata/metadata-duplicate.x86_64-latest.args @@ -0,0 +1,36 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/metadata.x86_64-latest.args b/tests/qemuxml2argvdata/metadata.x86_64-latest.args new file mode 100644 index 0000000000..486a07b157 --- /dev/null +++ b/tests/qemuxml2argvdata/metadata.x86_64-latest.args @@ -0,0 +1,36 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/net-midonet.x86_64-latest.args b/tests/qemuxml2argvdata/net-midonet.x86_64-latest.args new file mode 100644 index 0000000000..87395d3ee5 --- /dev/null +++ b/tests/qemuxml2argvdata/net-midonet.x86_64-latest.args @@ -0,0 +1,38 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-netdev '{"type":"tap","fd":"102","vhost":true,"vhostfd":"44","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/numad-auto-vcpu-no-numatune.x86_64-latest.args b/tests/qemuxml2argvdata/numad-auto-vcpu-no-numatune.x86_64-latest.args new file mode 100644 index 0000000000..7022d2cc00 --- /dev/null +++ b/tests/qemuxml2argvdata/numad-auto-vcpu-no-numatune.x86_64-latest.args @@ -0,0 +1,36 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,dies=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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/numad-static-vcpu-no-numatune.x86_64-latest.args b/tests/qemuxml2argvdata/numad-static-vcpu-no-numatune.x86_64-latest.args new file mode 100644 index 0000000000..ffbccb8408 --- /dev/null +++ b/tests/qemuxml2argvdata/numad-static-vcpu-no-numatune.x86_64-latest.args @@ -0,0 +1,36 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,dies=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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/numavcpus-topology-mismatch.x86_64-latest.args b/tests/qemuxml2argvdata/numavcpus-topology-mismatch.x86_64-latest.args new file mode 100644 index 0000000000..72b025c2f6 --- /dev/null +++ b/tests/qemuxml2argvdata/numavcpus-topology-mismatch.x86_64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-dummy \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-dummy/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-dummy/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-dummy/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=dummy,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-dummy/master-key.aes"}' \ +-machine pc-i440fx-2.3,usb=off,dump-guest-core=off,acpi=off \ +-accel kvm \ +-cpu qemu64 \ +-m size=7864320k,slots=16,maxmem=16777216k \ +-overcommit mem-lock=off \ +-smp 12,sockets=12,cores=1,threads=1 \ +-numa node,nodeid=0,cpus=0-1,cpus=5,cpus=7-11,mem=3840 \ +-numa node,nodeid=1,cpus=2-4,cpus=6,mem=3840 \ +-uuid 4d92ec27-9ebf-400b-ae91-20c71c647c19 \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/panic-pseries.ppc64-latest.args b/tests/qemuxml2argvdata/panic-pseries.ppc64-latest.args new file mode 100644 index 0000000000..980307568c --- /dev/null +++ b/tests/qemuxml2argvdata/panic-pseries.ppc64-latest.args @@ -0,0 +1,34 @@ +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-ppc64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pseries,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \ +-accel tcg \ +-cpu POWER9 \ +-m size=524288k \ +-object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.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 \ +-boot strict=on \ +-device '{"driver":"pci-ohci","id":"usb","bus":"pci.0","addr":"0x1"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"spapr-vty","chardev":"charserial0","id":"serial0","reg":805306368}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/pcihole64-gib.x86_64-latest.args b/tests/qemuxml2argvdata/pcihole64-gib.x86_64-latest.args new file mode 100644 index 0000000000..47533c584c --- /dev/null +++ b/tests/qemuxml2argvdata/pcihole64-gib.x86_64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-foo \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-foo/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-foo/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-foo/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=foo,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-foo/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=2097152k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":2147483648}' \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,cores=1,threads=1 \ +-uuid c84fc647-6198-4ff9-bf81-d65a1f8f5ec0 \ +-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 \ +-boot strict=on \ +-global i440FX-pcihost.pci-hole64-size=1048576K \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/s390-defaultconsole.s390x-latest.args b/tests/qemuxml2argvdata/s390-defaultconsole.s390x-latest.args new file mode 100644 index 0000000000..dde5b6ad13 --- /dev/null +++ b/tests/qemuxml2argvdata/s390-defaultconsole.s390x-latest.args @@ -0,0 +1,33 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \ +/usr/bin/qemu-system-s390x \ +-name guest=test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \ +-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \ +-accel kvm \ +-cpu gen16a-base,nnpa=on,aen=on,cmmnt=on,vxpdeh=on,aefsi=on,diag318=on,csske=on,mepoch=on,msa9=on,msa8=on,msa7=on,msa6=on,msa5=on,msa4=on,msa3=on,msa2=on,msa1=on,sthyi=on,edat=on,ri=on,deflate=on,edat2=on,etoken=on,vx=on,ipter=on,pai=on,paie=on,mepochptff=on,ap=on,vxeh=on,vxpd=on,esop=on,msa9_pckmo=on,vxeh2=on,esort=on,apqi=on,apft=on,els=on,iep=on,apqci=on,cte=on,ais=on,bpb=on,gs=on,ppa15=on,zpci=on,rdp=on,sea_esop2=on,beareh=on,te=on,cmm=on,vxpdeh2=on \ +-m size=262144k \ +-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":268435456}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 9aa4b45c-b9dd-45ef-91fe-862b27b4231f \ +-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 \ +-boot strict=on \ +-chardev pty,id=charserial0 \ +-device '{"driver":"sclpconsole","chardev":"charserial0","id":"serial0"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/s390-panic.s390x-latest.args b/tests/qemuxml2argvdata/s390-panic.s390x-latest.args new file mode 100644 index 0000000000..b4b8c9e63e --- /dev/null +++ b/tests/qemuxml2argvdata/s390-panic.s390x-latest.args @@ -0,0 +1,35 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \ +/usr/bin/qemu-system-s390x \ +-name guest=test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \ +-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \ +-accel kvm \ +-cpu gen16a-base,nnpa=on,aen=on,cmmnt=on,vxpdeh=on,aefsi=on,diag318=on,csske=on,mepoch=on,msa9=on,msa8=on,msa7=on,msa6=on,msa5=on,msa4=on,msa3=on,msa2=on,msa1=on,sthyi=on,edat=on,ri=on,deflate=on,edat2=on,etoken=on,vx=on,ipter=on,pai=on,paie=on,mepochptff=on,ap=on,vxeh=on,vxpd=on,esop=on,msa9_pckmo=on,vxeh2=on,esort=on,apqi=on,apft=on,els=on,iep=on,apqci=on,cte=on,ais=on,bpb=on,gs=on,ppa15=on,zpci=on,rdp=on,sea_esop2=on,beareh=on,te=on,cmm=on,vxpdeh2=on \ +-m size=262144k \ +-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":268435456}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 9aa4b45c-b9dd-45ef-91fe-862b27b4231f \ +-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 \ +-boot strict=on \ +-device '{"driver":"virtio-serial-ccw","id":"virtio-serial0","devno":"fe.0.0000"}' \ +-chardev pty,id=charconsole0 \ +-device '{"driver":"virtconsole","chardev":"charconsole0","id":"console0"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/seclabel-device-multiple.x86_64-latest.args b/tests/qemuxml2argvdata/seclabel-device-multiple.x86_64-latest.args new file mode 100644 index 0000000000..486a07b157 --- /dev/null +++ b/tests/qemuxml2argvdata/seclabel-device-multiple.x86_64-latest.args @@ -0,0 +1,36 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/seclabel-dynamic-none-relabel.x86_64-latest.args b/tests/qemuxml2argvdata/seclabel-dynamic-none-relabel.x86_64-latest.args new file mode 100644 index 0000000000..3cdc3360a7 --- /dev/null +++ b/tests/qemuxml2argvdata/seclabel-dynamic-none-relabel.x86_64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-migt10 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-migt10/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-migt10/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-migt10/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=migt10,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-migt10/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=on \ +-accel kvm \ +-cpu qemu64 \ +-m size=262144k \ +-object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-migt10","x-use-canonical-path-for-ramblock-id":false,"prealloc":true,"size":268435456}' \ +-overcommit mem-lock=off \ +-smp 4,sockets=4,cores=1,threads=1 \ +-uuid 0d73c5c3-43d0-f75b-31de-6aa919b0176b \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x4"}' \ +-chardev spicevmc,id=charchannel0,name=vdagent \ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"com.redhat.spice.0"}' \ +-audiodev '{"id":"audio1","driver":"spice"}' \ +-spice port=5901,addr=0.0.0.0,seamless-migration=on \ +-device '{"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x5"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/seclabel-dynamic-none.x86_64-latest.args b/tests/qemuxml2argvdata/seclabel-dynamic-none.x86_64-latest.args new file mode 100644 index 0000000000..486a07b157 --- /dev/null +++ b/tests/qemuxml2argvdata/seclabel-dynamic-none.x86_64-latest.args @@ -0,0 +1,36 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/serial-target-port-auto.x86_64-latest.args b/tests/qemuxml2argvdata/serial-target-port-auto.x86_64-latest.args new file mode 100644 index 0000000000..b16ca88514 --- /dev/null +++ b/tests/qemuxml2argvdata/serial-target-port-auto.x86_64-latest.args @@ -0,0 +1,42 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-chardev null,id=charserial1 \ +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \ +-chardev stdio,id=charserial2 \ +-device '{"driver":"isa-serial","chardev":"charserial2","id":"serial2","index":2}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/vhost-user-fs-sock.x86_64-latest.args b/tests/qemuxml2argvdata/vhost-user-fs-sock.x86_64-latest.args new file mode 100644 index 0000000000..dab40e524c --- /dev/null +++ b/tests/qemuxml2argvdata/vhost-user-fs-sock.x86_64-latest.args @@ -0,0 +1,34 @@ +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-x86_64 \ +-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 pc,usb=off,dump-guest-core=off,acpi=off \ +-accel kvm \ +-cpu qemu64 \ +-m size=14680064k \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,cores=1,threads=1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/var/lib/libvirt/qemu/ram/-1-guest/ram-node0","share":true,"size":15032385536}' \ +-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ +-uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \ +-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 \ +-boot strict=on \ +-chardev socket,id=chr-vu-fs0,path=/tmp/sock \ +-device '{"driver":"vhost-user-fs-pci","id":"fs0","chardev":"chr-vu-fs0","queue-size":1024,"tag":"tag","bus":"pci.0","addr":"0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.s390x-latest.args b/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.s390x-latest.args new file mode 100644 index 0000000000..fbb07325b1 --- /dev/null +++ b/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.s390x-latest.args @@ -0,0 +1,36 @@ +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-s390x \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \ +-accel tcg \ +-cpu qemu \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1803 \ +-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 \ +-boot strict=on \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-vnc 127.0.0.1:0,audiodev=audio1 \ +-device '{"driver":"virtio-gpu-ccw","id":"video0","max_outputs":1,"devno":"fe.0.0001"}' \ +-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0002"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a5dce0a2a1..06fdd02b76 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -274,6 +274,7 @@ testCheckExclusiveFlags(int flags) FLAG_REAL_CAPS | FLAG_SLIRP_HELPER | FLAG_ALLOW_DUPLICATE_OUTPUT | + FLAG_SKIP_CONFIG_ACTIVE | 0, -1); return 0; @@ -2441,6 +2442,44 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("s390-async-teardown-disabled", "s390x"); DO_TEST_CAPS_ARCH_VER("s390-async-teardown-disabled", "s390x", "6.0.0"); + /* following cases are instances from qemuxml2xmltest which were not tested + * in qemuxml2argvtest */ + DO_TEST_CAPS_LATEST("boot-menu-disable-with-timeout"); + DO_TEST_CAPS_LATEST("channel-unix-source-path"); + DO_TEST_CAPS_LATEST("chardev-label"); + DO_TEST_CAPS_LATEST("console-compat2"); + DO_TEST_CAPS_LATEST("cpu-empty"); + DO_TEST_CAPS_LATEST("cpu-host-model-features"); + DO_TEST_CAPS_LATEST("cpu-numa-disordered"); + DO_TEST_CAPS_LATEST("disk-active-commit"); + DO_TEST_CAPS_LATEST("disk-mirror-old"); + DO_TEST_CAPS_LATEST("disk-mirror"); + DO_TEST_CAPS_VER("disk-network-vxhs", "5.0.0"); + DO_TEST_CAPS_LATEST("downscript"); + DO_TEST_CAPS_LATEST("hostdev-mdev-display"); + DO_TEST_CAPS_LATEST("hostdev-scsi-autogen-address"); + DO_TEST_CAPS_LATEST("hostdev-scsi-large-unit"); + DO_TEST_CAPS_LATEST("hostdev-scsi-shareable"); + DO_TEST_CAPS_LATEST("lease"); + DO_TEST_CAPS_LATEST("memorybacking-set"); + DO_TEST_CAPS_LATEST("memorybacking-unset"); + DO_TEST_CAPS_LATEST("metadata-duplicate"); + DO_TEST_CAPS_LATEST("metadata"); + DO_TEST_CAPS_LATEST("net-midonet"); + DO_TEST_CAPS_LATEST("numad-auto-vcpu-no-numatune"); + DO_TEST_CAPS_LATEST("numad-static-vcpu-no-numatune"); + DO_TEST_CAPS_LATEST("numavcpus-topology-mismatch"); + DO_TEST_CAPS_ARCH_LATEST("panic-pseries", "ppc64"); + DO_TEST_CAPS_LATEST("pcihole64-gib"); + DO_TEST_CAPS_ARCH_LATEST("s390-defaultconsole", "s390x"); + DO_TEST_CAPS_ARCH_LATEST("s390-panic", "s390x"); + DO_TEST_CAPS_LATEST("seclabel-device-multiple"); + DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-none-relabel", "x86_64", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END); + DO_TEST_CAPS_LATEST("seclabel-dynamic-none"); + DO_TEST_CAPS_LATEST("serial-target-port-auto"); + DO_TEST_CAPS_LATEST("vhost-user-fs-sock"); + DO_TEST_CAPS_ARCH_LATEST("video-virtio-gpu-ccw-auto", "s390x"); + qemuTestDriverFree(&driver); virFileWrapperClearPrefixes(); -- 2.43.0

On 12/15/23 13:33, Peter Krempa wrote:
There were plenty of test cases invoked only from qemuxml2xmltest but not from qemuxml2argvtest, either by accident or it was deemed unneeded.
Bulk-add all test cases which fit the above description which don't require faking the network driver. Use same invocation as present in qemuxml2xmltest.
Arguably in certain cases we could move the test case to genericxml2xmltest, but this covers the cases when that would not be appropriate.
Tests requiring the network driver will be bulk-added when the fake network driver will be implemented.
This patch also allows the use of FLAG_SKIP_CONFIG_ACTIVE in qemuxml2argvtest although the flag will be dormant for now.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...nu-disable-with-timeout.x86_64-latest.args | 36 +++++++++++ ...hannel-unix-source-path.x86_64-latest.args | 45 ++++++++++++++ .../chardev-label.x86_64-latest.args | 41 +++++++++++++ .../console-compat2.x86_64-latest.args | 40 +++++++++++++ .../cpu-empty.x86_64-latest.args | 33 ++++++++++ ...cpu-host-model-features.x86_64-latest.args | 33 ++++++++++ .../cpu-numa-disordered.x86_64-latest.args | 38 ++++++++++++ .../disk-active-commit.x86_64-latest.args | 38 ++++++++++++ .../disk-mirror-old.x86_64-latest.args | 45 ++++++++++++++ .../disk-mirror.x86_64-latest.args | 48 +++++++++++++++ .../disk-network-vxhs.x86_64-5.0.0.args | 35 +++++++++++ .../downscript.x86_64-latest.args | 43 +++++++++++++ .../hostdev-mdev-display.x86_64-latest.args | 34 +++++++++++ ...ev-scsi-autogen-address.x86_64-latest.args | 60 +++++++++++++++++++ ...hostdev-scsi-large-unit.x86_64-latest.args | 39 ++++++++++++ .../hostdev-scsi-shareable.x86_64-latest.args | 39 ++++++++++++ .../qemuxml2argvdata/lease.x86_64-latest.args | 39 ++++++++++++ .../memorybacking-set.x86_64-latest.args | 33 ++++++++++ .../memorybacking-unset.x86_64-latest.args | 33 ++++++++++ .../metadata-duplicate.x86_64-latest.args | 36 +++++++++++ .../metadata.x86_64-latest.args | 36 +++++++++++ .../net-midonet.x86_64-latest.args | 38 ++++++++++++ ...d-auto-vcpu-no-numatune.x86_64-latest.args | 36 +++++++++++ ...static-vcpu-no-numatune.x86_64-latest.args | 36 +++++++++++ ...vcpus-topology-mismatch.x86_64-latest.args | 34 +++++++++++ .../panic-pseries.ppc64-latest.args | 34 +++++++++++ .../pcihole64-gib.x86_64-latest.args | 34 +++++++++++ .../s390-defaultconsole.s390x-latest.args | 33 ++++++++++ .../s390-panic.s390x-latest.args | 35 +++++++++++ ...eclabel-device-multiple.x86_64-latest.args | 36 +++++++++++ ...el-dynamic-none-relabel.x86_64-latest.args | 37 ++++++++++++ .../seclabel-dynamic-none.x86_64-latest.args | 36 +++++++++++ ...serial-target-port-auto.x86_64-latest.args | 42 +++++++++++++ .../vhost-user-fs-sock.x86_64-latest.args | 34 +++++++++++ ...ideo-virtio-gpu-ccw-auto.s390x-latest.args | 36 +++++++++++ tests/qemuxml2argvtest.c | 39 ++++++++++++ 36 files changed, 1364 insertions(+)
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a5dce0a2a1..06fdd02b76 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -274,6 +274,7 @@ testCheckExclusiveFlags(int flags) FLAG_REAL_CAPS | FLAG_SLIRP_HELPER | FLAG_ALLOW_DUPLICATE_OUTPUT | + FLAG_SKIP_CONFIG_ACTIVE | 0, -1);
return 0; @@ -2441,6 +2442,44 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("s390-async-teardown-disabled", "s390x"); DO_TEST_CAPS_ARCH_VER("s390-async-teardown-disabled", "s390x", "6.0.0");
+ /* following cases are instances from qemuxml2xmltest which were not tested + * in qemuxml2argvtest */
I'd remove this comment. While it is true, it may happen that a contributor will add new test case (e.g. while implementing new xml knob) and add a test case here...
+ DO_TEST_CAPS_LATEST("boot-menu-disable-with-timeout"); + DO_TEST_CAPS_LATEST("channel-unix-source-path"); + DO_TEST_CAPS_LATEST("chardev-label"); + DO_TEST_CAPS_LATEST("console-compat2"); + DO_TEST_CAPS_LATEST("cpu-empty"); + DO_TEST_CAPS_LATEST("cpu-host-model-features"); + DO_TEST_CAPS_LATEST("cpu-numa-disordered"); + DO_TEST_CAPS_LATEST("disk-active-commit"); + DO_TEST_CAPS_LATEST("disk-mirror-old"); + DO_TEST_CAPS_LATEST("disk-mirror"); + DO_TEST_CAPS_VER("disk-network-vxhs", "5.0.0"); + DO_TEST_CAPS_LATEST("downscript"); + DO_TEST_CAPS_LATEST("hostdev-mdev-display"); + DO_TEST_CAPS_LATEST("hostdev-scsi-autogen-address"); + DO_TEST_CAPS_LATEST("hostdev-scsi-large-unit"); + DO_TEST_CAPS_LATEST("hostdev-scsi-shareable"); + DO_TEST_CAPS_LATEST("lease"); + DO_TEST_CAPS_LATEST("memorybacking-set"); + DO_TEST_CAPS_LATEST("memorybacking-unset"); + DO_TEST_CAPS_LATEST("metadata-duplicate"); + DO_TEST_CAPS_LATEST("metadata"); + DO_TEST_CAPS_LATEST("net-midonet"); + DO_TEST_CAPS_LATEST("numad-auto-vcpu-no-numatune"); + DO_TEST_CAPS_LATEST("numad-static-vcpu-no-numatune"); + DO_TEST_CAPS_LATEST("numavcpus-topology-mismatch"); + DO_TEST_CAPS_ARCH_LATEST("panic-pseries", "ppc64"); + DO_TEST_CAPS_LATEST("pcihole64-gib"); + DO_TEST_CAPS_ARCH_LATEST("s390-defaultconsole", "s390x"); + DO_TEST_CAPS_ARCH_LATEST("s390-panic", "s390x"); + DO_TEST_CAPS_LATEST("seclabel-device-multiple"); + DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-none-relabel", "x86_64", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END); + DO_TEST_CAPS_LATEST("seclabel-dynamic-none"); + DO_TEST_CAPS_LATEST("serial-target-port-auto"); + DO_TEST_CAPS_LATEST("vhost-user-fs-sock"); + DO_TEST_CAPS_ARCH_LATEST("video-virtio-gpu-ccw-auto", "s390x"); + qemuTestDriverFree(&driver); virFileWrapperClearPrefixes();
Michal

The tested configuration is not valid for a qemu VM. Move it to the generic test. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../graphics-listen-network2.xml | 0 .../graphics-listen-network2.xml} | 19 +++---------------- tests/genericxml2xmltest.c | 1 + tests/qemuxml2xmltest.c | 1 - 4 files changed, 4 insertions(+), 17 deletions(-) rename tests/{qemuxml2argvdata => genericxml2xmlindata}/graphics-listen-network2.xml (100%) rename tests/{qemuxml2xmloutdata/graphics-listen-network2.x86_64-latest.xml => genericxml2xmloutdata/graphics-listen-network2.xml} (59%) diff --git a/tests/qemuxml2argvdata/graphics-listen-network2.xml b/tests/genericxml2xmlindata/graphics-listen-network2.xml similarity index 100% rename from tests/qemuxml2argvdata/graphics-listen-network2.xml rename to tests/genericxml2xmlindata/graphics-listen-network2.xml diff --git a/tests/qemuxml2xmloutdata/graphics-listen-network2.x86_64-latest.xml b/tests/genericxml2xmloutdata/graphics-listen-network2.xml similarity index 59% rename from tests/qemuxml2xmloutdata/graphics-listen-network2.x86_64-latest.xml rename to tests/genericxml2xmloutdata/graphics-listen-network2.xml index e13bd7fe74..e8befe696c 100644 --- a/tests/qemuxml2xmloutdata/graphics-listen-network2.x86_64-latest.xml +++ b/tests/genericxml2xmloutdata/graphics-listen-network2.xml @@ -8,9 +8,6 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu mode='custom' match='exact' check='none'> - <model fallback='forbid'>qemu64</model> - </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -18,31 +15,21 @@ <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> <source dev='/dev/HostVG/QEMUGuest1'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> - <controller type='usb' index='0' model='piix3-uhci'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='1.2.3.4'> <listen type='address' address='1.2.3.4'/> <listen type='network' network='Bobsnetwork'/> </graphics> - <audio id='1' type='none'/> <video> <model type='cirrus' vram='16384' heads='1' primary='yes'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </memballoon> + <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c index 6025054876..19d08686df 100644 --- a/tests/genericxml2xmltest.c +++ b/tests/genericxml2xmltest.c @@ -174,6 +174,7 @@ mymain(void) DO_TEST_FAIL_ACTIVE("graphics-vnc-socket-attr-listen-socket-mismatch"); DO_TEST("graphics-vnc-autoport-no"); DO_TEST_FAIL_INACTIVE("graphics-listen-network-invalid"); + DO_TEST_DIFFERENT("graphics-listen-network2"); DO_TEST_FAIL_ACTIVE("name-slash-fail"); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 8cc0874f65..e04001156c 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -574,7 +574,6 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-scsi-device-auto"); DO_TEST_CAPS_LATEST("console-virtio"); DO_TEST_CAPS_LATEST("serial-target-port-auto"); - DO_TEST_CAPS_LATEST("graphics-listen-network2"); DO_TEST_CAPS_LATEST("numad-auto-vcpu-no-numatune"); DO_TEST_CAPS_LATEST("numad-auto-memory-vcpu-no-cpuset-and-placement"); DO_TEST_CAPS_LATEST("numad-auto-memory-vcpu-cpuset"); -- 2.43.0

Test both linkstates in an explicit test case. Note that link state is setup via monitor, thus not visible on the commandline. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../net-linkstate.x86_64-latest.args | 36 +++++++++++++++ tests/qemuxml2argvdata/net-linkstate.xml | 34 ++++++++++++++ tests/qemuxml2argvtest.c | 1 + .../net-linkstate.x86_64-latest.xml | 44 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 5 files changed, 116 insertions(+) create mode 100644 tests/qemuxml2argvdata/net-linkstate.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-linkstate.xml create mode 100644 tests/qemuxml2xmloutdata/net-linkstate.x86_64-latest.xml diff --git a/tests/qemuxml2argvdata/net-linkstate.x86_64-latest.args b/tests/qemuxml2argvdata/net-linkstate.x86_64-latest.args new file mode 100644 index 0000000000..ba1608bf2e --- /dev/null +++ b/tests/qemuxml2argvdata/net-linkstate.x86_64-latest.args @@ -0,0 +1,36 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-netdev '{"type":"user","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \ +-netdev '{"type":"user","id":"hostnet1"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet1","id":"net1","mac":"00:11:22:33:44:66","bus":"pci.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/net-linkstate.xml b/tests/qemuxml2argvdata/net-linkstate.xml new file mode 100644 index 0000000000..41aaabe8ae --- /dev/null +++ b/tests/qemuxml2argvdata/net-linkstate.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <interface type='user'> + <mac address='00:11:22:33:44:55'/> + <model type='virtio'/> + <link state='up'/> + </interface> + <interface type='user'> + <mac address='00:11:22:33:44:66'/> + <model type='virtio'/> + <link state='down'/> + </interface> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 06fdd02b76..22fd35809b 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1384,6 +1384,7 @@ mymain(void) DO_TEST_CAPS_LATEST_PARSE_ERROR("net-virtio-rxqueuesize-invalid-size"); DO_TEST_CAPS_LATEST("net-virtio-teaming"); DO_TEST_CAPS_LATEST("net-virtio-teaming-hostdev"); + DO_TEST_CAPS_LATEST("net-linkstate"); DO_TEST_CAPS_LATEST("net-eth"); DO_TEST_CAPS_LATEST("net-eth-ifname"); DO_TEST_CAPS_LATEST("net-eth-names"); diff --git a/tests/qemuxml2xmloutdata/net-linkstate.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-linkstate.x86_64-latest.xml new file mode 100644 index 0000000000..6a50c13f6d --- /dev/null +++ b/tests/qemuxml2xmloutdata/net-linkstate.x86_64-latest.xml @@ -0,0 +1,44 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</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-x86_64</emulator> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='ide' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <controller type='pci' index='0' model='pci-root'/> + <interface type='user'> + <mac address='00:11:22:33:44:55'/> + <model type='virtio'/> + <link state='up'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </interface> + <interface type='user'> + <mac address='00:11:22:33:44:66'/> + <model type='virtio'/> + <link state='down'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </interface> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index e04001156c..466620bd56 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -383,6 +383,7 @@ mymain(void) DO_TEST_CAPS_LATEST("net-virtio"); DO_TEST_CAPS_LATEST("net-virtio-device"); DO_TEST_CAPS_LATEST("net-virtio-disable-offloads"); + DO_TEST_CAPS_LATEST("net-linkstate"); DO_TEST_CAPS_LATEST("net-eth"); DO_TEST_CAPS_LATEST("net-eth-ifname"); DO_TEST_CAPS_LATEST("net-eth-hostip"); -- 2.43.0

Modify the test case so that it can be used also for qemuxml2argvtest by removing invalid configuration (interface type='user' + queues), clean up unneeded disks and rename it accordingly. Also test the ioeventfd. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../net-virtio-vhost.x86_64-latest.args | 42 +++++++++++++++++++ ...{vhost_queues.xml => net-virtio-vhost.xml} | 25 +++++------ tests/qemuxml2argvtest.c | 1 + ...xml => net-virtio-vhost.x86_64-latest.xml} | 29 +++++++------ tests/qemuxml2xmltest.c | 2 +- 5 files changed, 69 insertions(+), 30 deletions(-) create mode 100644 tests/qemuxml2argvdata/net-virtio-vhost.x86_64-latest.args rename tests/qemuxml2argvdata/{vhost_queues.xml => net-virtio-vhost.xml} (67%) rename tests/qemuxml2xmloutdata/{vhost_queues.x86_64-latest.xml => net-virtio-vhost.x86_64-latest.xml} (78%) diff --git a/tests/qemuxml2argvdata/net-virtio-vhost.x86_64-latest.args b/tests/qemuxml2argvdata/net-virtio-vhost.x86_64-latest.args new file mode 100644 index 0000000000..eabe768169 --- /dev/null +++ b/tests/qemuxml2argvdata/net-virtio-vhost.x86_64-latest.args @@ -0,0 +1,42 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=1048576k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid bba65c0e-c049-934f-b6aa-4e2c0582acdf \ +-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 \ +-boot menu=on,strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x6"}' \ +-netdev '{"type":"tap","fds":"3:4:5:6:7","vhost":true,"vhostfds":"44:45:46:47:48","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","mq":true,"vectors":12,"netdev":"hostnet0","id":"net0","mac":"52:54:00:e5:48:58","bus":"pci.0","addr":"0x2"}' \ +-netdev '{"type":"tap","fd":"3","vhost":true,"vhostfd":"44","id":"hostnet1"}' \ +-device '{"driver":"virtio-net-pci","ioeventfd":true,"netdev":"hostnet1","id":"net1","mac":"52:54:00:e5:48:59","bus":"pci.0","addr":"0x3"}' \ +-netdev '{"type":"tap","fds":"3:4:5:6:7","vhost":true,"vhostfds":"44:45:46:47:48","id":"hostnet2"}' \ +-device '{"driver":"virtio-net-pci","ioeventfd":true,"mq":true,"vectors":12,"netdev":"hostnet2","id":"net2","mac":"52:54:00:e5:48:5a","bus":"pci.0","addr":"0x4"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x5"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/vhost_queues.xml b/tests/qemuxml2argvdata/net-virtio-vhost.xml similarity index 67% rename from tests/qemuxml2argvdata/vhost_queues.xml rename to tests/qemuxml2argvdata/net-virtio-vhost.xml index 2e38f2dad3..9d1feabe68 100644 --- a/tests/qemuxml2argvdata/vhost_queues.xml +++ b/tests/qemuxml2argvdata/net-virtio-vhost.xml @@ -16,30 +16,27 @@ <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' event_idx='on'/> - <source file='/var/lib/libvirt/images/f14.img'/> - <target dev='vda' bus='virtio'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> - </disk> - <disk type='file' device='cdrom'> - <driver name='qemu' type='raw'/> - <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/> - <target dev='hdc' bus='ide'/> - <readonly/> - <address type='drive' controller='0' bus='1' target='0' unit='0'/> - </disk> <controller type='usb' index='0'/> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <interface type='user'> + <interface type='ethernet'> <mac address='52:54:00:e5:48:58'/> <model type='virtio'/> <driver name='vhost' queues='5'/> </interface> + <interface type='ethernet'> + <mac address='52:54:00:e5:48:59'/> + <model type='virtio'/> + <driver name='vhost' ioeventfd='on'/> + </interface> + <interface type='ethernet'> + <mac address='52:54:00:e5:48:5A'/> + <model type='virtio'/> + <driver name='vhost' ioeventfd='on' queues='5'/> + </interface> <serial type='pty'> <target port='0'/> </serial> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 22fd35809b..13d279b301 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1379,6 +1379,7 @@ mymain(void) DO_TEST_CAPS_LATEST("net-virtio-device"); DO_TEST_CAPS_LATEST("net-virtio-disable-offloads"); DO_TEST_CAPS_LATEST("net-virtio-netdev"); + DO_TEST_CAPS_LATEST("net-virtio-vhost"); DO_TEST_CAPS_ARCH_LATEST("net-virtio-ccw", "s390x"); DO_TEST_CAPS_LATEST("net-virtio-rxtxqueuesize"); DO_TEST_CAPS_LATEST_PARSE_ERROR("net-virtio-rxqueuesize-invalid-size"); diff --git a/tests/qemuxml2xmloutdata/vhost_queues.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-virtio-vhost.x86_64-latest.xml similarity index 78% rename from tests/qemuxml2xmloutdata/vhost_queues.x86_64-latest.xml rename to tests/qemuxml2xmloutdata/net-virtio-vhost.x86_64-latest.xml index 8fbc4ccc99..66630c2697 100644 --- a/tests/qemuxml2xmloutdata/vhost_queues.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/net-virtio-vhost.x86_64-latest.xml @@ -19,19 +19,6 @@ <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' event_idx='on'/> - <source file='/var/lib/libvirt/images/f14.img'/> - <target dev='vda' bus='virtio'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> - </disk> - <disk type='file' device='cdrom'> - <driver name='qemu' type='raw'/> - <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/> - <target dev='hdc' bus='ide'/> - <readonly/> - <address type='drive' controller='0' bus='1' target='0' unit='0'/> - </disk> <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> @@ -42,12 +29,24 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='pci' index='0' model='pci-root'/> - <interface type='user'> + <interface type='ethernet'> <mac address='52:54:00:e5:48:58'/> <model type='virtio'/> <driver name='vhost' queues='5'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </interface> + <interface type='ethernet'> + <mac address='52:54:00:e5:48:59'/> + <model type='virtio'/> + <driver name='vhost' ioeventfd='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </interface> + <interface type='ethernet'> + <mac address='52:54:00:e5:48:5a'/> + <model type='virtio'/> + <driver name='vhost' ioeventfd='on' queues='5'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </interface> <serial type='pty'> <target type='isa-serial' port='0'> <model name='isa-serial'/> @@ -60,7 +59,7 @@ <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> </domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 466620bd56..df7c9da240 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -383,6 +383,7 @@ mymain(void) DO_TEST_CAPS_LATEST("net-virtio"); DO_TEST_CAPS_LATEST("net-virtio-device"); DO_TEST_CAPS_LATEST("net-virtio-disable-offloads"); + DO_TEST_CAPS_LATEST("net-virtio-vhost"); DO_TEST_CAPS_LATEST("net-linkstate"); DO_TEST_CAPS_LATEST("net-eth"); DO_TEST_CAPS_LATEST("net-eth-ifname"); @@ -476,7 +477,6 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("iothreads-virtio-scsi-ccw", "s390x"); DO_TEST_CAPS_LATEST("lease"); DO_TEST_CAPS_LATEST("event_idx"); - DO_TEST_CAPS_LATEST("vhost_queues"); DO_TEST_CAPS_LATEST("interface-driver"); DO_TEST_CAPS_LATEST("net-server"); DO_TEST_CAPS_LATEST("virtio-lun"); -- 2.43.0

Everything this XML tests is already explicitly covered in other tests. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2argvdata/interface-driver.xml | 54 --------------- .../interface-driver.x86_64-latest.xml | 67 ------------------- tests/qemuxml2xmltest.c | 1 - 3 files changed, 122 deletions(-) delete mode 100644 tests/qemuxml2argvdata/interface-driver.xml delete mode 100644 tests/qemuxml2xmloutdata/interface-driver.x86_64-latest.xml diff --git a/tests/qemuxml2argvdata/interface-driver.xml b/tests/qemuxml2argvdata/interface-driver.xml deleted file mode 100644 index 8c8f043a93..0000000000 --- a/tests/qemuxml2argvdata/interface-driver.xml +++ /dev/null @@ -1,54 +0,0 @@ -<domain type='qemu'> - <name>test</name> - <uuid>15d091de-0181-456b-9554-e4382dc1f1ab</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc'>hvm</type> - <boot dev='cdrom'/> - <boot dev='hd'/> - <bootmenu enable='yes'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' event_idx='on'/> - <source file='/var/lib/libvirt/images/f14.img'/> - <target dev='vda' bus='virtio'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> - </disk> - <disk type='file' device='cdrom'> - <driver name='qemu' type='raw'/> - <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/> - <target dev='hdc' bus='ide'/> - <readonly/> - <address type='drive' controller='0' bus='1' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'/> - <controller type='virtio-serial' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <controller type='ide' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <interface type='user'> - <mac address='52:54:00:e5:48:58'/> - <model type='virtio'/> - <driver ioeventfd='on' event_idx='on' queues='5'/> - <link state='up'/> - </interface> - <serial type='pty'> - <target port='0'/> - </serial> - <console type='pty'> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/interface-driver.x86_64-latest.xml b/tests/qemuxml2xmloutdata/interface-driver.x86_64-latest.xml deleted file mode 100644 index be40782604..0000000000 --- a/tests/qemuxml2xmloutdata/interface-driver.x86_64-latest.xml +++ /dev/null @@ -1,67 +0,0 @@ -<domain type='qemu'> - <name>test</name> - <uuid>15d091de-0181-456b-9554-e4382dc1f1ab</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc'>hvm</type> - <boot dev='cdrom'/> - <boot dev='hd'/> - <bootmenu enable='yes'/> - </os> - <cpu mode='custom' match='exact' check='none'> - <model fallback='forbid'>qemu64</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-x86_64</emulator> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' event_idx='on'/> - <source file='/var/lib/libvirt/images/f14.img'/> - <target dev='vda' bus='virtio'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> - </disk> - <disk type='file' device='cdrom'> - <driver name='qemu' type='raw'/> - <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/> - <target dev='hdc' bus='ide'/> - <readonly/> - <address type='drive' controller='0' bus='1' target='0' unit='0'/> - </disk> - <controller type='usb' index='0' model='piix3-uhci'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='virtio-serial' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <interface type='user'> - <mac address='52:54:00:e5:48:58'/> - <model type='virtio'/> - <driver ioeventfd='on' event_idx='on' queues='5'/> - <link state='up'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </interface> - <serial type='pty'> - <target type='isa-serial' port='0'> - <model name='isa-serial'/> - </target> - </serial> - <console type='pty'> - <target type='serial' port='0'/> - </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index df7c9da240..4e39763dc7 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -477,7 +477,6 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("iothreads-virtio-scsi-ccw", "s390x"); DO_TEST_CAPS_LATEST("lease"); DO_TEST_CAPS_LATEST("event_idx"); - DO_TEST_CAPS_LATEST("interface-driver"); DO_TEST_CAPS_LATEST("net-server"); DO_TEST_CAPS_LATEST("virtio-lun"); -- 2.43.0

Separate the SLIRP bits from 'qemuProcessNetworkPrepareDevices' and do the setup of the internal data when setting up domain data. This will allow tests to use the same code path to lookup data for a network. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_process.c | 45 ++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index fc05b4b24f..b1a225f5e5 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5705,12 +5705,8 @@ qemuProcessInit(virQEMUDriver *driver, } -/** - * qemuProcessNetworkPrepareDevices - */ static int -qemuProcessNetworkPrepareDevices(virQEMUDriver *driver, - virDomainObj *vm) +qemuProcessPrepareDomainNetwork(virDomainObj *vm) { virDomainDef *def = vm->def; qemuDomainObjPrivate *priv = vm->privateData; @@ -5762,15 +5758,32 @@ qemuProcessNetworkPrepareDevices(virQEMUDriver *driver, if (virDomainHostdevInsert(def, hostdev) < 0) return -1; - } else if (actualType == VIR_DOMAIN_NET_TYPE_USER && - net->backend.type == VIR_DOMAIN_NET_BACKEND_DEFAULT && - !priv->disableSlirp && - virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DBUS_VMSTATE)) { - if (qemuInterfacePrepareSlirp(driver, net) < 0) + } + } + return 0; +} + + +static int +qemuProcessPrepareHostNetwork(virDomainObj *vm) +{ + qemuDomainObjPrivate *priv = vm->privateData; + size_t i; + + for (i = 0; i < vm->def->nnets; i++) { + virDomainNetDef *net = vm->def->nets[i]; + virDomainNetType actualType = virDomainNetGetActualType(net); + + if (actualType == VIR_DOMAIN_NET_TYPE_USER && + net->backend.type == VIR_DOMAIN_NET_BACKEND_DEFAULT && + !priv->disableSlirp && + virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DBUS_VMSTATE)) { + if (qemuInterfacePrepareSlirp(priv->driver, net) < 0) return -1; - } + } } + return 0; } @@ -6627,6 +6640,10 @@ qemuProcessPrepareDomain(virQEMUDriver *driver, if (qemuProcessPrepareDomainHostdevs(vm, priv) < 0) return -1; + VIR_DEBUG("Setting up network devices"); + if (qemuProcessPrepareDomainNetwork(vm) < 0) + return -1; + VIR_DEBUG("Prepare chardev source backends"); if (qemuProcessPrepareChardevSource(vm->def, cfg) < 0) return -1; @@ -7192,12 +7209,8 @@ qemuProcessPrepareHost(virQEMUDriver *driver, if (qemuProcessOpenVhostVsock(vm->def->vsock) < 0) return -1; } - /* network devices must be "prepared" before hostdevs, because - * setting up a network device might create a new hostdev that - * will need to be setup. - */ VIR_DEBUG("Preparing network devices"); - if (qemuProcessNetworkPrepareDevices(driver, vm) < 0) + if (qemuProcessPrepareHostNetwork(vm) < 0) return -1; /* Must be run before security labelling */ -- 2.43.0

Unfortunately the network backend commandline formatter attempts to also setup the backend itself, which it really should not. For now make sure qemuxml2argvtest can call virNetDevSetMTU. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/util/virnetdev.h | 2 +- tests/qemuxml2argvmock.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h index 05daed09e9..c287a7b272 100644 --- a/src/util/virnetdev.h +++ b/src/util/virnetdev.h @@ -202,7 +202,7 @@ int virNetDevSetCoalesce(const char *ifname, int virNetDevSetMTU(const char *ifname, int mtu) - ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE; int virNetDevSetMTUFromDevice(const char *ifname, const char *otherifname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index f2696bd4c3..9cc97199c4 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -284,3 +284,11 @@ virIdentityEnsureSystemToken(void) { return g_strdup("3de80bcbf22d4833897f1638e01be9b2"); } + + +int +virNetDevSetMTU(const char *ifname G_GNUC_UNUSED, + int mtu G_GNUC_UNUSED) +{ + return 0; +} -- 2.43.0

In order to be able to use '<interface type="network"' we need a fake network driver in qemuxml2argvtest. Create one by simply allowing users to reuse configs from tests/networkxml2xmlin and tests/virnetworkportxml2xmldata which will be returned to corresponding functions. The driver implements: .networkLookupByName = fakeNetworkLookupByName, - validate syntax of network name, check if config exists .networkGetXMLDesc = fakeNetworkGetXMLDesc, - return appropriate XML .networkPortCreateXML = fakeNetworkPortCreateXML, - validate that port XML exists .networkPortGetXMLDesc = fakeNetworkPortGetXMLDesc, - return appropriate port XML With the above and the correspondign test data, all network XMLs can be enabled. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2argvtest.c | 98 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 13d279b301..7197fd35db 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -257,6 +257,103 @@ static virNWFilterDriver fakeNWFilterDriver = { }; +/* name of the fake network shall be constructed as: + * NETWORKXMLNAME;NETWORKPORTXMLNAME + * where: + * NETWORKXMLNAME resolves to abs_srcdir/networkxml2xmlin/NETWORKXMLNAME.xml + * NETWORKPORTXMLNAME resolves to abs_srcdir/virnetworkportxml2xmldata/NETWORKPORTXMLNAME.xml + */ +static virNetworkPtr +fakeNetworkLookupByName(virConnectPtr conn, + const char *name) +{ + unsigned char uuid[VIR_UUID_BUFLEN]; + g_autofree char *netname = g_strdup(name); + g_autofree char *path = NULL; + char *tmp; + + memset(uuid, 0, VIR_UUID_BUFLEN); + + if ((tmp = strchr(netname, ';'))) { + *tmp = '\0'; + } else { + virReportError(VIR_ERR_NO_NETWORK, "Malformed fake network name '%s'. See fakeNetworkLookupByName.", name); + return NULL; + } + + path = g_strdup_printf(abs_srcdir "/networkxml2xmlin/%s.xml", netname); + + if (!virFileExists(path)) { + virReportError(VIR_ERR_NO_NETWORK, "fake network '%s' not found", path); + return NULL; + } + + return virGetNetwork(conn, name, uuid); +} + + +static char * +fakeNetworkGetXMLDesc(virNetworkPtr network, + unsigned int noflags G_GNUC_UNUSED) +{ + g_autofree char *netname = g_strdup(network->name); + g_autofree char *path = NULL; + char *xml = NULL; + + *(strchr(netname, ';')) = '\0'; + + path = g_strdup_printf(abs_srcdir "/networkxml2xmlin/%s.xml", netname); + + if (virFileReadAll(path, 4 * 1024, &xml) < 0) + return NULL; + + return xml; +} + + +static virNetworkPortPtr +fakeNetworkPortCreateXML(virNetworkPtr net, + const char *xmldesc G_GNUC_UNUSED, + unsigned int noflags G_GNUC_UNUSED) +{ + unsigned char uuid[VIR_UUID_BUFLEN]; + g_autofree char *portname = g_strdup(strchr(net->name, ';') + 1); + g_autofree char *path = g_strdup_printf(abs_srcdir "/virnetworkportxml2xmldata/%s.xml", portname); + + memset(uuid, 0, VIR_UUID_BUFLEN); + + if (!virFileExists(path)) { + virReportError(VIR_ERR_NO_NETWORK_PORT, "fake network port '%s' not found", path); + return NULL; + } + + return virGetNetworkPort(net, uuid); +} + + +static char * +fakeNetworkPortGetXMLDesc(virNetworkPortPtr port, + unsigned int noflags G_GNUC_UNUSED) +{ + g_autofree char *portname = g_strdup(strchr(port->net->name, ';') + 1); + g_autofree char *path = g_strdup_printf(abs_srcdir "/virnetworkportxml2xmldata/%s.xml", portname); + char *xml = NULL; + + if (virFileReadAll(path, 4 * 1024, &xml) < 0) + return NULL; + + return xml; +} + + +static virNetworkDriver fakeNetworkDriver = { + .networkLookupByName = fakeNetworkLookupByName, + .networkGetXMLDesc = fakeNetworkGetXMLDesc, + .networkPortCreateXML = fakeNetworkPortCreateXML, + .networkPortGetXMLDesc = fakeNetworkPortGetXMLDesc, +}; + + static void testUpdateQEMUCapsHostCPUModel(virQEMUCaps *qemuCaps, virArch hostArch) { @@ -546,6 +643,7 @@ testCompareXMLToArgv(const void *data) conn->secretDriver = &fakeSecretDriver; conn->storageDriver = &fakeStorageDriver; conn->nwfilterDriver = &fakeNWFilterDriver; + conn->networkDriver = &fakeNetworkDriver; virSetConnectInterface(conn); virSetConnectNetwork(conn); -- 2.43.0

On 12/15/23 13:33, Peter Krempa wrote:
In order to be able to use '<interface type="network"' we need a fake network driver in qemuxml2argvtest. Create one by simply allowing users to reuse configs from tests/networkxml2xmlin and tests/virnetworkportxml2xmldata which will be returned to corresponding functions.
The driver implements:
.networkLookupByName = fakeNetworkLookupByName, - validate syntax of network name, check if config exists .networkGetXMLDesc = fakeNetworkGetXMLDesc, - return appropriate XML .networkPortCreateXML = fakeNetworkPortCreateXML, - validate that port XML exists .networkPortGetXMLDesc = fakeNetworkPortGetXMLDesc, - return appropriate port XML
With the above and the correspondign test data, all network XMLs can be enabled.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2argvtest.c | 98 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+)
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 13d279b301..7197fd35db 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -257,6 +257,103 @@ static virNWFilterDriver fakeNWFilterDriver = { };
+/* name of the fake network shall be constructed as: + * NETWORKXMLNAME;NETWORKPORTXMLNAME + * where: + * NETWORKXMLNAME resolves to abs_srcdir/networkxml2xmlin/NETWORKXMLNAME.xml + * NETWORKPORTXMLNAME resolves to abs_srcdir/virnetworkportxml2xmldata/NETWORKPORTXMLNAME.xml + */ +static virNetworkPtr +fakeNetworkLookupByName(virConnectPtr conn, + const char *name) +{ + unsigned char uuid[VIR_UUID_BUFLEN]; + g_autofree char *netname = g_strdup(name); + g_autofree char *path = NULL; + char *tmp; + + memset(uuid, 0, VIR_UUID_BUFLEN); + + if ((tmp = strchr(netname, ';'))) { + *tmp = '\0'; + } else { + virReportError(VIR_ERR_NO_NETWORK, "Malformed fake network name '%s'. See fakeNetworkLookupByName.", name);
Long line.
+ return NULL; + } + + path = g_strdup_printf(abs_srcdir "/networkxml2xmlin/%s.xml", netname); + + if (!virFileExists(path)) { + virReportError(VIR_ERR_NO_NETWORK, "fake network '%s' not found", path); + return NULL; + } + + return virGetNetwork(conn, name, uuid); +}
Michal

Use the data from 'nat-network' network definition to enable the test case also for xml2argvtest. Since the network listen bit doesn't need any plug definition just use an empty string. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...graphics-listen-network.x86_64-latest.args | 37 +++++++++++++++++++ .../graphics-listen-network.xml | 2 +- tests/qemuxml2argvtest.c | 2 + .../graphics-listen-network.x86_64-latest.xml | 2 +- 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 tests/qemuxml2argvdata/graphics-listen-network.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/graphics-listen-network.x86_64-latest.args b/tests/qemuxml2argvdata/graphics-listen-network.x86_64-latest.args new file mode 100644 index 0000000000..c49abca749 --- /dev/null +++ b/tests/qemuxml2argvdata/graphics-listen-network.x86_64-latest.args @@ -0,0 +1,37 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-vnc 192.168.122.1:3,audiodev=audio1 \ +-device '{"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/graphics-listen-network.xml b/tests/qemuxml2argvdata/graphics-listen-network.xml index f1ab81ca0b..cc7301149f 100644 --- a/tests/qemuxml2argvdata/graphics-listen-network.xml +++ b/tests/qemuxml2argvdata/graphics-listen-network.xml @@ -25,7 +25,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no'> - <listen type='network' network='Bobsnetwork'/> + <listen type='network' network='nat-network;'/> </graphics> <video> <model type='cirrus' vram='16384' heads='1'/> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7197fd35db..cb2d2b25e3 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2580,6 +2580,8 @@ mymain(void) DO_TEST_CAPS_LATEST("vhost-user-fs-sock"); DO_TEST_CAPS_ARCH_LATEST("video-virtio-gpu-ccw-auto", "s390x"); + DO_TEST_CAPS_LATEST("graphics-listen-network"); + qemuTestDriverFree(&driver); virFileWrapperClearPrefixes(); diff --git a/tests/qemuxml2xmloutdata/graphics-listen-network.x86_64-latest.xml b/tests/qemuxml2xmloutdata/graphics-listen-network.x86_64-latest.xml index ab4aa8cafa..af89470138 100644 --- a/tests/qemuxml2xmloutdata/graphics-listen-network.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/graphics-listen-network.x86_64-latest.xml @@ -33,7 +33,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no'> - <listen type='network' network='Bobsnetwork'/> + <listen type='network' network='nat-network;'/> </graphics> <audio id='1' type='none'/> <video> -- 2.43.0

Add versions stripping vlans and bandwidth setup so that they can be used in qemuxml2argvtest for interfaces which don't support the above. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/virnetworkportxml2xmldata/plug-bridge-basic.xml | 11 +++++++++++ .../virnetworkportxml2xmldata/plug-network-basic.xml | 10 ++++++++++ tests/virnetworkportxml2xmltest.c | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 tests/virnetworkportxml2xmldata/plug-bridge-basic.xml create mode 100644 tests/virnetworkportxml2xmldata/plug-network-basic.xml diff --git a/tests/virnetworkportxml2xmldata/plug-bridge-basic.xml b/tests/virnetworkportxml2xmldata/plug-bridge-basic.xml new file mode 100644 index 0000000000..5569297b79 --- /dev/null +++ b/tests/virnetworkportxml2xmldata/plug-bridge-basic.xml @@ -0,0 +1,11 @@ +<networkport> + <uuid>5d744f21-ba4a-4d6e-bdb2-30a35ff3207d</uuid> + <owner> + <name>memtest</name> + <uuid>d54df46f-1ab5-4a22-8618-4560ef5fac2c</uuid> + </owner> + <group>web1</group> + <mac address='52:54:00:7b:35:93'/> + <rxfilters trustGuest='yes'/> + <plug type='bridge' bridge='virbr0'/> +</networkport> diff --git a/tests/virnetworkportxml2xmldata/plug-network-basic.xml b/tests/virnetworkportxml2xmldata/plug-network-basic.xml new file mode 100644 index 0000000000..549b65a0d1 --- /dev/null +++ b/tests/virnetworkportxml2xmldata/plug-network-basic.xml @@ -0,0 +1,10 @@ +<networkport> + <uuid>5d744f21-ba4a-4d6e-bdb2-30a35ff3207d</uuid> + <owner> + <name>memtest</name> + <uuid>d54df46f-1ab5-4a22-8618-4560ef5fac2c</uuid> + </owner> + <group>web1</group> + <mac address='52:54:00:7b:35:93'/> + <plug type='network' bridge='virbr0'/> +</networkport> diff --git a/tests/virnetworkportxml2xmltest.c b/tests/virnetworkportxml2xmltest.c index 21e3c6f697..2949fa9638 100644 --- a/tests/virnetworkportxml2xmltest.c +++ b/tests/virnetworkportxml2xmltest.c @@ -81,11 +81,13 @@ mymain(void) DO_TEST("plug-none"); DO_TEST("plug-bridge"); + DO_TEST("plug-bridge-basic"); DO_TEST("plug-bridge-mactbl"); DO_TEST("plug-direct"); DO_TEST("plug-hostdev-pci"); DO_TEST("plug-hostdev-pci-unmanaged"); DO_TEST("plug-network"); + DO_TEST("plug-network-basic"); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } -- 2.43.0

Add the rest of test cases which were tested only by qemuxml2xmltest. All test cases added here have a '<interface type="network"' which needs to be translated using the new fake network driver. Note that this captures the status quo of the tests. No care was given whether the tests make sense. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../net-bandwidth.x86_64-latest.args | 47 ++++++++++++++++++ tests/qemuxml2argvdata/net-bandwidth.xml | 2 +- .../net-bandwidth2.x86_64-latest.args | 44 +++++++++++++++++ tests/qemuxml2argvdata/net-bandwidth2.xml | 2 +- .../net-coalesce.x86_64-latest.args | 48 +++++++++++++++++++ tests/qemuxml2argvdata/net-coalesce.xml | 6 +-- .../net-isolated-port.x86_64-latest.args | 43 +++++++++++++++++ tests/qemuxml2argvdata/net-isolated-port.xml | 2 +- .../net-mtu.x86_64-latest.args | 46 ++++++++++++++++++ tests/qemuxml2argvdata/net-mtu.xml | 4 +- .../net-openvswitch.x86_64-latest.args | 38 +++++++++++++++ tests/qemuxml2argvdata/net-openvswitch.xml | 2 +- ...irtio-network-portgroup.x86_64-latest.args | 42 ++++++++++++++++ .../net-virtio-network-portgroup.xml | 6 +-- ...-virtio-teaming-network.x86_64-latest.args | 39 +++++++++++++++ .../net-virtio-teaming-network.xml | 4 +- .../tap-vhost-incorrect.x86_64-latest.args | 40 ++++++++++++++++ .../qemuxml2argvdata/tap-vhost-incorrect.xml | 4 +- .../tap-vhost.x86_64-latest.args | 44 +++++++++++++++++ tests/qemuxml2argvdata/tap-vhost.xml | 2 +- tests/qemuxml2argvtest.c | 10 ++++ .../net-bandwidth.x86_64-latest.xml | 2 +- .../net-bandwidth2.x86_64-latest.xml | 2 +- .../net-coalesce.x86_64-latest.xml | 6 +-- .../net-isolated-port.x86_64-latest.xml | 2 +- .../net-openvswitch.x86_64-latest.xml | 2 +- ...virtio-network-portgroup.x86_64-latest.xml | 6 +-- ...t-virtio-teaming-network.x86_64-latest.xml | 4 +- .../tap-vhost-incorrect.x86_64-latest.xml | 4 +- .../tap-vhost.x86_64-latest.xml | 2 +- 30 files changed, 473 insertions(+), 32 deletions(-) create mode 100644 tests/qemuxml2argvdata/net-bandwidth.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-bandwidth2.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-coalesce.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-isolated-port.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-mtu.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-openvswitch.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-virtio-network-portgroup.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-virtio-teaming-network.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/tap-vhost-incorrect.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/tap-vhost.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/net-bandwidth.x86_64-latest.args b/tests/qemuxml2argvdata/net-bandwidth.x86_64-latest.args new file mode 100644 index 0000000000..5dc47d316f --- /dev/null +++ b/tests/qemuxml2argvdata/net-bandwidth.x86_64-latest.args @@ -0,0 +1,47 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-f14-60 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-f14-60/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-f14-60/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-f14-60/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=f14-60,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-f14-60/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=on \ +-accel kvm \ +-cpu qemu64 \ +-m size=1048576k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,cores=1,threads=1 \ +-uuid 38644c45-5227-a936-3b38-bc4f72c355bb \ +-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 \ +-boot menu=on,strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x6"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14-6.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x4","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":2}' \ +-blockdev '{"driver":"file","filename":"/home/zippy/tmp/Fedora-14-x86_64-Live-KDE.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-format","id":"ide0-1-0","bootindex":1}' \ +-netdev '{"type":"tap","fd":"102","id":"hostnet0"}' \ +-device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:24:a5:9f","bus":"pci.0","addr":"0x7"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-vnc 127.0.0.1:0,audiodev=audio1 \ +-device '{"driver":"VGA","id":"video0","vgamem_mb":16,"bus":"pci.0","addr":"0x2"}' \ +-device '{"driver":"AC97","id":"sound0","audiodev":"audio1","bus":"pci.0","addr":"0x3"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x5"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/net-bandwidth.xml b/tests/qemuxml2argvdata/net-bandwidth.xml index 3d43f1666b..f4a57d708d 100644 --- a/tests/qemuxml2argvdata/net-bandwidth.xml +++ b/tests/qemuxml2argvdata/net-bandwidth.xml @@ -44,7 +44,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='52:54:00:24:a5:9f'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <bandwidth> <inbound average='1000' peak='4000' burst='1024'/> <outbound average='128' peak='256' burst='32768'/> diff --git a/tests/qemuxml2argvdata/net-bandwidth2.x86_64-latest.args b/tests/qemuxml2argvdata/net-bandwidth2.x86_64-latest.args new file mode 100644 index 0000000000..f3a6b80ec3 --- /dev/null +++ b/tests/qemuxml2argvdata/net-bandwidth2.x86_64-latest.args @@ -0,0 +1,44 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-f14-60 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-f14-60/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-f14-60/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-f14-60/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=f14-60,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-f14-60/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=on \ +-accel kvm \ +-cpu qemu64 \ +-m size=1048576k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,cores=1,threads=1 \ +-uuid 38644c45-5227-a936-3b38-bc4f72c355bb \ +-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 \ +-boot menu=on,strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x6"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14-6.img","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x4","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":2}' \ +-netdev '{"type":"tap","fd":"102","id":"hostnet0"}' \ +-device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:24:a5:9f","bus":"pci.0","addr":"0x7"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-vnc 127.0.0.1:0,audiodev=audio1 \ +-device '{"driver":"VGA","id":"video0","vgamem_mb":16,"bus":"pci.0","addr":"0x2"}' \ +-device '{"driver":"AC97","id":"sound0","audiodev":"audio1","bus":"pci.0","addr":"0x3"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x5"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/net-bandwidth2.xml b/tests/qemuxml2argvdata/net-bandwidth2.xml index b75e17da16..c9fdefc300 100644 --- a/tests/qemuxml2argvdata/net-bandwidth2.xml +++ b/tests/qemuxml2argvdata/net-bandwidth2.xml @@ -34,7 +34,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='52:54:00:24:a5:9f'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <bandwidth> <inbound floor='200'/> </bandwidth> diff --git a/tests/qemuxml2argvdata/net-coalesce.x86_64-latest.args b/tests/qemuxml2argvdata/net-coalesce.x86_64-latest.args new file mode 100644 index 0000000000..6fe8226630 --- /dev/null +++ b/tests/qemuxml2argvdata/net-coalesce.x86_64-latest.args @@ -0,0 +1,48 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=1048576k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 15d091de-0181-456b-9554-e4382dc1f1ab \ +-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 \ +-boot menu=on,strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x6"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage"}' \ +-device '{"driver":"virtio-blk-pci","event_idx":true,"bus":"pci.0","addr":"0x4","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":2}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-format","id":"ide0-1-0","bootindex":1}' \ +-netdev '{"type":"tap","fd":"102","vhost":true,"vhostfd":"44","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:e5:48:58","bus":"pci.0","addr":"0x2"}' \ +-netdev '{"type":"tap","fd":"102","vhost":true,"vhostfd":"44","id":"hostnet1"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet1","id":"net1","mac":"52:54:00:e5:48:59","bus":"pci.0","addr":"0x3"}' \ +-netdev '{"type":"tap","fd":"102","vhost":true,"vhostfd":"44","id":"hostnet2"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet2","id":"net2","mac":"52:54:00:e5:48:60","bus":"pci.0","addr":"0x5"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x7"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/net-coalesce.xml b/tests/qemuxml2argvdata/net-coalesce.xml index 6fa3641e7d..ec3323e4e6 100644 --- a/tests/qemuxml2argvdata/net-coalesce.xml +++ b/tests/qemuxml2argvdata/net-coalesce.xml @@ -36,7 +36,7 @@ <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> <interface type='network'> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <mac address='52:54:00:e5:48:58'/> <model type='virtio'/> <coalesce> @@ -46,7 +46,7 @@ </coalesce> </interface> <interface type='network'> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <mac address='52:54:00:e5:48:59'/> <model type='virtio'/> <coalesce> @@ -56,7 +56,7 @@ </coalesce> </interface> <interface type='network'> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <mac address='52:54:00:e5:48:60'/> <model type='virtio'/> <coalesce> diff --git a/tests/qemuxml2argvdata/net-isolated-port.x86_64-latest.args b/tests/qemuxml2argvdata/net-isolated-port.x86_64-latest.args new file mode 100644 index 0000000000..43d17a4766 --- /dev/null +++ b/tests/qemuxml2argvdata/net-isolated-port.x86_64-latest.args @@ -0,0 +1,43 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-q35-test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-q35-test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-q35-test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-q35-test/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=q35-test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-q35-test/master-key.aes"}' \ +-machine q35,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=2097152k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":2147483648}' \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,cores=1,threads=1 \ +-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \ +-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 \ +-boot strict=on \ +-device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \ +-device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \ +-device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \ +-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.2","addr":"0x0"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","drive":"libvirt-1-format","id":"sata0-0-0","bootindex":1}' \ +-netdev '{"type":"tap","fd":"102","vhost":true,"vhostfd":"44","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:d6:c0:0b","bus":"pci.1","addr":"0x0"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":33554432,"vram64_size_mb":0,"vgamem_mb":8,"bus":"pcie.0","addr":"0x1"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/net-isolated-port.xml b/tests/qemuxml2argvdata/net-isolated-port.xml index 122378a8f0..a1e341b826 100644 --- a/tests/qemuxml2argvdata/net-isolated-port.xml +++ b/tests/qemuxml2argvdata/net-isolated-port.xml @@ -22,7 +22,7 @@ <controller type='pci' index='0' model='pcie-root'/> <interface type='network'> <mac address='52:54:00:d6:c0:0b'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <port isolated='yes'/> <model type='virtio'/> </interface> diff --git a/tests/qemuxml2argvdata/net-mtu.x86_64-latest.args b/tests/qemuxml2argvdata/net-mtu.x86_64-latest.args new file mode 100644 index 0000000000..2b97106080 --- /dev/null +++ b/tests/qemuxml2argvdata/net-mtu.x86_64-latest.args @@ -0,0 +1,46 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=1048576k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 15d091de-0181-456b-9554-e4382dc1f1ab \ +-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 \ +-boot menu=on,strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x6"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage"}' \ +-device '{"driver":"virtio-blk-pci","event_idx":true,"bus":"pci.0","addr":"0x4","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":2}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-format","id":"ide0-1-0","bootindex":1}' \ +-netdev '{"type":"tap","fd":"102","vhost":true,"vhostfd":"44","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","host_mtu":1500,"netdev":"hostnet0","id":"net0","mac":"52:54:00:e5:48:58","bus":"pci.0","addr":"0x2"}' \ +-netdev '{"type":"tap","fd":"102","vhost":true,"vhostfd":"44","sndbuf":1600,"id":"hostnet1"}' \ +-device '{"driver":"virtio-net-pci","host_mtu":9000,"netdev":"hostnet1","id":"net1","mac":"52:54:00:e5:48:59","bus":"pci.0","addr":"0x3"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x5"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/net-mtu.xml b/tests/qemuxml2argvdata/net-mtu.xml index 04fa1a2686..28dff26966 100644 --- a/tests/qemuxml2argvdata/net-mtu.xml +++ b/tests/qemuxml2argvdata/net-mtu.xml @@ -44,14 +44,14 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='52:54:00:e5:48:58'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='virtio'/> <mtu size='1500'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:e5:48:59'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='virtio'/> <tune> <sndbuf>1600</sndbuf> diff --git a/tests/qemuxml2argvdata/net-openvswitch.x86_64-latest.args b/tests/qemuxml2argvdata/net-openvswitch.x86_64-latest.args new file mode 100644 index 0000000000..48c2f7b2e8 --- /dev/null +++ b/tests/qemuxml2argvdata/net-openvswitch.x86_64-latest.args @@ -0,0 +1,38 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-netdev '{"type":"tap","fd":"102","id":"hostnet0"}' \ +-device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/net-openvswitch.xml b/tests/qemuxml2argvdata/net-openvswitch.xml index c8b64be4a0..31792a157b 100644 --- a/tests/qemuxml2argvdata/net-openvswitch.xml +++ b/tests/qemuxml2argvdata/net-openvswitch.xml @@ -24,7 +24,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='00:11:22:33:44:55'/> - <source network='ovs-net'/> + <source network='openvswitch-net;plug-bridge-basic'/> <vlan trunk='yes'> <tag id='42'/> <tag id='48'/> diff --git a/tests/qemuxml2argvdata/net-virtio-network-portgroup.x86_64-latest.args b/tests/qemuxml2argvdata/net-virtio-network-portgroup.x86_64-latest.args new file mode 100644 index 0000000000..294af60b77 --- /dev/null +++ b/tests/qemuxml2argvdata/net-virtio-network-portgroup.x86_64-latest.args @@ -0,0 +1,42 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-netdev '{"type":"tap","fd":"102","vhost":true,"vhostfd":"44","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \ +-netdev '{"type":"tap","fd":"102","id":"hostnet1"}' \ +-device '{"driver":"rtl8139","netdev":"hostnet1","id":"net1","mac":"10:11:22:33:44:55","bus":"pci.0","addr":"0x3"}' \ +-netdev '{"type":"tap","fd":"102","id":"hostnet2"}' \ +-device '{"driver":"rtl8139","netdev":"hostnet2","id":"net2","mac":"22:11:22:33:44:55","bus":"pci.0","addr":"0x4"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x5"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/net-virtio-network-portgroup.xml b/tests/qemuxml2argvdata/net-virtio-network-portgroup.xml index 81b4aa8555..0e79fe648f 100644 --- a/tests/qemuxml2argvdata/net-virtio-network-portgroup.xml +++ b/tests/qemuxml2argvdata/net-virtio-network-portgroup.xml @@ -24,7 +24,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network' trustGuestRxFilters='yes'> <mac address='00:11:22:33:44:55'/> - <source network='rednet' portgroup='bob' portid='873be5a0-6b8a-4a0b-a1df-ef3659cd64bc'/> + <source network='vepa-net;plug-bridge-basic' portgroup='bob' portid='873be5a0-6b8a-4a0b-a1df-ef3659cd64bc'/> <vlan> <tag id='4095'/> </vlan> @@ -35,7 +35,7 @@ </interface> <interface type='network' trustGuestRxFilters='no'> <mac address='10:11:22:33:44:55'/> - <source network='blue' portgroup='sam' portid='b884cc7e-b347-4a17-9e78-4f672a67794e'/> + <source network='vepa-net;plug-bridge-basic' portgroup='sam' portid='b884cc7e-b347-4a17-9e78-4f672a67794e'/> <virtualport> <parameters instanceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f' interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/> </virtualport> @@ -43,7 +43,7 @@ </interface> <interface type='network'> <mac address='22:11:22:33:44:55'/> - <source network='blue' portgroup='sam' portid='c5fc8eb4-cb69-4fea-8f8b-65e00e6d1dba'/> + <source network='vepa-net;plug-bridge-basic' portgroup='sam' portid='c5fc8eb4-cb69-4fea-8f8b-65e00e6d1dba'/> <virtualport type='802.1Qbh'> <parameters profileid='testhis99'/> </virtualport> diff --git a/tests/qemuxml2argvdata/net-virtio-teaming-network.x86_64-latest.args b/tests/qemuxml2argvdata/net-virtio-teaming-network.x86_64-latest.args new file mode 100644 index 0000000000..b18341d7e4 --- /dev/null +++ b/tests/qemuxml2argvdata/net-virtio-teaming-network.x86_64-latest.args @@ -0,0 +1,39 @@ +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-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-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 \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","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":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-netdev '{"type":"tap","fd":"102","vhost":true,"vhostfd":"44","id":"hostua-backup0"}' \ +-device '{"driver":"virtio-net-pci","failover":true,"netdev":"hostua-backup0","id":"ua-backup0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"vfio-pci","host":"0001:02:03.4","id":"hostdev0","failover_pair_id":"ua-backup0","bus":"pci.0","addr":"0x3"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x4"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/net-virtio-teaming-network.xml b/tests/qemuxml2argvdata/net-virtio-teaming-network.xml index 04638cfeda..89319855cf 100644 --- a/tests/qemuxml2argvdata/net-virtio-teaming-network.xml +++ b/tests/qemuxml2argvdata/net-virtio-teaming-network.xml @@ -21,14 +21,14 @@ <controller type='usb' index='0'/> <interface type='network'> <mac address='00:11:22:33:44:55'/> - <source network='mybridge'/> + <source network='nat-network;plug-bridge-basic'/> <model type='virtio'/> <teaming type='persistent'/> <alias name='ua-backup0'/> </interface> <interface type='network'> <mac address='00:11:22:33:44:55'/> - <source network='myhostdevpool'/> + <source network='hostdev;plug-hostdev-pci'/> <model type='virtio'/> <teaming type='transient' persistent='ua-backup0'/> </interface> diff --git a/tests/qemuxml2argvdata/tap-vhost-incorrect.x86_64-latest.args b/tests/qemuxml2argvdata/tap-vhost-incorrect.x86_64-latest.args new file mode 100644 index 0000000000..f43f75d709 --- /dev/null +++ b/tests/qemuxml2argvdata/tap-vhost-incorrect.x86_64-latest.args @@ -0,0 +1,40 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=1048576k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid bba65c0e-c049-934f-b6aa-4e2c0582acdf \ +-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 \ +-boot menu=on,strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x6"}' \ +-netdev '{"type":"tap","fd":"102","id":"hostnet0"}' \ +-device '{"driver":"e1000","netdev":"hostnet0","id":"net0","mac":"52:54:00:e5:48:58","bus":"pci.0","addr":"0x2"}' \ +-netdev '{"type":"tap","fd":"102","vhost":true,"vhostfd":"44","id":"hostnet1"}' \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet1","id":"net1","mac":"52:54:00:e5:48:59","bus":"pci.0","addr":"0x3"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x4"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/tap-vhost-incorrect.xml b/tests/qemuxml2argvdata/tap-vhost-incorrect.xml index 084ddae346..6af89f7f7a 100644 --- a/tests/qemuxml2argvdata/tap-vhost-incorrect.xml +++ b/tests/qemuxml2argvdata/tap-vhost-incorrect.xml @@ -24,14 +24,14 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='52:54:00:e5:48:58'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='e1000'/> <driver name='vhost' queues='5'/> <backend tap='/dev/null' vhost='/dev/zero'/> </interface> <interface type='network'> <mac address='52:54:00:e5:48:59'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='virtio'/> <driver name='vhost' queues='1'/> <backend tap='/dev/null' vhost='/dev/zero'/> diff --git a/tests/qemuxml2argvdata/tap-vhost.x86_64-latest.args b/tests/qemuxml2argvdata/tap-vhost.x86_64-latest.args new file mode 100644 index 0000000000..5fc5a5cda3 --- /dev/null +++ b/tests/qemuxml2argvdata/tap-vhost.x86_64-latest.args @@ -0,0 +1,44 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=1048576k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid bba65c0e-c049-934f-b6aa-4e2c0582acdf \ +-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 \ +-boot menu=on,strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x6"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage"}' \ +-device '{"driver":"virtio-blk-pci","event_idx":true,"bus":"pci.0","addr":"0x4","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":2}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-format","id":"ide0-1-0","bootindex":1}' \ +-netdev '{"type":"tap","fds":"102:103:104:105:106","vhost":true,"vhostfds":"44:45:46:47:48","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","mq":true,"vectors":12,"netdev":"hostnet0","id":"net0","mac":"52:54:00:e5:48:58","bus":"pci.0","addr":"0x2"}' \ +-chardev pty,id=charserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/tap-vhost.xml b/tests/qemuxml2argvdata/tap-vhost.xml index 0e2e7ddf21..02f8f2be70 100644 --- a/tests/qemuxml2argvdata/tap-vhost.xml +++ b/tests/qemuxml2argvdata/tap-vhost.xml @@ -37,7 +37,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='52:54:00:e5:48:58'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='virtio'/> <driver name='vhost' queues='5'/> <backend tap='/dev/null' vhost='/dev/zero'/> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index cb2d2b25e3..48ee433495 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2581,6 +2581,16 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("video-virtio-gpu-ccw-auto", "s390x"); DO_TEST_CAPS_LATEST("graphics-listen-network"); + DO_TEST_CAPS_LATEST("net-bandwidth"); + DO_TEST_CAPS_LATEST("net-bandwidth2"); + DO_TEST_CAPS_LATEST("net-coalesce"); + DO_TEST_CAPS_LATEST("net-isolated-port"); + DO_TEST_CAPS_LATEST("net-mtu"); + DO_TEST_CAPS_LATEST("net-openvswitch"); + DO_TEST_CAPS_LATEST("net-virtio-network-portgroup"); + DO_TEST_CAPS_LATEST("net-virtio-teaming-network"); + DO_TEST_CAPS_LATEST("tap-vhost-incorrect"); + DO_TEST_CAPS_LATEST("tap-vhost"); qemuTestDriverFree(&driver); virFileWrapperClearPrefixes(); diff --git a/tests/qemuxml2xmloutdata/net-bandwidth.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-bandwidth.x86_64-latest.xml index 7d634d8940..2ac89e20ad 100644 --- a/tests/qemuxml2xmloutdata/net-bandwidth.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/net-bandwidth.x86_64-latest.xml @@ -49,7 +49,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='52:54:00:24:a5:9f'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <bandwidth> <inbound average='1000' peak='4000' burst='1024'/> <outbound average='128' peak='256' burst='32768'/> diff --git a/tests/qemuxml2xmloutdata/net-bandwidth2.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-bandwidth2.x86_64-latest.xml index 9ec0172dfc..272ad8695c 100644 --- a/tests/qemuxml2xmloutdata/net-bandwidth2.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/net-bandwidth2.x86_64-latest.xml @@ -39,7 +39,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='52:54:00:24:a5:9f'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <bandwidth> <inbound floor='200'/> </bandwidth> diff --git a/tests/qemuxml2xmloutdata/net-coalesce.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-coalesce.x86_64-latest.xml index c99ba6c6e5..93f475407d 100644 --- a/tests/qemuxml2xmloutdata/net-coalesce.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/net-coalesce.x86_64-latest.xml @@ -44,7 +44,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='52:54:00:e5:48:58'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='virtio'/> <coalesce> <rx> @@ -55,13 +55,13 @@ </interface> <interface type='network'> <mac address='52:54:00:e5:48:59'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:e5:48:60'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </interface> diff --git a/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml index c3dca579a6..cb3f7dbab6 100644 --- a/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml @@ -47,7 +47,7 @@ </controller> <interface type='network'> <mac address='52:54:00:d6:c0:0b'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <port isolated='yes'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> diff --git a/tests/qemuxml2xmloutdata/net-openvswitch.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-openvswitch.x86_64-latest.xml index 1512b118a5..cc565e0a04 100644 --- a/tests/qemuxml2xmloutdata/net-openvswitch.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/net-openvswitch.x86_64-latest.xml @@ -32,7 +32,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='00:11:22:33:44:55'/> - <source network='ovs-net'/> + <source network='openvswitch-net;plug-bridge-basic'/> <vlan trunk='yes'> <tag id='42'/> <tag id='48'/> diff --git a/tests/qemuxml2xmloutdata/net-virtio-network-portgroup.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-virtio-network-portgroup.x86_64-latest.xml index 43c10ffc60..1f712b3ed3 100644 --- a/tests/qemuxml2xmloutdata/net-virtio-network-portgroup.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/net-virtio-network-portgroup.x86_64-latest.xml @@ -32,7 +32,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network' trustGuestRxFilters='yes'> <mac address='00:11:22:33:44:55'/> - <source network='rednet' portgroup='bob'/> + <source network='vepa-net;plug-bridge-basic' portgroup='bob'/> <vlan> <tag id='4095'/> </vlan> @@ -44,7 +44,7 @@ </interface> <interface type='network' trustGuestRxFilters='no'> <mac address='10:11:22:33:44:55'/> - <source network='blue' portgroup='sam'/> + <source network='vepa-net;plug-bridge-basic' portgroup='sam'/> <virtualport> <parameters instanceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f' interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/> </virtualport> @@ -53,7 +53,7 @@ </interface> <interface type='network'> <mac address='22:11:22:33:44:55'/> - <source network='blue' portgroup='sam'/> + <source network='vepa-net;plug-bridge-basic' portgroup='sam'/> <virtualport type='802.1Qbh'> <parameters profileid='testhis99'/> </virtualport> diff --git a/tests/qemuxml2xmloutdata/net-virtio-teaming-network.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-virtio-teaming-network.x86_64-latest.xml index dcb2339035..184f18e4dc 100644 --- a/tests/qemuxml2xmloutdata/net-virtio-teaming-network.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/net-virtio-teaming-network.x86_64-latest.xml @@ -32,7 +32,7 @@ </controller> <interface type='network'> <mac address='00:11:22:33:44:55'/> - <source network='mybridge'/> + <source network='nat-network;plug-bridge-basic'/> <model type='virtio'/> <teaming type='persistent'/> <alias name='ua-backup0'/> @@ -40,7 +40,7 @@ </interface> <interface type='network'> <mac address='00:11:22:33:44:55'/> - <source network='myhostdevpool'/> + <source network='hostdev;plug-hostdev-pci'/> <model type='virtio'/> <teaming type='transient' persistent='ua-backup0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> diff --git a/tests/qemuxml2xmloutdata/tap-vhost-incorrect.x86_64-latest.xml b/tests/qemuxml2xmloutdata/tap-vhost-incorrect.x86_64-latest.xml index 803136669b..bd47fd0a50 100644 --- a/tests/qemuxml2xmloutdata/tap-vhost-incorrect.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/tap-vhost-incorrect.x86_64-latest.xml @@ -31,14 +31,14 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='52:54:00:e5:48:58'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='e1000'/> <backend tap='/dev/null'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:e5:48:59'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='virtio'/> <driver name='vhost'/> <backend tap='/dev/null' vhost='/dev/zero'/> diff --git a/tests/qemuxml2xmloutdata/tap-vhost.x86_64-latest.xml b/tests/qemuxml2xmloutdata/tap-vhost.x86_64-latest.xml index e4f38179ce..f5ac160dd9 100644 --- a/tests/qemuxml2xmloutdata/tap-vhost.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/tap-vhost.x86_64-latest.xml @@ -44,7 +44,7 @@ <controller type='pci' index='0' model='pci-root'/> <interface type='network'> <mac address='52:54:00:e5:48:58'/> - <source network='default'/> + <source network='nat-network;plug-network-basic'/> <model type='virtio'/> <driver name='vhost' queues='5'/> <backend tap='/dev/null' vhost='/dev/zero'/> -- 2.43.0

To prevent regressions when refactoring tests and accidentally forgotten input files make sure that qemuxml2argvtest is invoked for all input files in tests/qemuxml2argvdata Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemustatusxml2xmltest.c | 2 +- tests/qemuxml2argvtest.c | 63 ++++++++++++++++++++++++++++++++++- tests/testutils.c | 14 ++++++++ tests/testutils.h | 2 ++ tests/testutilsqemu.h | 1 + 5 files changed, 80 insertions(+), 2 deletions(-) diff --git a/tests/qemustatusxml2xmltest.c b/tests/qemustatusxml2xmltest.c index 4796b62853..f60378c691 100644 --- a/tests/qemustatusxml2xmltest.c +++ b/tests/qemustatusxml2xmltest.c @@ -73,7 +73,7 @@ mymain(void) { int ret = 0; g_autoptr(virConnect) conn = NULL; - struct testQemuConf testConf = { NULL, NULL, NULL, NULL }; + struct testQemuConf testConf = { NULL, NULL, NULL, NULL, NULL }; if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 48ee433495..0ae6700d95 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -621,6 +621,9 @@ testCompareXMLToArgv(const void *data) virArch arch = VIR_ARCH_NONE; g_autoptr(virIdentity) sysident = virIdentityGetSystem(); + /* mark test case as used */ + ignore_value(g_hash_table_remove(info->conf->existingTestCases, info->infile)); + if (testQemuInfoInitArgs((struct testQemuInfo *) info) < 0) goto cleanup; @@ -809,22 +812,76 @@ testInfoSetPaths(struct testQemuInfo *info, abs_srcdir, info->name, suffix ? suffix : ""); } + +static int +testConfXMLCheck(GHashTable *existingTestCases) +{ + g_autofree virHashKeyValuePair *items = virHashGetItems(existingTestCases, NULL, true); + size_t i; + int ret = 0; + + for (i = 0; items[i].key; i++) { + if (ret == 0) + fprintf(stderr, "\n"); + + fprintf(stderr, "unused input file: %s\n", (const char *) items[i].key); + ret = -1; + } + + return ret; +} + + +static int +testConfXMLEnumerate(GHashTable *existingTestCases) +{ + struct dirent *ent; + g_autoptr(DIR) dir = NULL; + int rc; + + /* If VIR_TEST_RANGE is in use don't bother filling in the data, which + * also makes testConfXMLCheck succeed. */ + if (virTestHasRangeBitmap()) + return 0; + + if (virDirOpen(&dir, abs_srcdir "/qemuxml2argvdata") < 0) + return -1; + + while ((rc = virDirRead(dir, &ent, abs_srcdir "/qemuxml2argvdata")) > 0) { + if (virStringHasSuffix(ent->d_name, ".xml")) { + g_hash_table_insert(existingTestCases, + g_strdup_printf(abs_srcdir "/qemuxml2argvdata/%s", ent->d_name), + NULL); + } + } + + return rc; +} + + static int mymain(void) { int ret = 0; g_autoptr(GHashTable) duplicateTests = virHashNew(NULL); + g_autoptr(GHashTable) existingTestCases = virHashNew(NULL); g_autoptr(GHashTable) capslatest = testQemuGetLatestCaps(); g_autoptr(GHashTable) qapiSchemaCache = virHashNew((GDestroyNotify) g_hash_table_unref); g_autoptr(GHashTable) capscache = virHashNew(virObjectUnref); struct testQemuConf testConf = { .capslatest = capslatest, .capscache = capscache, .qapiSchemaCache = qapiSchemaCache, - .duplicateTests = duplicateTests }; + .duplicateTests = duplicateTests, + .existingTestCases = existingTestCases }; if (!capslatest) return EXIT_FAILURE; + /* enumerate and store all available test cases to verify at the end that + * all of them were invoked */ + if (testConfXMLEnumerate(existingTestCases) < 0) + return EXIT_FAILURE; + /* Set the timezone because we are mocking the time() function. * If we don't do that, then localtime() may return unpredictable * results. In order to detect things that just work by a blind @@ -2592,6 +2649,10 @@ mymain(void) DO_TEST_CAPS_LATEST("tap-vhost-incorrect"); DO_TEST_CAPS_LATEST("tap-vhost"); + /* check that all input files were actually used here */ + if (testConfXMLCheck(existingTestCases) < 0) + ret = -1; + qemuTestDriverFree(&driver); virFileWrapperClearPrefixes(); diff --git a/tests/testutils.c b/tests/testutils.c index e546422941..b20e447b99 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -746,6 +746,20 @@ virTestGetRegenerate(void) return testRegenerate; } + +/** + * virTestHasRangeBitmap: + * + * Returns whether the test was invoked with VIR_TEST_RANGE declared thus + * limiting the run only on specific test cases. + */ +bool +virTestHasRangeBitmap(void) +{ + return !!testBitmap; +} + + static int virTestSetEnvPath(void) { diff --git a/tests/testutils.h b/tests/testutils.h index cf8a346dff..bb84327b1e 100644 --- a/tests/testutils.h +++ b/tests/testutils.h @@ -82,6 +82,8 @@ unsigned int virTestGetExpensive(void); unsigned int virTestGetRegenerate(void); void virTestPropagateLibvirtError(void); +bool virTestHasRangeBitmap(void); + #define VIR_TEST_DEBUG(fmt, ...) \ do { \ if (virTestGetDebug()) \ diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index 71e220de3a..0d570ec31e 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -70,6 +70,7 @@ struct testQemuConf { GHashTable *capslatest; GHashTable *qapiSchemaCache; GHashTable *duplicateTests; /* for checking duplicated invocations */ + GHashTable *existingTestCases; /* for checking missing invocations */ }; typedef enum { -- 2.43.0

On Fri, Dec 15, 2023 at 13:33:10 +0100, Peter Krempa wrote:
This patch saga aims to improve and simplify testing of qemu XML configs.
Part 1 deals with input test files which are not used in qemuxml2argvtest, introduces a mock network driver and adds a checker that all input files are in fact used.
Peter Krempa (19): qemuxml2argvtest: Reinstate 'console-compat-chardev' and 'pci-serial-dev-chardev' qemuxml2argvtest: Fix and use 'disk-network-ssh-key' case qemuxml2argvtest: Reinstate 'pseries-vio-address-clash' case qemuxml2argvdata: Move 'smbios-multiple-type2' case to genericxml2xmltest qemuxml2argvtest: Remove duplicated invocations of tests qemuxml2argvtest: Check for duplicate invocation of tests qemuxml2argvmock: Mock qemuInterfaceBridgeConnect qemuxml2argvtest: Add test cases covered only by qemuxml2xmltest - part 1 qemuxml2xmltest: Move 'graphics-listen-network2' case go genericxml2xmltest qemuxml2*test: Add specific test case for interface link state qemuxml*test: Improve 'vhost_queues' test case qemuxml2xmltest: Delete 'interface-driver' case qemu: process: Separate setup of network device objects qemuxml2argvmock: Mock virNetDevSetMTU qemuxml2xmltest: Introduce fake network driver qemuxml2argvtest: Enable 'graphics-listen-network' case virnetworkportxml2xmltest: Add simple versions of bridge/network tests qemuxml2argvtest: Add test cases covered only by qemuxml2xmltest - part 2 qemuxml2argvtest: Add checker that all input files are used
Ping? I have part 2 ready already ;)

On 1/3/24 10:20, Peter Krempa wrote:
On Fri, Dec 15, 2023 at 13:33:10 +0100, Peter Krempa wrote:
This patch saga aims to improve and simplify testing of qemu XML configs.
Part 1 deals with input test files which are not used in qemuxml2argvtest, introduces a mock network driver and adds a checker that all input files are in fact used.
Peter Krempa (19): qemuxml2argvtest: Reinstate 'console-compat-chardev' and 'pci-serial-dev-chardev' qemuxml2argvtest: Fix and use 'disk-network-ssh-key' case qemuxml2argvtest: Reinstate 'pseries-vio-address-clash' case qemuxml2argvdata: Move 'smbios-multiple-type2' case to genericxml2xmltest qemuxml2argvtest: Remove duplicated invocations of tests qemuxml2argvtest: Check for duplicate invocation of tests qemuxml2argvmock: Mock qemuInterfaceBridgeConnect qemuxml2argvtest: Add test cases covered only by qemuxml2xmltest - part 1 qemuxml2xmltest: Move 'graphics-listen-network2' case go genericxml2xmltest qemuxml2*test: Add specific test case for interface link state qemuxml*test: Improve 'vhost_queues' test case qemuxml2xmltest: Delete 'interface-driver' case qemu: process: Separate setup of network device objects qemuxml2argvmock: Mock virNetDevSetMTU qemuxml2xmltest: Introduce fake network driver qemuxml2argvtest: Enable 'graphics-listen-network' case virnetworkportxml2xmltest: Add simple versions of bridge/network tests qemuxml2argvtest: Add test cases covered only by qemuxml2xmltest - part 2 qemuxml2argvtest: Add checker that all input files are used
Ping? I have part 2 ready already ;) _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org
Looks good. But I'm still getting some unused files: unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-cdrom-network-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-http-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-source-curl-nbdkit-backing.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-source-curl-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-ssh-key.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-ssh-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-ssh-password.xml Michal

On Wed, Jan 03, 2024 at 10:52:11 +0100, Michal Prívozník wrote:
On 1/3/24 10:20, Peter Krempa wrote:
On Fri, Dec 15, 2023 at 13:33:10 +0100, Peter Krempa wrote:
This patch saga aims to improve and simplify testing of qemu XML configs.
Part 1 deals with input test files which are not used in qemuxml2argvtest, introduces a mock network driver and adds a checker that all input files are in fact used.
Peter Krempa (19): qemuxml2argvtest: Reinstate 'console-compat-chardev' and 'pci-serial-dev-chardev' qemuxml2argvtest: Fix and use 'disk-network-ssh-key' case qemuxml2argvtest: Reinstate 'pseries-vio-address-clash' case qemuxml2argvdata: Move 'smbios-multiple-type2' case to genericxml2xmltest qemuxml2argvtest: Remove duplicated invocations of tests qemuxml2argvtest: Check for duplicate invocation of tests qemuxml2argvmock: Mock qemuInterfaceBridgeConnect qemuxml2argvtest: Add test cases covered only by qemuxml2xmltest - part 1 qemuxml2xmltest: Move 'graphics-listen-network2' case go genericxml2xmltest qemuxml2*test: Add specific test case for interface link state qemuxml*test: Improve 'vhost_queues' test case qemuxml2xmltest: Delete 'interface-driver' case qemu: process: Separate setup of network device objects qemuxml2argvmock: Mock virNetDevSetMTU qemuxml2xmltest: Introduce fake network driver qemuxml2argvtest: Enable 'graphics-listen-network' case virnetworkportxml2xmltest: Add simple versions of bridge/network tests qemuxml2argvtest: Add test cases covered only by qemuxml2xmltest - part 2 qemuxml2argvtest: Add checker that all input files are used
Ping? I have part 2 ready already ;) _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org
Looks good. But I'm still getting some unused files:
unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-cdrom-network-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-http-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-source-curl-nbdkit-backing.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-source-curl-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-ssh-key.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-ssh-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-ssh-password.xml
Interesting, all of them pass on my box so we have a environment-dependant test instability here. I'm guessing it's due to the compile time check of nbdkit-backend support. I'll skip the last patch for now and address that one separately.

On Wed, Jan 03, 2024 at 12:31:53 +0100, Peter Krempa wrote:
On Wed, Jan 03, 2024 at 10:52:11 +0100, Michal Prívozník wrote:
On 1/3/24 10:20, Peter Krempa wrote:
On Fri, Dec 15, 2023 at 13:33:10 +0100, Peter Krempa wrote:
This patch saga aims to improve and simplify testing of qemu XML configs.
[...]
Ping? I have part 2 ready already ;) _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org
Looks good. But I'm still getting some unused files:
unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-cdrom-network-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-http-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-source-curl-nbdkit-backing.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-source-curl-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-ssh-key.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-ssh-nbdkit.xml unused input file: .../libvirt.git/tests/qemuxml2argvdata/disk-network-ssh-password.xml
Interesting, all of them pass on my box so we have a environment-dependant test instability here. I'm guessing it's due to the compile time check of nbdkit-backend support. I'll skip the last patch for now and address that one separately.
Yup: # if WITH_NBDKIT # define DO_TEST_CAPS_LATEST_NBDKIT(name, ...) \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", ARG_NBDKIT_CAPS, __VA_ARGS__, QEMU_NBDKIT_CAPS_LAST, ARG_END) # else # define DO_TEST_CAPS_LATEST_NBDKIT(name, ...) # endif /* WITH_NBDKIT */

Rather than completely compiling out the tests mark them as skipped. This will allow us to add a checker that all input files are accounted for. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- Sending addendum to the series to avoid resending the whole series. tests/qemuxml2argvtest.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 48ee433495..7d40b06171 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -627,6 +627,15 @@ testCompareXMLToArgv(const void *data) if (testInfoCheckDuplicate(info) < 0) goto cleanup; +# if !WITH_NBDKIT + /* when compiled without nbdkit support we want to skip the test after + * marking it as used */ + if (info->args.fakeNbdkitCaps) { + ret = EXIT_AM_SKIP; + goto cleanup; + } +# endif /* !WITH_NBDKIT */ + if (info->arch != VIR_ARCH_NONE && info->arch != VIR_ARCH_X86_64) qemuTestSetHostArch(&driver, info->arch); @@ -906,12 +915,8 @@ mymain(void) # define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \ DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ARG_END) -# if WITH_NBDKIT -# define DO_TEST_CAPS_LATEST_NBDKIT(name, ...) \ +# define DO_TEST_CAPS_LATEST_NBDKIT(name, ...) \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", ARG_NBDKIT_CAPS, __VA_ARGS__, QEMU_NBDKIT_CAPS_LAST, ARG_END) -# else -# define DO_TEST_CAPS_LATEST_NBDKIT(name, ...) -# endif /* WITH_NBDKIT */ # define DO_TEST_CAPS_LATEST(name) \ DO_TEST_CAPS_ARCH_LATEST(name, "x86_64") -- 2.43.0

On 1/4/24 13:47, Peter Krempa wrote:
Rather than completely compiling out the tests mark them as skipped. This will allow us to add a checker that all input files are accounted for.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- Sending addendum to the series to avoid resending the whole series.
tests/qemuxml2argvtest.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
Whole series: Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal
participants (2)
-
Michal Prívozník
-
Peter Krempa