Statistics
| Branch: | Revision:

root / tests / qemu-iotests / iotests.py @ 0dbe8a1b

History | View | Annotate | Download (9.2 kB)

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

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

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

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

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

0fd05e8d 06/15/2012 03:03 pm Paolo Bonzini

qemu-iotests: start vms in qtest mode

This way, they will not execute any VM code at all. However, right now
the cancellation test is "relying" on being slowed down by TCG executing
BIOS code. So, change the timeouts.

Signed-off-by: Paolo Bonzini <>...

863a5d04 05/10/2012 11:32 am Paolo Bonzini

stream: fix sectors not allocated test

The test on sectors not allocated can fail if the L1/L2 tables are
not on disk yet. Allow tests to shutdown the VM early.

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

c68b039a 05/10/2012 11:32 am Paolo Bonzini

qemu-iotests: strip spaces from qemu-img/qemu-io/qemu command lines

A trailing space is left when qemu-img has no arguments, for example if
-nocache is not used. This becomes an empty argument after split()
and causes qemu-io to fail.

Signed-off-by: Paolo Bonzini <>...

f345cfd0 02/29/2012 04:48 pm Stefan Hajnoczi

qemu-iotests: add iotests Python module

Block layer tests that involve QMP commands rather than qemu-img or
qemu-io are not well-suited for shell scripting. This patch adds a
Python module which allows tests to be written in Python instead.

The basic API is:...