Statistics
| Branch: | Revision:

root / tests / qemu-iotests @ 5c1fa877

# Date Author Comment
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 <>

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

b53169ea 07/15/2013 10:49 am Stefan Hajnoczi

blockdev: add sync mode to drive-backup QMP command

The drive-backup command is similar to the drive-mirror command, except
no guest data written after the command executes gets copied. Add a
sync mode argument which determines whether the entire disk is copied,...

98289620 07/15/2013 10:49 am Kevin Wolf

block: Don't parse protocol from file.filename

One of the major reasons for doing something new for -blockdev and
blockdev-add was that the old block layer code parses filenames instead
of just taking them literally. So we should really leave it untouched...

7a370406 07/15/2013 10:49 am Kevin Wolf

qemu-iotests: Update 051 reference output

This has been broken by commit bd5c51ee.

Signed-off-by: Kevin Wolf <>

0dbe8a1b 06/28/2013 10:20 am Stefan Hajnoczi

qemu-iotests: extract wait_until_completed() into iotests.py

The 'drive-mirror' tests often issue 'block-job-complete' and wait for
the QMP completion event. Other types of block jobs also want to wait
for completion but they may not need to issue 'block-job-complete'....

e5ca8fdd 06/28/2013 10:20 am Stefan Hajnoczi

qemu-iotests: add 055 drive-backup test case

Testing drive-backup is similar to image streaming and drive mirroring.
This test case is based on 041.

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

492fdc6f 06/24/2013 11:25 am Kevin Wolf

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

This reverts commit 8ec7d390b0d50b5e5b4b1d8dba7ba40d64a70875.

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

5e00984a 06/06/2013 12:27 pm Kevin Wolf

cutils: Support 'P' and 'E' suffixes in strtosz()

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

ecc1c88e 06/04/2013 01:11 pm Stefan Hajnoczi

qemu-iotests: make assert_no_active_block_jobs() common

Tests 030 and 041 both use query-block-jobs to check whether any block
jobs are active. Make this code common so that 'drive-backup' and other
new feature tests will be able to reuse it.

Suggested-by: Kevin Wolf <>...

2575fe16 06/04/2013 01:11 pm Stefan Hajnoczi

qemu-iotests: make cancel_and_wait() common

The cancel_and_wait() function has been duplicated in 030 and 041. Move
it into iotests.py and let it return the event so tests can perform
additional asserts.

Note that 041's cancel_and_wait(wait_ready=True) is replaced by...

3a3918c3 06/04/2013 01:11 pm Stefan Hajnoczi

qemu-iotests: make compare_images() common

The iotests.compare_images() function returns True if two image files
have the identical data. Previously this was implemented by converting
images to raw and then comparing their contents using Python. Since
"qemu-img compare" is now available and is more efficient, switch to it....

2499a096 06/04/2013 01:11 pm Stefan Hajnoczi

qemu-iotests: make create_image() common

Both 030 and 041 use create_image(). Move it to iotests.py.

Also drop ImageStreamingTestCase since the class now has no methods.

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

8ddd08c5 06/04/2013 01:11 pm Stefan Hajnoczi

qemu-iotests: fix 054 cluster size help output

Commit f3f4d2c09b9cf46903ba38425ec46c44185162bd added a hint to increase
the cluster size when a large image cannot be created. Test 054 now has
outdated output and fails because the golden output does not match....

04129606 05/29/2013 04:16 pm Stefan Hajnoczi

tests: set MALLOC_PERTURB_ to expose memory bugs

glibc wipes malloc(3) memory when the MALLOC_PERTURB_ environment
variable is set. The value of the environment variable determines the
bit pattern used to wipe memory. For more information, see
http://udrepper.livejournal.com/11429.html....

c93331c9 05/24/2013 05:17 pm Kevin Wolf

qcow2.py: Subcommand for changing header fields

Signed-off-by: Kevin Wolf <>

bd91ecbf 05/24/2013 05:17 pm Kevin Wolf

qemu-iotests: Try creating huge qcow2 image

It's supposed to fail gracefully instead of segfaulting.

Signed-off-by: Kevin Wolf <>

794d00f7 05/08/2013 04:28 pm Fam Zheng

