mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
4f45056841
commit
90f0b71153
3 changed files with 229 additions and 2 deletions
|
@ -138,6 +138,13 @@ class QMPTestCase(unittest.TestCase):
|
|||
self.fail('invalid index "%s" in path "%s" in "%s"' % (idx, path, str(d)))
|
||||
return d
|
||||
|
||||
def assert_qmp_absent(self, d, path):
|
||||
try:
|
||||
result = self.dictpath(d, path)
|
||||
except AssertionError:
|
||||
return
|
||||
self.fail('path "%s" has value "%s"' % (path, str(result)))
|
||||
|
||||
def assert_qmp(self, d, path, value):
|
||||
'''Assert that the value for a specific path in a QMP dict matches'''
|
||||
result = self.dictpath(d, path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue