From 89e911816a1d5cdbc9480d5464c571d216cf5ea8 Mon Sep 17 00:00:00 2001 From: Jeff Cody Date: Fri, 27 Sep 2013 08:48:15 -0400 Subject: block: qemu-iotests for vhdx, read sample dynamic image This adds the VHDX format to the qemu-iotests format, and adds a read test. The test reads from an existing sample image, that was created with Hyper-V under Windwos Server 2012. The image file is a 1GB dynamic image, with 32MB blocks. The pattern 0xa5 exists from 0MB-33MB (past a block size boundary) The pattern 0x96 exists from 33MB-66MB (past another block boundary, and leaving a partial blank block) From 66MB-1024MB, all reads should return 0. Although 1GB dynamic image with 66MB of data, the bzip2'ed image file size is only 874 bytes. This also adds in the IMGFMT_GENERIC flag, so r/o images can be tested (e.g. ./check -vhdx) without failing tests that assume r/w support. Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf --- tests/qemu-iotests/common | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/qemu-iotests/common') diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common index fecaf85..2932e14 100644 --- a/tests/qemu-iotests/common +++ b/tests/qemu-iotests/common @@ -45,6 +45,7 @@ valgrind=false rm -f $tmp.list $tmp.tmp $tmp.sed export IMGFMT=raw +export IMGFMT_GENERIC=true export IMGPROTO=file export IMGOPTS="" export QEMU_IO_OPTIONS="" @@ -133,6 +134,7 @@ check options -qed test qed -vdi test vdi -vpc test vpc + -vhdx test vhdx -vmdk test vmdk -rbd test rbd -sheepdog test sheepdog @@ -195,6 +197,12 @@ testlist options xpand=false ;; + -vhdx) + IMGFMT=vhdx + xpand=false + IMGFMT_GENERIC=false + ;; + -rbd) IMGPROTO=rbd xpand=false -- cgit v1.1