]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
12 years agoqemu-iotests: add qed support to 025 image resize test
Stefan Hajnoczi [Mon, 16 May 2011 12:59:12 +0000 (13:59 +0100)]
qemu-iotests: add qed support to 025 image resize test

QED now supports the truncate (aka resize) operation for growing images.
Update test 025 so it runs for QED.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: Update rbd support
Josh Durgin [Wed, 13 Apr 2011 00:47:45 +0000 (17:47 -0700)]
qemu-iotests: Update rbd support

rbd implements bdrv_truncate, so test 025 will work.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: common.config: Fix no $TEST_DIR directory
Mitnick Lyu [Mon, 11 Apr 2011 20:05:44 +0000 (04:05 +0800)]
qemu-iotests: common.config: Fix no $TEST_DIR directory

mkdir $TEST_DIR on common.config first run

Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: only run 016 for file and sheepdog protocols
Christoph Hellwig [Thu, 21 Apr 2011 06:26:04 +0000 (08:26 +0200)]
qemu-iotests: only run 016 for file and sheepdog protocols

016 writes past EOF which isn't support by most protocols, so limit
it to file and sheepdog, which explicitly support it.

Pointed out by Josh Durgin <josh.durgin@dreamhost.com>.

Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: Use zero-based offsets for IO patterns
Stefan Hajnoczi [Fri, 4 Feb 2011 12:55:02 +0000 (12:55 +0000)]
qemu-iotests: Use zero-based offsets for IO patterns

The io_pattern style functions have the following loop:

  for i in `seq 1 $count`; do
      echo ... $(( start + i * step )) ...
  done

Offsets are 1-based so start=1024, step=512, count=4 yields:
1536, 2048, 2560, 3072

Normally we expect:
1024, 1536, 2048, 2560

Most tests ignore this detail, which means that they perform I/O to a
slightly different range than expected by the test author.

Later on things got less innocent and tests started trying to compensate
for the 1-based indexing.  This included negative start values in test
024 and my own attempt with count-1 in test 028!

The end result is that tests that use io_pattern are hard to reason
about and don't work the way you'd expect.  It's time to clean this mess
up.

This patch switches io_pattern to 0-based offsets.  This requires
adjusting the golden outputs since I/O ranges are now shifted and output
differs.

Verifying these output diffs is easy, however.  Each diff hunk moves one
I/O from beyond the end of the pattern range to the beginning.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: add support for rbd and sheepdog protocols
MORITA Kazutaka [Mon, 17 Jan 2011 17:01:17 +0000 (02:01 +0900)]
qemu-iotests: add support for rbd and sheepdog protocols

This patch introduces tests for protocols other than file, and
initially supports rbd and sheepdog.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: filter IMGFMT correctly in 019
Stefan Hajnoczi [Wed, 24 Nov 2010 16:12:21 +0000 (17:12 +0100)]
qemu-iotests: filter IMGFMT correctly in 019

Test 019 can be run with qcow2 and qed image formats.  Replace the
specific image format value with "IMGFMT" so the golden output does not
hardcode qcow2 or qed.

This patch also includes a typo fix for "occurrences".

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: README: Fix spelling
Stefan Weil [Sun, 7 Nov 2010 13:56:57 +0000 (14:56 +0100)]
qemu-iotests: README: Fix spelling

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: add support for qed format
Stefan Hajnoczi [Sun, 31 Oct 2010 20:10:20 +0000 (16:10 -0400)]
qemu-iotests: add support for qed format

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: filter TEST_DIR correctly in 019
Christoph Hellwig [Sun, 31 Oct 2010 20:07:46 +0000 (16:07 -0400)]
qemu-iotests: filter TEST_DIR correctly in 019

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqemu-iotests: fix 019 golden output
Kevin Wolf [Sun, 31 Oct 2010 20:05:21 +0000 (16:05 -0400)]
qemu-iotests: fix 019 golden output

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: update expected results after qemu-img changes
Kevin Wolf [Fri, 15 Oct 2010 21:08:51 +0000 (14:08 -0700)]
qemu-iotests: update expected results after qemu-img changes

The error message for leaked clusters has changed. qemu-iotests needs to be
updated to pass 026 again.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: add read/write from smaller backing image test
Stefan Hajnoczi [Fri, 15 Oct 2010 14:56:35 +0000 (07:56 -0700)]
qemu-iotests: add read/write from smaller backing image test