qemu-iotests: fix 017 018 for vmdk

017 and 018 use /bin/mv to move base img from t.IMGFMG to t.IMGFMT.base
after filling data, this is not enough for vmdk, when t.IMGFMT is only a
description text file who points to t-{flat,s001,f001,...}.IMGFMT as
data extent, so testing such subformats alway fails on them....

1afe2726 05/08/2013 04:28 pm Fam Zheng

qemu-iotests: exclude vmdk for test 042

Zero sized disk is not supported by qemu vmdk driver, exclude vmdk from
the test script.

As tested on vmware-vdiskmanager and vmware workstation, zero sized disk
is not supported by vmware, either.

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

dbcdd7cb 05/08/2013 04:28 pm Fam Zheng

qemu-iotests: exclude vmdk and qcow from 043

043 tests recursive backing file by changing backing file. VMDK has not
implemented this yet, and qcow1 probably never will.

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

86abefd6 05/03/2013 02:06 pm Fam Zheng

qemu-iotests: Filter out 'adapter_type'

Filter out vmdk creation option 'adapter_type' for vmdk. So that tests
with an explicit './check -o adapter_type=XXX' will not fail.

Signed-off-by: Stefan Hajnoczi <>

50522d96 05/03/2013 11:34 am Fam Zheng

qemu-iotests: Filter out vmdk creation options

Cover new image creation options for vmdk, so we can use '-o
zeroed_grain=XXX' and '-o subformat=XXX' to run the tests successfully.

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

8ec7d390 04/26/2013 02:26 pm Kevin Wolf

block: Disable driver-specific options for 1.5

We don't want to commit to the API yet before everything is worked out.
Disable it for the 1.5 release. This commit is meant to be reverted
after the 1.5 release.

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

7da94ca7 04/22/2013 12:37 pm Stefan Hajnoczi

qemu-iotests: add 053 unaligned compressed image size test

Test that qemu-img convert -c works when input image length is not a
multiple of the cluster size.

Previously an error message would be produced:

qemu-img: error while compressing sector 0: Input/output error...
2af5ef70 04/22/2013 11:27 am Kevin Wolf

block: Fail gracefully when using a format driver on protocol level

Specifying the wrong driver could fail an assertion:

