From fac773fab93dc526513d7ced40e1d685e193705c Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 21 May 2021 14:53:43 +0200 Subject: [PATCH] schema: Allow '0' offset for a of Using slice to cut off the end of the image is a perfectly vaid configuration. Use 'unsignedInt' instead of 'positiveInteger' for the 'offset' attribute in the XML schema and modify one test case to cover this use case. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1960993 Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- docs/schemas/domaincommon.rng | 2 +- tests/qemuxml2argvdata/disk-slices.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/disk-slices.xml | 2 +- tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 16e1c549c2..66a581c514 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1638,7 +1638,7 @@ - + diff --git a/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args b/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args index d337ea91a7..f41bbeea09 100644 --- a/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args @@ -28,7 +28,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/raw.img","node-name":"libvirt-6-storage","auto-read-only":true,"discard":"unmap"}' \ --blockdev '{"node-name":"libvirt-6-format","read-only":false,"driver":"raw","offset":1234,"size":321,"file":"libvirt-6-storage"}' \ +-blockdev '{"node-name":"libvirt-6-format","read-only":false,"driver":"raw","offset":0,"size":321,"file":"libvirt-6-storage"}' \ -device virtio-blk-pci,bus=pci.0,addr=0x2,drive=libvirt-6-format,id=virtio-disk0,bootindex=1 \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/raw.img","node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"raw","node-name":"libvirt-5-slice-sto","offset":9876,"size":123456789,"file":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \ diff --git a/tests/qemuxml2argvdata/disk-slices.xml b/tests/qemuxml2argvdata/disk-slices.xml index 1675766a46..016aa1b905 100644 --- a/tests/qemuxml2argvdata/disk-slices.xml +++ b/tests/qemuxml2argvdata/disk-slices.xml @@ -18,7 +18,7 @@ - + diff --git a/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml index 5c200ad31c..be5cd25084 100644 --- a/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml @@ -21,7 +21,7 @@ - + -- 2.47.2