Some image formats support backing images that are smaller than the
image file.  This patch adds a test that verifies that reads and writes
beyond the end of backing image work.

Unallocated reads beyond the end of the backing file should produce
zeroes.

Writes beyond the end of the backing file should copy-on-write using
zeroes.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: add sub-cluster allocating write test for sparse image formats
Stefan Hajnoczi [Fri, 15 Oct 2010 14:55:52 +0000 (07:55 -0700)]
qemu-iotests: add sub-cluster allocating write test for sparse image formats

Image formats that grow the image file on demand and are organized into
clusters must handle sub-cluster allocating writes.  Such writes touch
a portion of a previously unallocated data cluster.  After the image
file is grown with the written data, reads of that cluster should work
as expected:

1. Sectors before the written region are zero.
2. The written region is present and the data is uncorrupted.
3. Sectors after the written region are zero.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: improve test for qemu-img convert with backing file
Kevin Wolf [Fri, 15 Oct 2010 14:53:00 +0000 (07:53 -0700)]
qemu-iotests: improve test for qemu-img convert with backing file

Additionally to testing the qemu-img convert -B option, also test
-o backing_file.

Also, the old test acidentlly used a pattern of zeros for most of the writes,
so that the allocation test didn't really work out. This is fixed by using an
explicit pattern.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: consider more cases in parsing qemu-io output
Kevin Wolf [Fri, 1 Oct 2010 04:02:28 +0000 (06:02 +0200)]
qemu-iotests: consider more cases in parsing qemu-io output

I got a bug report with test output diffs like this:

-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+4 KiB, 1 ops; 0.0000 sec (inf EiB/sec and inf ops/sec)

This patch extends the regular expression to consider terabytes, petabytes and
exabytes, and to allow inf as value for the throughput.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: qcow2 error path tests
Kevin Wolf [Mon, 14 Jun 2010 09:17:54 +0000 (11:17 +0200)]
qemu-iotests: qcow2 error path tests

This adds test cases for qcow2 error paths (using blkdebug)

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: improve rebase test
Kevin Wolf [Tue, 4 May 2010 16:59:26 +0000 (18:59 +0200)]
qemu-iotests: improve rebase test

The old test didn't consider cases in which the COW files contains some
unallocated clusters and after them allocated ones again.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: test bdrv_truncate
Stefan Hajnoczi [Tue, 4 May 2010 16:59:08 +0000 (18:59 +0200)]
qemu-iotests: test bdrv_truncate

This patch adds an image resize grow test to ensure that existing data
is not lost during grow and new space is zeroed.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: explicitly use bash interpreter
Stefan Hajnoczi [Mon, 26 Apr 2010 09:44:05 +0000 (11:44 +0200)]
qemu-iotests: explicitly use bash interpreter

The tests use bash language features like 'let', which aren't supported
by /bin/sh on systems that use a conservative shell like dash.  This
patch changes the interpreter to /bin/bash.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: test qemu-img rebase
Kevin Wolf [Sun, 17 Jan 2010 11:23:15 +0000 (12:23 +0100)]
qemu-iotests: test qemu-img rebase

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: test larger clusters sizes on qcow2
Kevin Wolf [Thu, 1 Oct 2009 17:30:19 +0000 (14:30 -0300)]
qemu-iotests: test larger clusters sizes on qcow2

This patch adds test case 023 which tests some more cluster sizes. For
anythinger larger than 4k clusters we can't use requests that are l2_size or
more (128k for 1k clusters, 2 MB for 4k clusters, 512 MB for 64k clusters).
Therefore one of the common.pattern cases is changed and needs new expected
results for some old test cases.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: 019: Make cluster size dynamic
Kevin Wolf [Thu, 1 Oct 2009 17:30:13 +0000 (14:30 -0300)]
qemu-iotests: 019: Make cluster size dynamic

Change the offsets for test requests according to CLUSTER_SIZE.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: align test requests according to cluster size
Kevin Wolf [Thu, 1 Oct 2009 17:29:59 +0000 (14:29 -0300)]
qemu-iotests: align test requests according to cluster size

Change the io_test and io_test2 functions to take the cluster size of the image
and the number of test requests to issue. Tests are changed to specify a
cluster size (usually 4k), but expected test results stay the same for now
(apart from qemu-img printing the cluster size now).

Based on a patch written by Christoph Hellwig.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: add support for vdi format "static" option
Stefan Weil [Thu, 13 Aug 2009 16:49:48 +0000 (13:49 -0300)]
qemu-iotests: add support for vdi format "static" option

