On 1/10/19 7:15 AM, Nikolay Shirokovskiy wrote:
This needs next:
- turning QEMU_CAPS_BLOCKDEV on
- adding caps data for not yet released qemu 3.1
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
.../qemuxml2argvdata/disk-metadata_cache_size.args | 39 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 2 ++
2 files changed, 41 insertions(+)
create mode 100644 tests/qemuxml2argvdata/disk-metadata_cache_size.args
File name output changes since you wrote this mean the output would be
named:
disk-metadata_cache_size.x86_64-latest.args
oh and more/different output would be on the command line...
Waiting for Peter's -blockdev changes would be best still I think.
John
diff --git a/tests/qemuxml2argvdata/disk-metadata_cache_size.args
b/tests/qemuxml2argvdata/disk-metadata_cache_size.args
new file mode 100644
index 0000000..ec90d2f
--- /dev/null
+++ b/tests/qemuxml2argvdata/disk-metadata_cache_size.args
@@ -0,0 +1,39 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-x86_64 \
+-name test \
+-S \
+-machine pc-0.13,accel=tcg,usb=off,dump-guest-core=off \
+-m 1024 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 468404ad-d49c-40f2-9e14-02294f9c1be3 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-test/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot menu=on \
+-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \
+-usb \
+-blockdev
'{"driver":"file","filename":"/var/lib/libvirt/images/f14.img",\
+"node-name":"libvirt-2-storage","read-only":false,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2",\
+"l2-cache-size":9223372036854775807,"file":"libvirt-2-storage"}'
\
+-device virtio-blk-pci,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","read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-1-format","read-only":true,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-drive,bus=ide.1,unit=0,drive=libvirt-1-format,id=ide0-1-0,\
+bootindex=1 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 2cb8860..72cd647 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -3076,6 +3076,8 @@ mymain(void)
DO_TEST_CAPS_ARCH_LATEST("x86_64-pc-headless", "x86_64");
DO_TEST_CAPS_ARCH_LATEST("x86_64-q35-headless", "x86_64");
+ DO_TEST_CAPS_LATEST("disk-metadata_cache_size");
+
if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
virFileDeleteTree(fakerootdir);