From 3c02b1e810162ea25c16c75fa2203196e6b36be5 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 2 Mar 2023 13:15:50 +0100 Subject: [PATCH] tests: qemu: Move testing of default cache and disk source with space to 'sata-device' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Integrate the two special cases used for schema testing into the more useful qemuxml2argvtest, whose input data is still tested against the schema. Add also a xml output variant. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- tests/domainschemadata/default-cache-mode.xml | 26 ------------ .../domain-disk-source-space.xml | 36 ----------------- .../disk-sata-device.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/disk-sata-device.xml | 3 +- .../disk-sata-device.x86_64-latest.xml | 40 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 6 files changed, 44 insertions(+), 64 deletions(-) delete mode 100644 tests/domainschemadata/default-cache-mode.xml delete mode 100644 tests/domainschemadata/domain-disk-source-space.xml create mode 100644 tests/qemuxml2xmloutdata/disk-sata-device.x86_64-latest.xml diff --git a/tests/domainschemadata/default-cache-mode.xml b/tests/domainschemadata/default-cache-mode.xml deleted file mode 100644 index a11232316d..0000000000 --- a/tests/domainschemadata/default-cache-mode.xml +++ /dev/null @@ -1,26 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219200 - 219200 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i386 - - - - -
- - - - - diff --git a/tests/domainschemadata/domain-disk-source-space.xml b/tests/domainschemadata/domain-disk-source-space.xml deleted file mode 100644 index 553b6c7f01..0000000000 --- a/tests/domainschemadata/domain-disk-source-space.xml +++ /dev/null @@ -1,36 +0,0 @@ - - dummy - aa86471a-e67b-41b1-8d7d-2dc37c2ac5ec - 2097152 - 2097152 - 4 - - hvm - - - - - - destroy - restart - restart - - - - - - /usr/bin/qemu-system-x86_64 - - - - - - -
- - - -
- - - diff --git a/tests/qemuxml2argvdata/disk-sata-device.x86_64-latest.args b/tests/qemuxml2argvdata/disk-sata-device.x86_64-latest.args index b0180a48de..e8d7029555 100644 --- a/tests/qemuxml2argvdata/disk-sata-device.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-sata-device.x86_64-latest.args @@ -28,7 +28,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -device '{"driver":"ahci","id":"sata0","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 '{"driver":"host_device","filename":"/dev/HostVG/QEMUG uest1","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":"sata0.0","drive":"libvirt-1-format","id":"sata0-0-0","bootindex":1}' \ -audiodev '{"id":"audio1","driver":"none"}' \ diff --git a/tests/qemuxml2argvdata/disk-sata-device.xml b/tests/qemuxml2argvdata/disk-sata-device.xml index 5dbf08ef1d..a9def2923e 100644 --- a/tests/qemuxml2argvdata/disk-sata-device.xml +++ b/tests/qemuxml2argvdata/disk-sata-device.xml @@ -15,7 +15,8 @@ /usr/bin/qemu-system-x86_64 - + +
diff --git a/tests/qemuxml2xmloutdata/disk-sata-device.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-sata-device.x86_64-latest.xml new file mode 100644 index 0000000000..cd20f5185b --- /dev/null +++ b/tests/qemuxml2xmloutdata/disk-sata-device.x86_64-latest.xml @@ -0,0 +1,40 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + +
+ + +
+ + + + +