Statistics
| Branch: | Revision:

root / tests / qemu-iotests @ 30bd6a4d

# Date Author Comment
505d7583 01/22/2014 01:07 pm Max Reitz

block: Allow recursive "file"s

It should be possible to use a format as a driver for a file which in
turn requires another file, i.e., nesting file formats.

Allowing nested file formats results in e.g. qcow2 BlockDriverStates
never being directly passed to bdrv_open_common() from bdrv_file_open(),...

30bd6a4d 01/22/2014 01:07 pm Max Reitz

iotests: Test new blkdebug/blkverify interface

Add a test for the new blkdebug/blkverify interface.

This test is not written in Python, although it uses QMP. This is
because it invokes the qemu-io HMP command, which outputs errors to
stderr instead of returning them through QMP. Filtering and testing that...

2c77f52e 01/22/2014 01:07 pm Fam Zheng

qemu-iotests: Introduce _unsupported_imgopts

Introduce _unsupported_imgopts that causes _notrun for specific image
options.

Signed-off-by: Fam Zheng <>
Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Kevin Wolf <>

d2329f27 01/22/2014 01:07 pm Fam Zheng

qemu-iotests: Add _unsupported_imgopts for vmdk subformats

Some cases are not applicable for vmdk subformats those don't support
certain features, e.g. backing file, and some others can't run on
mult-file image, e.g. monolithicFlat. This adds declaration in test...

487c1910 01/22/2014 01:07 pm Fam Zheng

qemu-iotests: Clean up all extents for vmdk

This modifies _cleanup_test_img to remove all the extent files listed by
"qemu-img info"'s format specific information.

Signed-off-by: Fam Zheng <>
Signed-off-by: Stefan Hajnoczi <>...

585ea0c8 01/22/2014 01:07 pm Fam Zheng

vmdk: Fix big flat extent IO

Local variable "n" as int64_t avoids overflow with large sector number
calculation. See test case change for failure case.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

4de43470 12/20/2013 05:26 pm Fam Zheng

qemu-iotests: Update test cases for commit active

Factor out commit test common logic into super class, and update test
of committing the active image.

Signed-off-by: Fam Zheng <>
Signed-off-by: Stefan Hajnoczi <>

de99c417 12/20/2013 02:57 pm Stefan Hajnoczi

qemu-iotests: drop duplicate virtio-blk initialization failure

