mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
qemu-iotests: s390x: fix test 041 and 055
There is no 'ide-cd' device defined on non-pc platform, so test_medium_not_found() test should be skipped. Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Michael Mueller <mimu@linux.vnet.ibm.com> Reviewed-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Signed-off-by: Xiao Guang Chen <chenxg@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
2711fd33a4
commit
d8683155fa
2 changed files with 15 additions and 0 deletions
|
@ -167,6 +167,9 @@ class TestSingleDrive(iotests.QMPTestCase):
|
||||||
'target image does not match source after mirroring')
|
'target image does not match source after mirroring')
|
||||||
|
|
||||||
def test_medium_not_found(self):
|
def test_medium_not_found(self):
|
||||||
|
if iotests.qemu_default_machine != 'pc':
|
||||||
|
return
|
||||||
|
|
||||||
result = self.vm.qmp('drive-mirror', device='ide1-cd0', sync='full',
|
result = self.vm.qmp('drive-mirror', device='ide1-cd0', sync='full',
|
||||||
target=target_img)
|
target=target_img)
|
||||||
self.assert_qmp(result, 'error/class', 'GenericError')
|
self.assert_qmp(result, 'error/class', 'GenericError')
|
||||||
|
@ -831,6 +834,9 @@ class TestRepairQuorum(iotests.QMPTestCase):
|
||||||
if not self.has_quorum():
|
if not self.has_quorum():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if iotests.qemu_default_machine != 'pc':
|
||||||
|
return
|
||||||
|
|
||||||
result = self.vm.qmp('drive-mirror', device='ide1-cd0', sync='full',
|
result = self.vm.qmp('drive-mirror', device='ide1-cd0', sync='full',
|
||||||
node_name='repair0',
|
node_name='repair0',
|
||||||
replaces='img1',
|
replaces='img1',
|
||||||
|
|
|
@ -104,11 +104,17 @@ class TestSingleDrive(iotests.QMPTestCase):
|
||||||
self.do_test_pause('blockdev-backup', 'drive1', blockdev_target_img)
|
self.do_test_pause('blockdev-backup', 'drive1', blockdev_target_img)
|
||||||
|
|
||||||
def test_medium_not_found(self):
|
def test_medium_not_found(self):
|
||||||
|
if iotests.qemu_default_machine != 'pc':
|
||||||
|
return
|
||||||
|
|
||||||
result = self.vm.qmp('drive-backup', device='ide1-cd0',
|
result = self.vm.qmp('drive-backup', device='ide1-cd0',
|
||||||
target=target_img, sync='full')
|
target=target_img, sync='full')
|
||||||
self.assert_qmp(result, 'error/class', 'GenericError')
|
self.assert_qmp(result, 'error/class', 'GenericError')
|
||||||
|
|
||||||
def test_medium_not_found_blockdev_backup(self):
|
def test_medium_not_found_blockdev_backup(self):
|
||||||
|
if iotests.qemu_default_machine != 'pc':
|
||||||
|
return
|
||||||
|
|
||||||
result = self.vm.qmp('blockdev-backup', device='ide1-cd0',
|
result = self.vm.qmp('blockdev-backup', device='ide1-cd0',
|
||||||
target='drive1', sync='full')
|
target='drive1', sync='full')
|
||||||
self.assert_qmp(result, 'error/class', 'GenericError')
|
self.assert_qmp(result, 'error/class', 'GenericError')
|
||||||
|
@ -323,6 +329,9 @@ class TestSingleTransaction(iotests.QMPTestCase):
|
||||||
self.do_test_pause('blockdev-backup', 'drive1', blockdev_target_img)
|
self.do_test_pause('blockdev-backup', 'drive1', blockdev_target_img)
|
||||||
|
|
||||||
def do_test_medium_not_found(self, cmd, target):
|
def do_test_medium_not_found(self, cmd, target):
|
||||||
|
if iotests.qemu_default_machine != 'pc':
|
||||||
|
return
|
||||||
|
|
||||||
result = self.vm.qmp('transaction', actions=[{
|
result = self.vm.qmp('transaction', actions=[{
|
||||||
'type': cmd,
|
'type': cmd,
|
||||||
'data': { 'device': 'ide1-cd0',
|
'data': { 'device': 'ide1-cd0',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue