aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/146
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2016-02-25 12:27:30 -0500
committerKevin Wolf <kwolf@redhat.com>2016-03-14 16:46:42 +0100
commit1001dd9f844429c01ebf433cc67df8cf196d06d5 (patch)
treeb9b525d0a544020197bfaff13a07089345e7ba11 /tests/qemu-iotests/146
parentfb9245c2610932d33ce148b58714fcc7b3c6eb5f (diff)
block/vpc: add tests for image creation force_size parameter
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/146')
-rwxr-xr-xtests/qemu-iotests/14651
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/qemu-iotests/146 b/tests/qemu-iotests/146
index 4cbe1f4068..043711be68 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