$ qemu-system-x86_64 -drive file.driver=qcow2,file=x
qemu-system-x86_64: block.c:721: bdrv_open_common: Assertion `file !=
((void *)0)' failed....

bdda9232 04/22/2013 11:27 am Kevin Wolf

qemu-iotests: Fix _filter_qemu

$QEMU_PROG happens to be 'qemu' in my setup, so this sed command
replaces a bit too much. Restrict it to the start of the line and to
when it's followed by a colon, i.e. the form used by error messages.

Signed-off-by: Kevin Wolf <>...

c09b437b 04/15/2013 11:18 am Stefan Hajnoczi

qemu-iotests: filter QEMU_PROG in 051.out

Filter the name of the QEMU executable so the output can be diffed no
matter what QEMU_PROG is (e.g. qemu-system-x86_64).

Signed-off-by: Stefan Hajnoczi <>

342809e8 04/15/2013 11:18 am Richard W.M. Jones

iotests: Add 'check -ssh' option to test Secure Shell block device.

Note in order to run these tests on ssh, you must be running a local
ssh daemon, and that daemon must accept loopback connections, and
ssh-agent has to be set up to allow logins on the local daemon. In...

cf07aecf 04/15/2013 09:26 am Kevin Wolf

qemu-iotests: A few more bdrv_pread/pwrite tests

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

47e5df21 04/15/2013 09:26 am Kevin Wolf

qemu-iotests: Add test for -drive options

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

ecdd5333 03/28/2013 12:52 pm Kevin Wolf

qcow2: Gather clusters in a looping loop

Instead of just checking once in exactly this order if there are
dependendies, non-COW clusters and new allocation, this starts looping
around these. This way we can, for example, gather non-COW clusters after
new allocations as long as the host cluster offsets stay contiguous....

d9d74f41 03/28/2013 12:52 pm Kevin Wolf

qcow2: Improve check for overlapping allocations

The old code detected an overlapping allocation even when the
allocations didn't actually overlap, but were only adjacent.

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

6f749281 03/28/2013 12:52 pm Kevin Wolf

qemu-iotests: More concurrent allocation scenarios

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

c349ca4b 03/28/2013 12:52 pm Kevin Wolf

qcow2: Fix "total clusters" number in bdrv_check

This should be based on the virtual disk size, not on the size of the
image.

Interesting observation: With some VM state stored in the image file,
percentages higher than 100% are possible, even though snapshots...

f95e26dd 03/19/2013 12:48 pm Stefan Hajnoczi

qemu-iotests: add 052 BDRV_O_SNAPSHOT test

Check that writes to an image opened with BDRV_O_SNAPSHOT do not modify
the underlying image file.

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

acbf30ec 03/15/2013 05:07 pm Paolo Bonzini

qemu-iotests: add tests for rebasing zero clusters

If zero clusters are erroneously treated as unallocated, "qemu-img rebase"
will copy the backing file's contents onto the cluster.

The bug existed also in image streaming, but since the root cause was in...

804dd417 03/15/2013 05:07 pm Stefan Hajnoczi

qemu-iotests: use -nographic in test case 007

A comment explains that -nographic hangs test case 007. This is no
longer the case so add -nographic. This makes the test suite faster and
more pleasant to run since no windows pop up.

I am not sure exactly when -nographic starting working for this case but...

e930d201 02/22/2013 10:21 pm Miroslav Rezanina

qemu-iotests: Add qemu-img compare test

Simple test for qemu-img compare to check it's working correctly.

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

4dc9f9d6 02/22/2013 10:21 pm Kevin Wolf

qemu-iotests: Test qcow2 image creation options

Just create lots of images and try out each of the creation options that
qcow2 provides (except backing_file/fmt for now)

I'm not totally happy with the behaviour of qemu-img in each of the
cases, but let's be explicit and update the test when we do change...

e6439d78 02/22/2013 10:21 pm Stefan Hajnoczi

qemu-img: add compressed clusters to BlockFragInfo

Show how many clusters are compressed. This can be used to monitor how
many compressed clusters remain and whether to recompress the image.

Suggested-by: Cole Robinson <>
Signed-off-by: Stefan Hajnoczi <>

c6bb9ad1 02/22/2013 10:21 pm Federico Simoncelli

qemu-img: find the image end offset during check

This patch adds the support for reporting the image end offset (in
bytes). This is particularly useful after a conversion (or a rebase)
where the destination is a block device in order to find the first
unused byte at the end of the image....

b93d6d24 02/01/2013 03:58 pm Kevin Wolf

qemu-iotests: Add regression test for b7ab0fea

It turned out that the change in b7ab0fea was actually a real qcow2
corruption fix. This is a reproducer for the bug.

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

a04eca10 02/01/2013 03:58 pm Vishvananda Ishaya

block: Adds mirroring tests for resized images

This test verifies two mirroring issues are fixed with resized images:

  • sync='top' creates an image that is the proper size
  • sync='full' doesn't cause an assertion failure and crash qemu
    Reviewed-by: Paolo Bonzini <>...
08e4ed6c 01/25/2013 07:18 pm Paolo Bonzini

mirror: add buf-size argument to drive-mirror

This makes sense when the next commit starts using the extra buffer space
to perform many I/O operations asynchronously.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

b812f671 01/25/2013 07:18 pm Paolo Bonzini

mirror: perform COW if the cluster size is bigger than the granularity

When mirroring runs, the backing files for the target may not yet be
ready. However, this means that a copy-on-write operation on the target
would fill the missing sectors with zeros. Copy-on-write only happens...

91d4093d 12/12/2012 01:33 pm Kevin Wolf

qemu-iotests: Test concurrent cluster allocations

This adds some first tests for qcow2's dependency handling when two
parallel write requests access the same cluster.

Signed-off-by: Kevin Wolf <>

23e956bf 12/11/2012 12:05 pm Corey Bryant

tests: Add tests for fdsets

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

993d46ce 12/07/2012 01:34 pm Stefan Weil

Fix spelling in comments and documentation

These spelling bugs were found by codespell:

supressing -> suppressing
transfered -> transferred

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

d2ef210c 11/14/2012 07:19 pm Kevin Wolf

qemu-iotests: qcow2: Test growing large refcount table

Actually writing all the content with 512 byte sector size would take
forever, therefore build the image file with a Python script and use
qemu-io for the last write that actually triggers the refcount table...

a9660664 11/14/2012 07:19 pm Nick Thomas

tests: allow qemu-iotests to be run against nbd backend

To do this, we start a qemu-nbd process at _make_test_img and kill
it in _cleanup_test_img. $TEST_IMG is changed to point at the TCP
server. We also remove the checks for existence of binaries from
common.config - they're duplicated in common, and we can make the...

44c7ca5e 10/24/2012 11:26 am Paolo Bonzini

qemu-iotests: add mirroring test case

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

9dfa9f59 10/24/2012 11:26 am Paolo Bonzini

qemu-iotests: add testcases for mirroring on-source-error/on-target-error

The new options are tested with blkdebug on both the source and the
target.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

d5208c45 10/24/2012 11:26 am Jeff Cody

block: in commit, determine base image from the top image

This simplifies some code and error checking, and also fixes a bug.

bdrv_find_backing_image() should only be passed absolute filenames,
or filenames relative to the chain. In the QMP message handler for...

6bf0d1f4 10/24/2012 11:26 am Jeff Cody

qemu-iotests: add relative backing file tests for block-commit (040)

The previous block commit used absolute filenames for all block-commit
images and commands; this adds relative filenames for the same tests.

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

514d9da5 10/24/2012 11:26 am Stefan Hajnoczi

qemu-iotests: Add 043 backing file chain infinite loop test

This new test verifies that qemu-img info --backing-chain safely aborts
when an image file has a backing file infinite loop.

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

ee17f9d5 10/24/2012 11:26 am Kevin Wolf

qemu-iotests: Test qemu-img operation on zero size image

Signed-off-by: Kevin Wolf <>
Reviewed-by: Paolo Bonzini <>

4f450568 09/28/2012 08:40 pm Paolo Bonzini

qemu-iotests: map underscore to dash in QMP argument names

iotests.py provides a convenience function that uses Python keyword
arguments to represent QMP command arguments. However, almost all
QMP commands use dashes for argument names (the sole exception is...

90f0b711 09/28/2012 08:40 pm Paolo Bonzini

qemu-iotests: add tests for streaming error handling

Add a test for each of report/ignore/stop. The tests use blkdebug
to generate an error in the middle of a script. The error is
recoverable (once = "on") so that we can test resuming a job after
stopping for an error....

0c817347 09/28/2012 08:14 pm Paolo Bonzini

qemu-iotests: add test for pausing a streaming operation

These check that a paused streaming job does not advance its offset.

Sometimes the new test fails; the map is different between the source
and the destination of the streaming because qemu-io does not always...

747051cd 09/28/2012 07:55 pm Jeff Cody

qemu-iotests: add initial tests for live block commit

Derived from the streaming test cases (030), this adds the
following 9 tests:

1. For the following image chain, commit [mid] into [backing],
and use qemu-io to verify [backing] has its original data, as...

774a8850 08/29/2012 04:23 pm Stefan Hajnoczi

qemu-iotests: add backing file smaller than image test case

This new test case checks that streaming completes successfully when the
backing file is smaller than the image file.

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

58c8cce2 08/15/2012 04:14 pm Kevin Wolf

qemu-iotests: Fix 030 after switch to GenericError

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

353a41be 08/10/2012 11:25 am Kevin Wolf

qemu-iotests: Save some sed processes

Instead of building a huge pipeline, just pass all expressions to a
single sed process.

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

058f8f16 08/10/2012 11:25 am Stefan Hajnoczi

block: add BLOCK_O_CHECK for qemu-img check

Image formats with a dirty bit, like qed and qcow2, repair dirty image
files upon open with BDRV_O_RDWR. Performing automatic repair when
qemu-img check runs is not ideal because the bdrv_open() call repairs
the image before the actual bdrv_check() call from qemu-img.c....

166f3c7b 08/10/2012 11:25 am Stefan Hajnoczi

qemu-iotests: skip 039 with ./check -nocache

When the qemu-io --nocache option is used the 039 test case cannot abort
QEMU at a point where the image is dirty. Skip the test case.

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