VDI supports an image option 'static'.
Ignore "static=off" from qemu-img output.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: fix expected result for 019 after qemu-io change
Kevin Wolf [Mon, 27 Jul 2009 11:12:40 +0000 (13:12 +0200)]
qemu-iotests: fix expected result for 019 after qemu-io change

The output of the alloc command in qemu-io has changed.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: test bdrv_load/save_vmstate
Kevin Wolf [Mon, 20 Jul 2009 12:36:47 +0000 (14:36 +0200)]
qemu-iotests: test bdrv_load/save_vmstate

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: common.pattern: allow spaces in io() operation
Kevin Wolf [Mon, 20 Jul 2009 12:35:43 +0000 (14:35 +0200)]
qemu-iotests: common.pattern: allow spaces in io() operation

We need to be able to pass "write -b" as an operation to the pattern testing
functions. Unfortunately, this contains a space character...

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: test invalid pattern argument handling in qemu-io
Christoph Hellwig [Mon, 20 Jul 2009 12:33:53 +0000 (14:33 +0200)]
qemu-iotests: test invalid pattern argument handling in qemu-io

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqemu-iotests: replace FSF postal addresses with www.gnu.org links
Christoph Hellwig [Thu, 16 Jul 2009 17:26:54 +0000 (19:26 +0200)]
qemu-iotests: replace FSF postal addresses with www.gnu.org links

Blue Swirl notices that we were using the old FSF post address in the
license boilerplates.  Replace both the old and new address with links
to the gnu.org licenses homepage as suggested by Ben Pfaff.

Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: test commiting changes to backing file
Kevin Wolf [Thu, 16 Jul 2009 17:11:58 +0000 (19:11 +0200)]
qemu-iotests: test commiting changes to backing file

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: test qemu-img convert with backing file for the output image
Kevin Wolf [Thu, 16 Jul 2009 17:11:09 +0000 (19:11 +0200)]
qemu-iotests: test qemu-img convert with backing file for the output image

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: test merge of backing file when converting
Kevin Wolf [Thu, 16 Jul 2009 17:09:41 +0000 (19:09 +0200)]
qemu-iotests: test merge of backing file when converting

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: simple backing file test
Kevin Wolf [Thu, 16 Jul 2009 17:08:22 +0000 (19:08 +0200)]
qemu-iotests: simple backing file test

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: test I/O after EOF for growable files
Christoph Hellwig [Thu, 16 Jul 2009 16:43:09 +0000 (18:43 +0200)]
qemu-iotests: test I/O after EOF for growable files

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviwed-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqemu-iotests: fix pattern for write test
Stefan Weil [Tue, 14 Jul 2009 21:16:00 +0000 (23:16 +0200)]
qemu-iotests: fix pattern for write test

The write pattern value 0axb is invalid and evaluates to 0,
so the read check (which uses a correct value of 0xab) will fail.

This failure will only be detected with a separate patch for
qemu-io. Without it, qemu-io cannot interpret hex values
and always uses a pattern value of 0.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: make a few more tests generic
Christoph Hellwig [Thu, 9 Jul 2009 13:26:11 +0000 (15:26 +0200)]
qemu-iotests: make a few more tests generic

Pretend that a non-implemented check is always successful and thus allow
various tests that were qcow2-specific before to be generic.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqemu-iotests: remove test image after 015 is done
Christoph Hellwig [Wed, 8 Jul 2009 19:39:57 +0000 (21:39 +0200)]
qemu-iotests: remove test image after 015 is done

Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: add support for the vdi image format
Christoph Hellwig [Mon, 6 Jul 2009 09:48:30 +0000 (11:48 +0200)]
qemu-iotests: add support for the vdi image format

Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: add test for refcount table growth and snapshots
Kevin Wolf [Fri, 3 Jul 2009 15:45:56 +0000 (17:45 +0200)]
qemu-iotests: add test for refcount table growth and snapshots

015: Combined test to grow the refcount table and test snapshots.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoqemu-iotests: skip test 005 for vpc format images
Christoph Hellwig [Fri, 3 Jul 2009 15:41:58 +0000 (17:41 +0200)]
qemu-iotests: skip test 005 for vpc format images

The vpc format doesn't support large enough image size for this test.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqemu-iotests: Initial import into the public repository.
Christoph Hellwig [Mon, 22 Jun 2009 16:29:05 +0000 (18:29 +0200)]
qemu-iotests: Initial import into the public repository.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>