提交 f535cc90 编写于 作者: M Max Reitz

iotests: Test convert -n -B to backing-less target

This must not crash.
Signed-off-by: NMax Reitz <mreitz@redhat.com>
Message-Id: <20200121155915.98232-3-mreitz@redhat.com>
Reviewed-by: NJohn Snow <jsnow@redhat.com>
Signed-off-by: NMax Reitz <mreitz@redhat.com>
上级 c69291e7
......@@ -276,6 +276,20 @@ $QEMU_IMG convert -O $IMGFMT -n "$TEST_IMG" "$TEST_IMG".orig
$QEMU_IMG compare "$TEST_IMG" "$TEST_IMG".orig
echo
echo '=== -n -B to an image without a backing file ==='
echo
# Base for the output
TEST_IMG="$TEST_IMG".base _make_test_img 64M
# Output that does have $TEST_IMG.base set as its (implicit) backing file
TEST_IMG="$TEST_IMG".orig _make_test_img 64M
# Convert with -n, which should not confuse -B with "target BDS has a
# backing file"
$QEMU_IMG convert -O $IMGFMT -B "$TEST_IMG".base -n "$TEST_IMG" "$TEST_IMG".orig
# success, all done
echo '*** done'
rm -f $seq.full
......
......@@ -228,4 +228,9 @@ Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=67108864
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Images are identical.
=== -n -B to an image without a backing file ===
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=67108864
*** done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册