diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2013-05-28 17:11:34 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-06-04 12:11:58 +0200 |
commit | ecc1c88efddb376687084c3387c38b3a458c5892 (patch) | |
tree | 875aee8594e5035ca04ab2b31580c360d80609f7 /tests/qemu-iotests/iotests.py | |
parent | b64ec4e4ade581d662753cdeb0d7e0e27aafbf81 (diff) | |
download | hqemu-ecc1c88efddb376687084c3387c38b3a458c5892.zip hqemu-ecc1c88efddb376687084c3387c38b3a458c5892.tar.gz |
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 <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
-rw-r--r-- | tests/qemu-iotests/iotests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 569ca3d..0e7862c 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -170,6 +170,10 @@ class QMPTestCase(unittest.TestCase): result = self.dictpath(d, path) self.assertEqual(result, value, 'values not equal "%s" and "%s"' % (str(result), str(value))) + def assert_no_active_block_jobs(self): + result = self.vm.qmp('query-block-jobs') + self.assert_qmp(result, 'return', []) + def notrun(reason): '''Skip this test suite''' # Each test in qemu-iotests has a number ("seq") |