mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
b64ec4e4ad
commit
ecc1c88efd
3 changed files with 57 additions and 61 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue