#!/usr/bin/env python3
+# group: rw quick
#
# Test for when a backing file is considered overridden (thus, a
# json:{} filename is generated for the overlay) and when it is not
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-# Creator/Owner: Max Reitz <mreitz@redhat.com>
+# Creator/Owner: Hanna Reitz <hreitz@redhat.com>
import iotests
from iotests import log, qemu_img, filter_testfiles, filter_imgfmt, \
log('bs->filename: ' + node['image']['filename'],
filters=[filter_testfiles, filter_imgfmt])
- log('bs->backing_file: ' + node['backing_file'],
+ log('bs->backing_file: ' + node['image']['full-backing-filename'],
filters=[filter_testfiles, filter_imgfmt])
if 'backing-image' in node['image']:
iotests.FilePath('top.img') as top_img_path, \
iotests.VM() as vm:
- assert qemu_img('create', '-f', iotests.imgfmt, base_img_path, '64M') == 0
+ qemu_img('create', '-f', iotests.imgfmt, base_img_path, '64M')
# Choose a funny way to describe the backing filename
- assert qemu_img('create', '-f', iotests.imgfmt, '-b',
- 'file:' + base_img_path, top_img_path) == 0
+ qemu_img('create', '-f', iotests.imgfmt, '-b',
+ 'file:' + base_img_path, '-F', iotests.imgfmt,
+ top_img_path)
vm.launch()
},
filters=[filter_qmp_testfiles, filter_qmp_imgfmt])
- # Filename should be plain, and the backing filename should not
- # contain the "file:" prefix
+ # Filename should be plain, and the backing node filename should
+ # not contain the "file:" prefix
log_node_info(vm.node_info('node0'))
vm.qmp_log('blockdev-del', node_name='node0')
# (because qemu cannot "canonicalize"/"resolve" the backing
# filename unless the backing file is opened implicitly with the
# overlay)
- assert qemu_img('create', '-f', iotests.imgfmt, '-b', base_img_path,
- top_img_path) == 0
+ qemu_img('create', '-f', iotests.imgfmt, '-b', base_img_path,
+ '-F', iotests.imgfmt, top_img_path)
# You can only reliably override backing options by using a node
# reference (or by specifying file.filename, but, well...)