On 09/10/2015 07:39 AM, Alberto Garcia wrote: > Signed-off-by: Alberto Garcia <[email protected]> > --- > tests/qemu-iotests/085 | 97 > +++++++++++++++++++++++++++++++++++++++++++--- > tests/qemu-iotests/085.out | 34 +++++++++++++++- > 2 files changed, 123 insertions(+), 8 deletions(-) >
>
> +# ${1}: unique identifier for the snapshot filename
> +# ${2}: true: ignore backing images (default); false: don't ignore them
> +function add_snapshot_image()
> +{
> + base_image="${TEST_DIR}/$((${1}-1))-${snapshot_virt0}"
> + snapshot_file="${TEST_DIR}/${1}-${snapshot_virt0}"
> + _make_test_img -b "${base_image}" "$size"
> + mv "${TEST_IMG}" "${snapshot_file}"
> + cmd="{ 'execute': 'blockdev-add', 'arguments':
> + { 'options':
> + { 'driver': 'qcow2', 'node-name': 'snap_"${1}"',
> + 'ignore-backing': "${2:-true}", 'file':
Needs to be reworked to use 'backing':'' instead of 'ignore-backing'.
But overall looks like a sane set of tests to cover both positive and
negative expected behavior.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
