[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/40] block/vpc: add tests for image creation force_
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 08/40] block/vpc: add tests for image creation force_size parameter |
Date: |
Mon, 14 Mar 2016 18:37:09 +0100 |
From: Jeff Cody <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/qemu-iotests/146 | 51 ++++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/146.out | 32 +++++++++++++++++++++++++++++
2 files changed, 83 insertions(+)
diff --git a/tests/qemu-iotests/146 b/tests/qemu-iotests/146
index 4cbe1f4..043711b 100755
--- a/tests/qemu-iotests/146
+++ b/tests/qemu-iotests/146
@@ -108,6 +108,57 @@ echo
${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map'
+_cleanup_test_img
+
+echo
+echo === Testing Image create, default ===
+echo
+
+TEST_IMG="${TEST_DIR}/vpc-create-test.vpc"
+
+_make_test_img 4G
+
+echo
+echo === Read created image, default opts ====
+echo
+
+${QEMU_IO} -c "open -o driver=vpc ${TEST_IMG}" -c 'map'
+
+echo
+echo === Read created image, force_size_calc=chs ====
+echo
+
+${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map'
+
+echo
+echo === Read created image, force_size_calc=current_size ====
+echo
+
+${QEMU_IO} -c "open -o driver=vpc,force_size_calc=current_size ${TEST_IMG}" -c
'map'
+
+echo
+echo === Testing Image create, force_size ===
+echo
+
+_make_test_img -o force_size 4G
+
+echo
+echo === Read created image, default opts ====
+echo
+
+${QEMU_IO} -c "open -o driver=vpc ${TEST_IMG}" -c 'map'
+
+echo
+echo === Read created image, force_size_calc=chs ====
+echo
+
+${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map'
+
+echo
+echo === Read created image, force_size_calc=current_size ====
+echo
+
+${QEMU_IO} -c "open -o driver=vpc,force_size_calc=current_size ${TEST_IMG}" -c
'map'
echo "*** done"
rm -f $seq.full
diff --git a/tests/qemu-iotests/146.out b/tests/qemu-iotests/146.out
index 478ad4e..4f334d8 100644
--- a/tests/qemu-iotests/146.out
+++ b/tests/qemu-iotests/146.out
@@ -35,4 +35,36 @@ QA output created by 146
=== Testing d2v with chs force ===
[ 0] 514560/ 514560 sectors allocated at offset 0
bytes (1)
+
+=== Testing Image create, default ===
+
+Formatting 'TEST_DIR/IMGFMT-create-test.IMGFMT', fmt=IMGFMT size=4294967296
+
+=== Read created image, default opts ====
+
+[ 0] 8389584/ 8389584 sectors not allocated at offset 0
bytes (0)
+
+=== Read created image, force_size_calc=chs ====
+
+[ 0] 8389584/ 8389584 sectors not allocated at offset 0
bytes (0)
+
+=== Read created image, force_size_calc=current_size ====
+
+[ 0] 8389584/ 8389584 sectors not allocated at offset 0
bytes (0)
+
+=== Testing Image create, force_size ===
+
+Formatting 'TEST_DIR/IMGFMT-create-test.IMGFMT', fmt=IMGFMT size=4294967296
force_size=on
+
+=== Read created image, default opts ====
+
+[ 0] 8388608/ 8388608 sectors not allocated at offset 0
bytes (0)
+
+=== Read created image, force_size_calc=chs ====
+
+[ 0] 8388608/ 8388608 sectors not allocated at offset 0
bytes (0)
+
+=== Read created image, force_size_calc=current_size ====
+
+[ 0] 8388608/ 8388608 sectors not allocated at offset 0
bytes (0)
*** done
--
1.8.3.1
- [Qemu-devel] [PULL 00/40] Block patches, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 03/40] block/qapi: Factor out bdrv_query_bds_stats(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 01/40] qemu-img: eliminate memory leak, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 02/40] block/qapi: Factor out bdrv_query_blk_stats(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 04/40] block/qapi: Include empty drives in query-blockstats, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 05/40] block/vpc: choose size calculation method based on creator_app field, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 09/40] docs: fix invalid node name in qmp event, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 11/40] quorum: modify vote rules for flush operation, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 06/40] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 10/40] qmp event: Refactor QUORUM_REPORT_BAD, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 08/40] block/vpc: add tests for image creation force_size parameter,
Kevin Wolf <=
- [Qemu-devel] [PULL 07/40] block/vpc: give option to force the current_size field in .bdrv_create, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 12/40] blockdev: Snapshotting must not open second instance of old top, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 15/40] vmdk: Switch to heap arrays for vmdk_write_cid, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 13/40] block: Fix snapshot=on cache modes, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 14/40] block: Fix cache mode defaults in bds_tree_init(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 16/40] vmdk: Switch to heap arrays for vmdk_read_cid, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 17/40] vmdk: Switch to heap arrays for vmdk_parent_open, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 21/40] block: Introduce blk_set_allow_write_beyond_eof(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 23/40] qcow: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 22/40] parallels: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14