[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/18] iotests: Test convert -n -B to backing-less target
From: |
Max Reitz |
Subject: |
[PULL 16/18] iotests: Test convert -n -B to backing-less target |
Date: |
Thu, 20 Feb 2020 17:07:08 +0100 |
This must not crash.
Signed-off-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/122 | 14 ++++++++++++++
tests/qemu-iotests/122.out | 5 +++++
2 files changed, 19 insertions(+)
diff --git a/tests/qemu-iotests/122 b/tests/qemu-iotests/122
index dfa350936f..f7a3ae684a 100755
--- a/tests/qemu-iotests/122
+++ b/tests/qemu-iotests/122
@@ -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
diff --git a/tests/qemu-iotests/122.out b/tests/qemu-iotests/122.out
index 849b6cc2ef..1a35951a80 100644
--- a/tests/qemu-iotests/122.out
+++ b/tests/qemu-iotests/122.out
@@ -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
--
2.24.1
- Re: [PULL 06/18] qemu-img: Add --target-is-zero to convert, (continued)
- [PULL 07/18] block: always fill entire LUKS header space with zeros, Max Reitz, 2020/02/20
- [PULL 08/18] block/backup-top: fix flags handling, Max Reitz, 2020/02/20
- [PULL 09/18] iotests/279: Fix for non-qcow2 formats, Max Reitz, 2020/02/20
- [PULL 10/18] block/nbd: Fix hang in .bdrv_close(), Max Reitz, 2020/02/20
- [PULL 11/18] block: Generic file creation fallback, Max Reitz, 2020/02/20
- [PULL 12/18] file-posix: Drop hdev_co_create_opts(), Max Reitz, 2020/02/20
- [PULL 13/18] iscsi: Drop iscsi_co_create_opts(), Max Reitz, 2020/02/20
- [PULL 14/18] iotests: Add test for image creation fallback, Max Reitz, 2020/02/20
- [PULL 15/18] qemu-img: Fix convert -n -B for backing-less targets, Max Reitz, 2020/02/20
- [PULL 16/18] iotests: Test convert -n -B to backing-less target,
Max Reitz <=
- [PULL 17/18] block: Fix VM size field width in snapshot dump, Max Reitz, 2020/02/20
- [PULL 18/18] iotests: Test snapshot -l field separation, Max Reitz, 2020/02/20
- Re: [PULL 00/18] Block patches, Peter Maydell, 2020/02/21