]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: qemumonitorjson: Add test case for node name detection with blockjob
authorPeter Krempa <pkrempa@redhat.com>
Wed, 26 Jul 2017 09:06:51 +0000 (11:06 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 27 Jul 2017 08:34:13 +0000 (10:34 +0200)
commitb717be71dcb3a419b49cae846a1e60054db21081
tree42f0fa35c05c9c2017ab0e43ea32f356f3a8f859
parentb04a3474e4f340565b5295f56076ae3bd4fdaf35
tests: qemumonitorjson: Add test case for node name detection with blockjob

qemu 2.9 returns an extra layer in the backing data if a block job is
active. Add a test case to see whether our code properly detects and
ignores such layer.

The test data was prepared by creating a backing chain of qcow2 images
(with qemu-img and with libvirt's snapshot feature).

One of the layers was then merged back by doing a block-commit:

virsh blockcommit VM hda --top /var/lib/libvirt/images/b

and then a block-copy job was started and kept in synchronized phase:

virsh blockcopy VM hda /tmp/tgt.img --transient job

Reviewed-by: Eric Blake <eblake@redhat.com>
tests/qemumonitorjsondata/qemumonitorjson-nodename-blockjob-blockstats.json [new file with mode: 0644]
tests/qemumonitorjsondata/qemumonitorjson-nodename-blockjob-named-nodes.json [new file with mode: 0644]
tests/qemumonitorjsondata/qemumonitorjson-nodename-blockjob.result [new file with mode: 0644]
tests/qemumonitorjsontest.c