Commit 75884afd5c6c42e523b08565e289dbe319e17ad9 ("virtio-blk: Convert to
QOM realize") dropped a duplicate error_report() call. Now we no longer
get the following error message twice:

QEMU_PROG: -drive if=virtio: Device initialization failed....
b47053bd 12/20/2013 10:11 am Fam Zheng

vmdk: Check VMFS extent line field number

VMFS extent line in description file should be with 4 fields:

RW &lt;size&gt; VMFS "file-name.vmdk"

Check the number explicitly and report error if offset is appended as
FLAT, which should be invalid format.

Reported-by: Paolo Bonzini <>...

ac9524dc 12/06/2013 05:53 pm Stefan Hajnoczi

qemu-iotests: filter QEMU monitor \r\n

SMTP does not preserve newlines. This is normally not a problem if the
email body uses DOS or UNIX newlines consistently. In 051.out we mix
UNIX newlines with DOS newlines (since QEMU monitor output uses \r\n).

This patch filters the QEMU monitor output so the golden master file...

9c468a01 12/04/2013 04:19 pm Wenchao Xia

qemu-iotests: add 058 internal snapshot export with qemu-nbd case

This case can't run when IMGPROTO=nbd, since it needs to create some
internal snapshot which would fail for EOF write request, even when
TEST_IMG is exported with "-f raw" in common.rc, so set _supported_proto...

f33d2873 12/04/2013 04:19 pm Wenchao Xia

qemu-iotests: add test for snapshot in qemu-img convert

Signed-off-by: Wenchao Xia <>
Signed-off-by: Stefan Hajnoczi <>

34602dd6 12/04/2013 03:31 pm Fam Zheng

qemu-iotests: Split qcow2 only cases in 048

Format "raw" doesn't always work on certain file systems (e.g. tmpfs).
Use qcow2 to make the allocation status explicit and split into a new
case.

[Resolved merge conflict due to "qemu-io> " prompt filter, added 074 to...

3baa8449 12/04/2013 12:55 pm Fam Zheng

qemu-iotests: Add "-c <cache-mode>" option

The option sets cache mode used in the tests. "-nocache" is changed to
an alias to "-c none", and internally passes "-t none" to qemu-io.

Python scripts will make use of option this in the next commit.

Signed-off-by: Fam Zheng <>...

58cc2ae1 12/04/2013 12:55 pm Fam Zheng

qemu-iotests: Honour cache mode in iotests.py

This will allow overriding cache mode from the "-c mode" option.

Signed-off-by: Fam Zheng <>
Reviewed-by: Wenchao Xia <>
Signed-off-by: Stefan Hajnoczi <>

f210a83c 12/04/2013 12:55 pm Fam Zheng

qemu-iotests: Add _default_cache_mode and _supported_cache_modes

This replaces _unsupported_qemu_io_options and check for support of
current cache mode, and allow to provide a default if user didn't
specify.

Signed-off-by: Fam Zheng <>
Reviewed-by: Wenchao Xia <>...

e14fb913 12/04/2013 12:55 pm Fam Zheng

qemu-iotests: Change default cache mode to "writeback"

So that the tests can run faster.

Signed-off-by: Fam Zheng <>
Reviewed-by: Wenchao Xia <>
Signed-off-by: Stefan Hajnoczi <>

236c7964 12/04/2013 12:55 pm Fam Zheng

qemu-iotests: Clean up spaces in usage output

Whitespace changes to align columns.

Signed-off-by: Fam Zheng <>
Reviewed-by: Benoit Canet <>
Signed-off-by: Stefan Hajnoczi <>

e18d90c1 12/03/2013 04:26 pm Paolo Bonzini

qemu-iotests: 033 is fast

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Stefan Hajnoczi <>

af057fe7 12/03/2013 10:54 am Fam Zheng

vmdk: Fix creating big description file

The buffer for description file was 4096 which only covers a few
hundred of extents. This changes the buffer to dynamic allocated with
g_strdup_printf in order to support bigger cases.

Signed-off-by: Fam Zheng <>...

981cbf59 11/29/2013 06:41 pm Fam Zheng

qemu-iotests: Add sample image and test for VMDK version 3

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

0d83c98b 11/29/2013 06:41 pm Fam Zheng

qemu-iotests: Filter qemu-io output in 025

Signed-off-by: Fam Zheng <>
Reviewed-by: Eric Blake <>
Signed-off-by: Kevin Wolf <>

c34b8012 11/29/2013 06:41 pm Fam Zheng

qemu-iotests: Filter out 'qemu-io> ' prompt

This removes "qemu-io> " prompt from qemu-io output in _filter_qemu_io,
and updates all the output files with the following command:

cd tests/qemu-iotests && sed -i "s/qemu-io> //g" *.out

Signed-off-by: Fam Zheng <>...

5b43dbb6 11/29/2013 02:40 pm Fam Zheng

qemu-iotests: Drop local version of cancel_and_wait from 040

iotests.py already has one.

Signed-off-by: Fam Zheng <>
Signed-off-by: Stefan Hajnoczi <>

3cf53c77 11/29/2013 02:40 pm Fam Zheng

qemu-iotest: Add pause_drive and resume_drive methods

They wrap blkdebug "break" and "remove_break".

Add optional argument "resume" to cancel_and_wait().

Signed-off-by: Fam Zheng <>
Signed-off-by: Stefan Hajnoczi <>

b59b3d57 11/29/2013 02:40 pm Fam Zheng

qemu-iotests: Make test case 030, 040 and 055 deterministic

Pause the drive and start the block job, so we won't miss the block job.

Signed-off-by: Fam Zheng <>
Signed-off-by: Stefan Hajnoczi <>

f32f988c 11/29/2013 02:40 pm Kevin Wolf

qemu-iotests: Test snapshot mode

Signed-off-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>

171d6431 11/27/2013 05:53 pm Max Reitz

qemu-iotests: Fix test 041

Performing multiple drive-mirror blockjobs on the same qemu instance
results in the image file used for the block device being replaced by
the newly mirrored file, which is not what we want.

Fix this by performing one dedicated test per sync mode....

36452f12 11/15/2013 02:37 pm Fam Zheng

qemu-img: Fix overwriting 'ret' before using

This patch moves ret assignment after reporting original error.

We were lucky to pass qemu-iotests 048 (qemu-img compare case) but when
I tried to run with TEST_DIR=/tmp (tmpfs), it fails with a "wrong"
mismatch offset. This fixes two bugs....

06d22aa3 11/15/2013 02:37 pm Kevin Wolf

block: Fail if requested driver is not available

If an explicit driver option is present, but doesn't specify a valid
driver, then bdrv_open() should fail instead of probing the format.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Jeff Cody <>...

a1144c0d 11/15/2013 02:37 pm Kevin Wolf

qemu-iotests: Test qcow2 count_contiguous_clusters()

Signed-off-by: Kevin Wolf <>
Reviewed-by: Stefan Hajnoczi <>

b04b6b6e 11/14/2013 02:09 pm Fam Zheng

block: Print its file name if backing file opening failed

If backing file doesn't exist, the error message is confusing and
misleading:

$ qemu /tmp/a.qcow2
qemu: could not open disk image /tmp/a.qcow2: Could not open file: No
such file or directory...
c15badee 11/14/2013 02:09 pm Max Reitz

qemu-iotests: Extend 041 for unbacked mirroring

Add a new test case in file 041 for mirroring unbacked images in
"absolute-paths" mode. This should work, if possible, but most
importantly, qemu should never crash.

Signed-off-by: Max Reitz <>...

228b234d 11/07/2013 02:58 pm Jeff Cody

block: vhdx - update _make_test_img() to filter out vhdx options

The non-global option output is suppresed in _make_test_img() for
output verification in the 0?? tests. This adds suppression for
the vhdx-unique options as well. This allows check -vhdx to run...

751aec24 11/07/2013 02:58 pm Jeff Cody

block: qemu-iotests for vhdx, add write test support

This removes the IMGFMT_GENERIC blocker for read-only, so existing
iotests run read/write tests for vhdx images created by qemu-img (e.g.
tests 001, 002, 003).

In addition, this updates the sample image test for the Hyper-V...

e78835b7 11/07/2013 02:58 pm Jeff Cody

block: vhdx qemu-iotest - log replay of data sector

This tests the replay of a data sector in a VHDX image file.

The image file is a 10G dynamic image, with 4MB block size. The
image was created with qemu-img, and the log left unplayed by
modification of the vhdx image format driver....

00840438 11/07/2013 02:53 pm Jeff Cody

block: qemu-iotests, add quotes to $TEST_IMG usage io pattern tests

The usage of $TEST_IMG was not properly quoted everywhere in
common.pattern.

Signed-off-by: Jeff Cody <>
Reviewed-by: Eric Blake <>
Signed-off-by: Stefan Hajnoczi <>

0018c03f 11/07/2013 02:53 pm Jeff Cody

block: qemu-iotests, fix _make_test_img() to work with spaced pathnames

_make_test_img() currently works with spaced pathnames only when not
specifying a backing file. This fixes it so that the backing file
argument is properly quoted.

Signed-off-by: Jeff Cody <>...

02cde168 11/07/2013 02:53 pm Jeff Cody

block: qemu-iotests, add quotes to $TEST_IMG.base usage in 017

$TEST_IMG.base is used unquoted. Add quotes so that pathnames with
spaces are supported.

Signed-off-by: Jeff Cody <>
Reviewed-by: Eric Blake <>
Signed-off-by: Stefan Hajnoczi <>

3cbe3e8d 11/07/2013 02:53 pm Jeff Cody

block: qemu-iotests, add quotes to $TEST_IMG usage in 019

There were still instances of $TEST_IMG not being properly quoted.
This was in the usage of a string built up for a 'for' loop; modify
the loop so we can quote $TEST_IMG properly.

Signed-off-by: Jeff Cody <>...

f897e393 11/07/2013 02:53 pm Jeff Cody

block: qemu-iotests, removes duplicate double quotes in 039

Test 039 had $TEST_IMG with duplicate double quotes - remove duplicate.

Signed-off-by: Jeff Cody <>
Reviewed-by: Eric Blake <>
Signed-off-by: Stefan Hajnoczi <>

1ab39193 11/07/2013 02:53 pm Jeff Cody

block: qemu-iotests, add quotes to $TEST_IMG usage for 051

There were still a couple of instances of unquoted usage of
$TEST_IMG and $TEST_IMG.orig. Quoted these so they will not fail
on pathnames with spaces in them.

Signed-off-by: Jeff Cody <>...

db5dc557 11/07/2013 02:53 pm Jeff Cody

block: qemu-iotests, add quotes to $TEST_IMG usage in 061

When creating images with backing files in the test, the backing
file argument was not quoted properly. This caused the test to fail
when run from a pathname with a space. Pass the backing argument in...

64815e2a 11/07/2013 02:53 pm Max Reitz

qemu-iotests: Filter out actual image size in 067

The actual size of the image file may differ depending on the Linux
kernel currently running on the host. Filtering out this value makes
this test pass in such cases.

Signed-off-by: Max Reitz <>...

f4c129a3 10/31/2013 03:44 pm Fam Zheng

vmdk: Implment bdrv_get_specific_info

Implement .bdrv_get_specific_info to return the extent information.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

7890111b 10/30/2013 01:51 pm Fam Zheng

qemu-iotests: prefill some data to test image

Case 030 occasionally fails because of block job compltes too fast to be
captured by script, and 'unexpected qmp event' of job completion causes
the test failure.

Simply fill in some data to the test image to make this false alarm less...

321fd7d2 10/30/2013 01:16 pm Max Reitz

qemu-iotests: Test case for backing file deletion

Add a test case for trying to open an image file where it is impossible
to open its backing file (in this case, because it was deleted). When
doing this, qemu (or qemu-io in this case) should not crash but rather...

915365a9 10/30/2013 12:58 pm Fam Zheng

qemu-iotests: drop duplicated "create_image"

There's a same common function in iotests.py

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

a7cf03d4 10/29/2013 06:05 pm Kevin Wolf

qemu-iotests: Fix 051 reference output

Commit 684b254 forgot to update it.

Signed-off-by: Kevin Wolf <>

ab6f2bbb 10/25/2013 12:08 pm Max Reitz

qemu-iotests: Test for loading VM state from qcow2

Add a test for saving a VM state from a qcow2 image and loading it back
(with having restarted qemu in between); this should work without any
problems.

Signed-off-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

a9b43397 10/11/2013 05:50 pm Kevin Wolf

qemu-iotests: Check autodel behaviour for device_del

Block devices creates with -drive and drive_add should automatically
disappear if the guest device is unplugged. blockdev-add ones shouldn't.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Max Reitz <>...

34eeb82d 10/11/2013 05:50 pm Max Reitz

qemu-iotests: Add test for inactive L2 overlap

Extend 060 by a test which creates a corrupted image with an active L2
entry pointing to an inactive L2 table and writes to the corresponding
guest offset.

Also, use overlap-check=all for all tests in 060.
...

4823970b 10/11/2013 05:50 pm Fam Zheng

vmdk: convert error code to use errp

Convert "fprintf(stderr,..." and standardize error messages:

Remove a few local_error's and use errp.

Remove "VMDK:" or "Vmdk:" prefixes in error message and fix to upper
case.

Signed-off-by: Fam Zheng <>...

52c8d629 10/11/2013 05:50 pm Fam Zheng

vmdk: refuse enabling zeroed grain with flat images

This is a header flag and we needs sparse for the header.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

4f8a066b 10/11/2013 05:50 pm Kevin Wolf

blockdev: Remove IF_* check for read-only blockdev_init

IF_NONE allows read-only, which makes forbidding it in this place
for other types pretty much pointless.

Instead, make sure that all devices for which the check would have
errored out check in their init function that they don't get a read-only...

5dd75f9a 10/11/2013 05:50 pm Fam Zheng

qemu-iotests: move blank lines of output in case 059

Move the blank line to above the test step banner, so it looks clearer
in blocks.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

e428e439 10/11/2013 05:50 pm Max Reitz

block/raw-posix: Employ error parameter

Make use of the error parameter in the opening and creating functions in
block/raw-posix.c.

Signed-off-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

975a93c0 10/11/2013 05:49 pm Max Reitz

qemu-iotests: Discard preallocated zero clusters

Add a new test case for discarding preallocated zero clusters; doing
this should not result in any leaks.

Signed-off-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

89e91181 10/11/2013 05:49 pm Jeff Cody

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....

3677e6f6 10/11/2013 05:49 pm Max Reitz

qemu-iotests: Additional info from qemu-img info

Add a test for the additional information now provided by qemu-img info
when used on qcow2 images. It also tests the qemu QMP output from the
query-block command when running qemu with different runtime options...

4c2e9465 10/11/2013 03:04 pm Max Reitz

qemu-iotests: Discard specific info in _img_info

In _img_info, filter out additional information specific to the image
format provided by qemu-img info, since tests designed for multiple
image formats would produce different outputs for every image format...

a1071705 10/09/2013 05:54 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/block' into staging

  1. By Max Reitz (5) and others
  2. Via Stefan Hajnoczi
    • stefanha/block:
      block: use correct filename
      qemu-iotests: Correct 026 output
      qcow2: Free allocated L2 cluster on error
      qcow2: Switch L1 table in a single sequence...
5c1fa877 10/07/2013 02:23 pm Max Reitz

qemu-iotests: Correct 026 output

Because l2_allocate now frees the unused L2 cluster on error, the
according test cases in 026 don't result in one leaked cluster anymore.

Signed-off-by: Max Reitz <>
Signed-off-by: Stefan Hajnoczi <>

d1c295f5 10/01/2013 03:06 pm Fam Zheng

.gitignore: ignore tests/qemu-iotests/socket_scm_helper

Signed-off-by: Fam Zheng <>
Reviewed-by: Wenchao Xia<>
Signed-off-by: Michael Tokarev <>

fd9e03e6 09/27/2013 12:16 pm Max Reitz

qemu-iotests: Preallocated zero clusters in 061

Add a test case for zero cluster expansion on an image completely filled
with preallocated zero clusters to test 061.

Signed-off-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

fef9c191 09/27/2013 12:10 pm Jeff Cody

qemu-iotests: Quote $TEST_IMG* and $TEST_DIR usage

A lot of image filename and paths are used unquoted. Quote these to
make sure that directories / filenames with spaces are not problematic.

Signed-off-by: Jeff Cody <>
Reviewed-by: Stefan Hajnoczi <>...

85edbd37 09/27/2013 11:59 am Jeff Cody

qemu-iotests: Add basic ability to use binary sample images

For image formats that are not "QEMU native", but supported for
compatibility, it is useful to verify that an image created with
the 'gold standard' native tool can be read / written to successfully...

212774c5 09/26/2013 05:04 pm Fam Zheng

qemu-iotests: fix qmp.py search path

QMP/qmp.py is renamed to scripts/qmp/qmp.py, fix the search path in iotests.py.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

fc7ce63f 09/25/2013 05:21 pm Fam Zheng

qemu-iotests: fix test case 059

Since commit "block: Error parameter for open functions", error output
is more verbose. Update test case output file to follow the change.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

2fe2e290 09/25/2013 05:21 pm Fam Zheng

qemu-iotests: add monolithicFlat creation test to 059

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

4db9c980 09/25/2013 11:08 am Fam Zheng

qemu-iotests: add test for backing file overriding

Test that backing.file.filename option can be parsed and override the
backing file from image (backing file reflected with "info block").

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

ff42308f 09/25/2013 11:08 am Max Reitz

qemu-iotests: Do not execute 052 with -nocache

Test 052 uses qemu-io -s which will result in bdrv_open trying to create
a temporary snapshot file in /tmp. However, since O_DIRECT and tmpfs
do not work well together, disable this test for -nocache.

Signed-off-by: Max Reitz <>...

c21bddf2 09/13/2013 01:02 pm Max Reitz

qemu-iotests: Fix test 038

Test 038 uses asynchronous I/O, resulting (potentially) in a different
output for every run (regarding the order of the I/O accesses). This can
be fixed by simply sorting the I/O access messages, since their order is
irrelevant anyway (for this asynchonous I/O)....

4aa846f2 09/12/2013 02:54 pm Bharata B Rao

qemu-iotests: Cleanup test image in test number 007

qemu-iotests number 007 doesn't do test image cleanup. This will affect
those protocols that expect a clean state before every test. Hence
ensure that test image is cleaned up in this test.

Signed-off-by: Bharata B Rao <>...

2c78857b 09/12/2013 11:12 am Max Reitz

qemu-iotests: Adjustments due to error propagation

When opening/creating images, propagating errors instead of immediately
emitting them on occurrence results in errors generally being printed on
a single line rather than being split up into multiple ones. This in...

fd9c577b 09/12/2013 11:12 am Wenchao Xia

qemu-iotests: add tests for runtime fd passing via SCM rights

This case will test whether the monitor can receive fd at runtime.
To verify better, additional monitor is created to see if qemu
can handler two monitor instances correctly.

Signed-off-by: Wenchao Xia <>...

d982919d 09/12/2013 11:12 am Max Reitz

qemu-iotests: New test case in 061

Add one test case for zero cluster expansion on qcow2 version downgrade
in shared L2 tables (i.e., L2 tables with a refcount > 1) and one for
zero expansion on backed clusters in shared L2 tables.

Signed-off-by: Max Reitz <>...

8023090b 09/12/2013 11:12 am Wenchao Xia

qemu-iotests: add 057 internal snapshot for block device test case

Create in transaction and deletion in single command will be tested.

Signed-off-by: Wenchao Xia <>
Signed-off-by: Kevin Wolf <>

a8110c3d 09/12/2013 11:12 am Max Reitz

qemu-iotest: qcow2 image option amendment

Add tests for qemu-img amend on qcow2 image files.

Signed-off-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

f93296ea 09/12/2013 11:12 am Wenchao Xia

qemu-iotests: add unix socket help program

This program can do a sendmsg call to transfer fd with unix
socket, which is not supported in python2.

The built binary will not be deleted in clean, but it is a
existing issue in ./tests, which should be solved in another...

30b005d9 09/12/2013 11:12 am Wenchao Xia

qemu-iotests: add infrastructure of fd passing via SCM

This patch make use of the compiled scm helper program to transfer
fd via unix socket at runtime.

Signed-off-by: Wenchao Xia <>
Reviewed-by: Stefan Hajnoczi <>...

8f94b077 09/06/2013 04:25 pm Kevin Wolf

qemu-iotests: Fixed test case 026

The reference output for test case 026 hasn't been updated in a long
time and it's one of the "known failing" cases. This patch updates the
reference output so that unintentional changes can be reliably detected
again.

The problem with this test case is that it produces different output...

79e40ab1 09/06/2013 04:25 pm Kevin Wolf

qemu-iotests: Whitespace cleanup

These scripts used to have a four characters indentation, with eight
consecutive spaces converted into a tab. Convert everything into spaces.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

b3f3a30f 09/06/2013 04:25 pm Max Reitz

qemu-iotests: Adjust test result 039

The moved OFLAG_COPIED check in qcow2_check_refcounts results in a
different output from test 039 (mismatches are now found after the
general refcount check (as far as any remain)). This patch adjusts the
expected test result accordingly....

b2e10493 09/06/2013 04:25 pm Alexandre Derumier

add qemu-img convert -n option (skip target volume creation)

Add a -n option to skip volume creation on qemu-img convert.
This is useful for targets such as rbd / ceph, where the
target volume may already exist; we cannot always rely on
qemu-img convert to create the image, as dependent on the...

ca0eca91 09/02/2013 11:15 am Max Reitz

qemu-iotests: Overlapping cluster allocations

A new test on corrupted images with overlapping cluster allocations.

Signed-off-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

69c98726 08/30/2013 04:48 pm Max Reitz

qcow2: Add corrupt bit

This adds an incompatible bit indicating corruption to qcow2. Any image
with this bit set may not be written to unless for repairing (and
subsequently clearing the bit if the repair has been successful).

Signed-off-by: Max Reitz <>...

c0447d87 08/30/2013 04:28 pm Kevin Wolf

Revert "block: Disable driver-specific options for 1.6"

This reverts commit 8afaefb8919dc8746a57c450a758717c516c7b0a.

Signed-off-by: Kevin Wolf <>

cccc30b4 08/30/2013 04:28 pm Kevin Wolf

qemu-iotests: Update reference output for 051

Signed-off-by: Kevin Wolf <>

449df706 08/30/2013 04:28 pm Max Reitz

qemu-iotests: Snapshotting zero clusters

This test creates an image with unallocated zero clusters, then creates
a snapshot. Afterwards, there should be neither any errors nor leaks.

Signed-off-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

23ea2ecc 08/06/2013 04:27 pm Stefan Hajnoczi

qemu-iotests: add poke_file utility function

The new poke_file function sets bytes at an offset in a file given a
printf-style format string. It can be used to corrupt an image file for
test coverage of error paths.

Signed-off-by: Stefan Hajnoczi <>...

ca6cbb65 08/06/2013 04:27 pm Fam Zheng

qemu-iotests: add empty test case for vmdk

Will add vmdk specific tests later here.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

8aa1331c 08/06/2013 04:27 pm Fam Zheng

vmdk: check granularity field in opening

Granularity is used to calculate the cluster size and allocate r/w
buffer. Check the value from image before using it, so we don't abort()
for unbounded memory allocation.

Signed-off-by: Fam Zheng <>...

f8ce0403 08/06/2013 04:27 pm Fam Zheng

vmdk: check l2 table size when opening

header.num_gtes_per_gte determines size for L2 table. Check for too big
value before using it. Limit to 512M entries (2GB per one L2 table).

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

2c43e43c 08/06/2013 04:27 pm Fam Zheng

vmdk: check l1 size before opening image

L1 table size is calculated from capacity, granularity and l2 table
size. If capacity is too big or later two are too small, the L1 table
will be too big to allocate in memory. Limit it to a reasonable range.

Signed-off-by: Fam Zheng <>...

9580498b 08/06/2013 11:41 am Stefan Hajnoczi

qemu-iotests: filter QEMU version in monitor banner

Filter out the QEMU monitor version banner so that tests do not break
when the QEMU version number is changed.

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Kevin Wolf <>

8afaefb8 08/02/2013 07:21 pm Kevin Wolf

block: Disable driver-specific options for 1.6

We don't want to commit to the API yet before everything is worked out.
Like already for 1.5, disable it again for the 1.6 release. This commit
is meant to be reverted after the 1.6 release.

The disabling of the driver-specific options is achieved by applying the...

e3409362 07/26/2013 11:01 pm Ian Main

Add tests for sync modes 'TOP' and 'NONE'

This patch adds tests for sync modes top and none. Test for 'TOP'
is separated out as it requires a backing file. Also added a test
for invalid format.

Signed-off-by: Ian Main <>
Signed-off-by: Kevin Wolf <>

0f227a94 07/26/2013 11:01 pm Kevin Wolf

blockdev: Rename 'readonly' option to 'read-only'

Option name cleanup before it becomes a QMP API.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>

64aa99d3 07/26/2013 10:59 pm Kevin Wolf

qcow2: Use dashes instead of underscores in options

This is what QMP wants to use. The options haven't been enabled in any
release yet, so we're still free to change them.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>