Back in commit6e6e55f5
(Jul 2017, v2.10), we tweaked the code to warn if the backing file could not be opened but the user gave a size, unless the user also passes the -u option to bypass the open of the backing file. As one common reason for failure to open the backing file is when there is mismatch in the requested backing format in relation to what the backing file actually contains, we actually want to open the backing file and ensure that it has the right format in as many cases as possible. iotest 301 for qcow demonstrates how detecting explicit format mismatch is useful to prevent the creation of an image that would probe differently than the user requested. Now is the time to finally turn the warning an error, as promised. Note that the original warning was added prior to our documentation of an official deprecation policy (eb22aeca
, also Jul 2017), and because the warning didn't mention the word "deprecated", we never actually remembered to document it as such. But the warning has been around long enough that I don't see prolonging it another two releases. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20200706203954.341758-7-eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
58 lines
2.1 KiB
Plaintext
58 lines
2.1 KiB
Plaintext
QA output created by 301
|
|
|
|
== qcow backed by qcow ==
|
|
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=33554432
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base
|
|
image: TEST_DIR/t.IMGFMT
|
|
file format: IMGFMT
|
|
virtual size: 32 MiB (33554432 bytes)
|
|
cluster_size: 512
|
|
backing file: TEST_DIR/t.IMGFMT.base
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
|
|
image: TEST_DIR/t.IMGFMT
|
|
file format: IMGFMT
|
|
virtual size: 32 MiB (33554432 bytes)
|
|
cluster_size: 512
|
|
backing file: TEST_DIR/t.IMGFMT.base
|
|
|
|
== mismatched command line detection ==
|
|
qemu-img: TEST_DIR/t.IMGFMT: invalid VMDK image descriptor
|
|
Could not open backing image.
|
|
qemu-img: TEST_DIR/t.IMGFMT: invalid VMDK image descriptor
|
|
Could not open backing image.
|
|
|
|
qemu-img: TEST_DIR/t.IMGFMT: Image creation needs a size parameter
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=vmdk
|
|
|
|
qemu-img: TEST_DIR/t.IMGFMT: Unknown driver 'garbage'
|
|
Could not open backing image.
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=garbage
|
|
qemu-img: TEST_DIR/t.IMGFMT: unrecognized backing format 'garbage'
|
|
image: TEST_DIR/t.IMGFMT
|
|
file format: IMGFMT
|
|
virtual size: 32 MiB (33554432 bytes)
|
|
cluster_size: 512
|
|
backing file: TEST_DIR/t.IMGFMT.base
|
|
|
|
== qcow backed by raw ==
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base
|
|
image: TEST_DIR/t.IMGFMT
|
|
file format: IMGFMT
|
|
virtual size: 32 MiB (33554432 bytes)
|
|
cluster_size: 512
|
|
backing file: TEST_DIR/t.IMGFMT.base
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=raw
|
|
image: TEST_DIR/t.IMGFMT
|
|
file format: IMGFMT
|
|
virtual size: 32 MiB (33554432 bytes)
|
|
cluster_size: 512
|
|
backing file: TEST_DIR/t.IMGFMT.base
|
|
|
|
== commit cannot change type of raw backing file ==
|
|
Formatting 'TEST_DIR/t.qcow.IMGFMT', fmt=IMGFMT size=33554432
|
|
qemu-img: Block job failed: Operation not permitted
|
|
image: TEST_DIR/t.IMGFMT.base
|
|
file format: raw
|
|
virtual size: 32 MiB (33554432 bytes)
|
|
*** done
|