From: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx> Add shareable transient disk test to qemuxml2argvdata. Signed-off-by: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx> --- ...isk-transient-shareable.x86_64-latest.args | 41 +++++++++++++++++++ .../disk-transient-shareable.xml | 26 ++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 68 insertions(+) create mode 100644 tests/qemuxml2argvdata/disk-transient-shareable.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-transient-shareable.xml diff --git a/tests/qemuxml2argvdata/disk-transient-shareable.x86_64-latest.args b/tests/qemuxml2argvdata/disk-transient-shareable.x86_64-latest.args new file mode 100644 index 0000000000..21669559cf --- /dev/null +++ b/tests/qemuxml2argvdata/disk-transient-shareable.x86_64-latest.args @@ -0,0 +1,41 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-i386 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw",\ +"file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-cpu qemu64 \ +-m 214 \ +-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 \ +-no-acpi \ +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-blockdev '{"driver":"file","filename":"/tmp/QEMUGuest1.img",\ +"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\ +"auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":true,\ +"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\ +"file":"libvirt-1-storage"}' \ +-audiodev id=audio1,driver=none \ +-device 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-transient-shareable.xml b/tests/qemuxml2argvdata/disk-transient-shareable.xml new file mode 100644 index 0000000000..075811809b --- /dev/null +++ b/tests/qemuxml2argvdata/disk-transient-shareable.xml @@ -0,0 +1,26 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' 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-i386</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2' cache='none'/> + <source file='/tmp/QEMUGuest1.img'/> + <target dev='vda' bus='virtio'/> + <shareable/> + <transient/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </disk> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 12c2b68fd7..b74e9ee824 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1347,6 +1347,7 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-metadata-cache"); DO_TEST_CAPS_ARCH_VER_PARSE_ERROR("disk-transient", "x86_64", "4.1.0"); DO_TEST_CAPS_LATEST("disk-transient"); + DO_TEST_CAPS_LATEST("disk-transient-shareable"); DO_TEST("disk-network-nbd", NONE); DO_TEST_CAPS_VER("disk-network-nbd", "2.12.0"); DO_TEST_CAPS_LATEST("disk-network-nbd"); -- 2.27.0