summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-17 08:36:14 +0100
committerKevin Wolf <kwolf@redhat.com>2015-03-19 16:02:59 +0100
commit5b347c541017b9ced10e8e9bce02d25bcf04c7af (patch)
tree0fcb4825e960133b9bd83cc39ce5dff9a39c2b00 /tests
parent965182549cee6fa337f0e72cde4d5787f35f33ac (diff)
downloadqemu-5b347c541017b9ced10e8e9bce02d25bcf04c7af.tar.gz
block: Fix blockdev-backup not to use funky error class
Error classes are a leftover from the days of "rich" error objects. New code should always use ERROR_CLASS_GENERIC_ERROR. Commit b7b9d39..7c6a4ab added uses of ERROR_CLASS_DEVICE_NOT_FOUND. Replace them. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qemu-iotests/05511
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055
index e81d4d0d83..017a609f39 100755
--- a/tests/qemu-iotests/055
+++ b/tests/qemu-iotests/055
@@ -126,7 +126,10 @@ class TestSingleDrive(iotests.QMPTestCase):
def do_test_device_not_found(self, cmd, **args):
result = self.vm.qmp(cmd, **args)
- self.assert_qmp(result, 'error/class', 'DeviceNotFound')
+ if cmd == 'drive-backup':
+ self.assert_qmp(result, 'error/class', 'DeviceNotFound')
+ else:
+ self.assert_qmp(result, 'error/class', 'GenericError')
def test_device_not_found(self):
self.do_test_device_not_found('drive-backup', device='nonexistent',
@@ -364,7 +367,7 @@ class TestSingleTransaction(iotests.QMPTestCase):
'sync': 'full' },
}
])
- self.assert_qmp(result, 'error/class', 'DeviceNotFound')
+ self.assert_qmp(result, 'error/class', 'GenericError')
result = self.vm.qmp('transaction', actions=[{
'type': 'blockdev-backup',
@@ -373,7 +376,7 @@ class TestSingleTransaction(iotests.QMPTestCase):
'sync': 'full' },
}
])
- self.assert_qmp(result, 'error/class', 'DeviceNotFound')
+ self.assert_qmp(result, 'error/class', 'GenericError')
result = self.vm.qmp('transaction', actions=[{
'type': 'blockdev-backup',
@@ -382,7 +385,7 @@ class TestSingleTransaction(iotests.QMPTestCase):
'sync': 'full' },
}
])
- self.assert_qmp(result, 'error/class', 'DeviceNotFound')
+ self.assert_qmp(result, 'error/class', 'GenericError')
def test_target_is_source(self):
result = self.vm.qmp('transaction', actions=[{