qemu-iotests: make cancel_and_wait() common
commit2575fe16d257a1fb5f452391b868b3c3263a9aca
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 28 May 2013 15:11:35 +0000 (28 17:11 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 4 Jun 2013 10:11:58 +0000 (4 12:11 +0200)
treebcd4be28f1c473e36c1ad00b2fcb47dd2dd7f8b9
parentecc1c88efddb376687084c3387c38b3a458c5892
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
wait_ready_and_cancel(), which uses the new wait_ready() and
cancel_and_wait() underneath.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/030
tests/qemu-iotests/041
tests/qemu-iotests/iotests.py