[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/4] block/vpc: add tests for image creation force_s
From: |
Jeff Cody |
Subject: |
[Qemu-devel] [PATCH 4/4] block/vpc: add tests for image creation force_size parameter |
Date: |
Tue, 23 Feb 2016 19:47:58 -0500 |
Signed-off-by: Jeff Cody <address@hidden>
---
tests/qemu-iotests/146 | 81 ++++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/146.out | 44 +++++++++++++++++++++++++
2 files changed, 125 insertions(+)
diff --git a/tests/qemu-iotests/146 b/tests/qemu-iotests/146
index af60849..323ea8a 100755
--- a/tests/qemu-iotests/146
+++ b/tests/qemu-iotests/146
@@ -113,6 +113,87 @@ _send_qemu_cmd $h1 'qemu-io disk "map"' "sectors"
_send_qemu_cmd $h1 'quit' ""
+_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
+
+_launch_qemu -drive file="${TEST_IMG}",id=disk,format=vpc
+h1=$QEMU_HANDLE
+
+_send_qemu_cmd $h1 'qemu-io disk "map"' "sectors"
+_send_qemu_cmd $h1 'quit' ""
+
+echo
+echo === Read created image, force_size_calc=chs ====
+echo
+
+_launch_qemu -drive file="${TEST_IMG}",id=disk,format=vpc,force_size_calc=chs
+h1=$QEMU_HANDLE
+
+_send_qemu_cmd $h1 'qemu-io disk "map"' "sectors"
+_send_qemu_cmd $h1 'quit' ""
+
+
+echo
+echo === Read created image, force_size_calc=current_size ====
+echo
+
+_launch_qemu -drive
file="${TEST_IMG}",id=disk,format=vpc,force_size_calc=current_size
+h1=$QEMU_HANDLE
+
+_send_qemu_cmd $h1 'qemu-io disk "map"' "sectors"
+_send_qemu_cmd $h1 'quit' ""
+
+
+echo
+echo === Testing Image create, force_size ===
+echo
+
+_make_test_img -o force_size 4G
+
+
+echo
+echo === Read created image, default opts ====
+echo
+
+_launch_qemu -drive file="${TEST_IMG}",id=disk,format=vpc
+h1=$QEMU_HANDLE
+
+_send_qemu_cmd $h1 'qemu-io disk "map"' "sectors"
+_send_qemu_cmd $h1 'quit' ""
+
+echo
+echo === Read created image, force_size_calc=chs ====
+echo
+
+_launch_qemu -drive file="${TEST_IMG}",id=disk,format=vpc,force_size_calc=chs
+h1=$QEMU_HANDLE
+
+_send_qemu_cmd $h1 'qemu-io disk "map"' "sectors"
+_send_qemu_cmd $h1 'quit' ""
+
+
+echo
+echo === Read created image, force_size_calc=current_size ====
+echo
+
+_launch_qemu -drive
file="${TEST_IMG}",id=disk,format=vpc,force_size_calc=current_size
+h1=$QEMU_HANDLE
+
+_send_qemu_cmd $h1 'qemu-io disk "map"' "sectors"
+_send_qemu_cmd $h1 'quit' ""
+
+
echo "*** done"
rm -f $seq.full
diff --git a/tests/qemu-iotests/146.out b/tests/qemu-iotests/146.out
index ddcfeb6..9a28a60 100644
--- a/tests/qemu-iotests/146.out
+++ b/tests/qemu-iotests/146.out
@@ -35,4 +35,48 @@ QEMU X.Y.Z monitor - type 'help' for more information
QEMU X.Y.Z monitor - type 'help' for more information
(qemu)
q[K[Dqe[K[D[Dqem[K[D[D[Dqemu[K[D[D[D[Dqemu-[K[D[D[D[D[Dqemu-i[K[D[D[D[D[D[Dqemu-io[K[D[D[D[D[D[D[Dqemu-io
[K[D[D[D[D[D[D[D[Dqemu-io d[K[D[D[D[D[D[D[D[D[Dqemu-io
di[K[D[D[D[D[D[D[D[D[D[Dqemu-io
dis[K[D[D[D[D[D[D[D[D[D[D[Dqemu-io
disk[K[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
[K[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"m[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"ma[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"map[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk "map"[K
[ 0] 266334240/ 266334240 sectors not allocated at
offset 0 bytes (0)
+
+=== Testing Image create, default ===
+
+Formatting 'TEST_DIR/IMGFMT-create-test.IMGFMT', fmt=IMGFMT size=4294967296
+
+=== Read created image, default opts ====
+
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu)
q[K[Dqe[K[D[Dqem[K[D[D[Dqemu[K[D[D[D[Dqemu-[K[D[D[D[D[Dqemu-i[K[D[D[D[D[D[Dqemu-io[K[D[D[D[D[D[D[Dqemu-io
[K[D[D[D[D[D[D[D[Dqemu-io d[K[D[D[D[D[D[D[D[D[Dqemu-io
di[K[D[D[D[D[D[D[D[D[D[Dqemu-io
dis[K[D[D[D[D[D[D[D[D[D[D[Dqemu-io
disk[K[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
[K[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"m[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"ma[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"map[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk "map"[K
+[ 0] 8389584/ 8389584 sectors not allocated at offset 0
bytes (0)
+
+=== Read created image, force_size_calc=chs ====
+
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu)
q[K[Dqe[K[D[Dqem[K[D[D[Dqemu[K[D[D[D[Dqemu-[K[D[D[D[D[Dqemu-i[K[D[D[D[D[D[Dqemu-io[K[D[D[D[D[D[D[Dqemu-io
[K[D[D[D[D[D[D[D[Dqemu-io d[K[D[D[D[D[D[D[D[D[Dqemu-io
di[K[D[D[D[D[D[D[D[D[D[Dqemu-io
dis[K[D[D[D[D[D[D[D[D[D[D[Dqemu-io
disk[K[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
[K[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"m[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"ma[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"map[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk "map"[K
+[ 0] 8389584/ 8389584 sectors not allocated at offset 0
bytes (0)
+
+=== Read created image, force_size_calc=current_size ====
+
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu)
q[K[Dqe[K[D[Dqem[K[D[D[Dqemu[K[D[D[D[Dqemu-[K[D[D[D[D[Dqemu-i[K[D[D[D[D[D[Dqemu-io[K[D[D[D[D[D[D[Dqemu-io
[K[D[D[D[D[D[D[D[Dqemu-io d[K[D[D[D[D[D[D[D[D[Dqemu-io
di[K[D[D[D[D[D[D[D[D[D[Dqemu-io
dis[K[D[D[D[D[D[D[D[D[D[D[Dqemu-io
disk[K[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
[K[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"m[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"ma[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"map[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk "map"[K
+[ 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 ====
+
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu)
q[K[Dqe[K[D[Dqem[K[D[D[Dqemu[K[D[D[D[Dqemu-[K[D[D[D[D[Dqemu-i[K[D[D[D[D[D[Dqemu-io[K[D[D[D[D[D[D[Dqemu-io
[K[D[D[D[D[D[D[D[Dqemu-io d[K[D[D[D[D[D[D[D[D[Dqemu-io
di[K[D[D[D[D[D[D[D[D[D[Dqemu-io
dis[K[D[D[D[D[D[D[D[D[D[D[Dqemu-io
disk[K[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
[K[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"m[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"ma[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"map[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk "map"[K
+[ 0] 8389584/ 8389584 sectors not allocated at offset 0
bytes (0)
+
+=== Read created image, force_size_calc=chs ====
+
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu)
q[K[Dqe[K[D[Dqem[K[D[D[Dqemu[K[D[D[D[Dqemu-[K[D[D[D[D[Dqemu-i[K[D[D[D[D[D[Dqemu-io[K[D[D[D[D[D[D[Dqemu-io
[K[D[D[D[D[D[D[D[Dqemu-io d[K[D[D[D[D[D[D[D[D[Dqemu-io
di[K[D[D[D[D[D[D[D[D[D[Dqemu-io
dis[K[D[D[D[D[D[D[D[D[D[D[Dqemu-io
disk[K[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
[K[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"m[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"ma[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"map[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk "map"[K
+[ 0] 8389584/ 8389584 sectors not allocated at offset 0
bytes (0)
+
+=== Read created image, force_size_calc=current_size ====
+
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu)
q[K[Dqe[K[D[Dqem[K[D[D[Dqemu[K[D[D[D[Dqemu-[K[D[D[D[D[Dqemu-i[K[D[D[D[D[D[Dqemu-io[K[D[D[D[D[D[D[Dqemu-io
[K[D[D[D[D[D[D[D[Dqemu-io d[K[D[D[D[D[D[D[D[D[Dqemu-io
di[K[D[D[D[D[D[D[D[D[D[Dqemu-io
dis[K[D[D[D[D[D[D[D[D[D[D[Dqemu-io
disk[K[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
[K[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"[K[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"m[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"ma[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk
"map[K[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dqemu-io disk "map"[K
+[ 0] 8388608/ 8388608 sectors not allocated at offset 0
bytes (0)
*** done
--
1.9.3
- Re: [Qemu-devel] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create, (continued)
- [Qemu-devel] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images, Jeff Cody, 2016/02/23
- Re: [Qemu-devel] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images, Kevin Wolf, 2016/02/24
- Re: [Qemu-devel] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images, Jeff Cody, 2016/02/24
- Re: [Qemu-devel] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images, Jeff Cody, 2016/02/24
- Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images, Max Reitz, 2016/02/24
- Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images, Jeff Cody, 2016/02/24
- Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images, Max Reitz, 2016/02/24
- [Qemu-devel] [PATCH 4/4] block/vpc: add tests for image creation force_size parameter,
Jeff Cody <=