diff mbox

[v3,2/3] block: qemu-iotests for vhdx, read sample dynamic image

Message ID 20130927091455.GA2440@dhcp-200-207.str.redhat.com
State New
Headers show

Commit Message

Kevin Wolf Sept. 27, 2013, 9:14 a.m. UTC
Am 25.09.2013 um 14:12 hat Jeff Cody geschrieben:
> 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.
> 
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

> diff --git a/tests/qemu-iotests/064.out b/tests/qemu-iotests/064.out
> new file mode 100644
> index 0000000..b9e8e4a
> --- /dev/null
> +++ b/tests/qemu-iotests/064.out
> @@ -0,0 +1,14 @@
> +QA output created by 064
> +
> +=== Verify pattern 0xa5, 0 - 33MB ===
> +read 34603008/34603008 bytes at offset 0
> +33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +
> +=== Verify pattern 0x96, 33M - 66M ===
> +read 34603008/34603008 bytes at offset 34603008
> +33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +
> +=== Verify pattern 0x00, 66M - 1024M ===
> +read 1004535808/1004535808 bytes at offset 69206016
> +958 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +*** done

Doesn't work for me. Am I missing patches that need to be applied first?

064 1s ...        [11:09:58] [11:09:59] - output mismatch (see 064.out.bad)

Kevin

Comments

Jeff Cody Sept. 27, 2013, 11:35 a.m. UTC | #1
On Fri, Sep 27, 2013 at 11:14:55AM +0200, Kevin Wolf wrote:
> Am 25.09.2013 um 14:12 hat Jeff Cody geschrieben:
> > 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.
> > 
> > Signed-off-by: Jeff Cody <jcody@redhat.com>
> > Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> > diff --git a/tests/qemu-iotests/064.out b/tests/qemu-iotests/064.out
> > new file mode 100644
> > index 0000000..b9e8e4a
> > --- /dev/null
> > +++ b/tests/qemu-iotests/064.out
> > @@ -0,0 +1,14 @@
> > +QA output created by 064
> > +
> > +=== Verify pattern 0xa5, 0 - 33MB ===
> > +read 34603008/34603008 bytes at offset 0
> > +33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> > +
> > +=== Verify pattern 0x96, 33M - 66M ===
> > +read 34603008/34603008 bytes at offset 34603008
> > +33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> > +
> > +=== Verify pattern 0x00, 66M - 1024M ===
> > +read 1004535808/1004535808 bytes at offset 69206016
> > +958 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> > +*** done
> 
> Doesn't work for me. Am I missing patches that need to be applied first?
>

I need to add -r to the QEMU_IO arguments.  I had tested this on my
rebased vhdx branch, which has r/w support, so I missed that.  QEMU on
qemu/master will refuse to open a VHDX image r/w.

Submitting a v4 with this change (just this patch since you applied
the other two)


> 064 1s ...        [11:09:58] [11:09:59] - output mismatch (see 064.out.bad)
> --- 064.out     2013-09-27 11:00:37.077677734 +0200
> +++ 064.out.bad 2013-09-27 11:09:59.704298133 +0200
> @@ -1,14 +1,14 @@
>  QA output created by 064
>  
>  === Verify pattern 0xa5, 0 - 33MB ===
> -read 34603008/34603008 bytes at offset 0
> -33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +qemu-io: can't open device /home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx: Could not open '/home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx': Operation not supported
> +no file open, try 'help open'
>  
>  === Verify pattern 0x96, 33M - 66M ===
> -read 34603008/34603008 bytes at offset 34603008
> -33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +qemu-io: can't open device /home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx: Could not open '/home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx': Operation not supported
> +no file open, try 'help open'
>  
>  === Verify pattern 0x00, 66M - 1024M ===
> -read 1004535808/1004535808 bytes at offset 69206016
> -958 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +qemu-io: can't open device /home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx: Could not open '/home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx': Operation not supported
> +no file open, try 'help open'
>  *** done
> 
> Kevin
>
diff mbox

Patch

--- 064.out     2013-09-27 11:00:37.077677734 +0200
+++ 064.out.bad 2013-09-27 11:09:59.704298133 +0200
@@ -1,14 +1,14 @@ 
 QA output created by 064
 
 === Verify pattern 0xa5, 0 - 33MB ===
-read 34603008/34603008 bytes at offset 0
-33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io: can't open device /home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx: Could not open '/home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx': Operation not supported
+no file open, try 'help open'
 
 === Verify pattern 0x96, 33M - 66M ===
-read 34603008/34603008 bytes at offset 34603008
-33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io: can't open device /home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx: Could not open '/home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx': Operation not supported
+no file open, try 'help open'
 
 === Verify pattern 0x00, 66M - 1024M ===
-read 1004535808/1004535808 bytes at offset 69206016
-958 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io: can't open device /home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx: Could not open '/home/kwolf/source/qemu/tests/qemu-iotests/scratch/iotest-dynamic-1G.vhdx': Operation not supported
+no file open, try 'help open'
 *** done