[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/16] iotests: Respect -nodefaults in tests 41 and 5
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 09/16] iotests: Respect -nodefaults in tests 41 and 55 |
Date: |
Fri, 4 Sep 2015 22:10:40 +0200 |
From: Max Reitz <address@hidden>
While -nodefaults is set in $QEMU_OPTIONS, this is currently (wrongly)
ignored for Python iotests. In order to be prepared for when this is
fixed, we should explicitly add an IDE CD-ROM drive instead of relying
on it being created automatically.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/qemu-iotests/041 | 12 +++++++++---
tests/qemu-iotests/055 | 10 +++++++---
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index de8ea15..38ca5f1 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -42,6 +42,8 @@ class TestSingleDrive(iotests.QMPTestCase):
iotests.create_image(backing_img, self.image_len)
qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' %
backing_img, test_img)
self.vm = iotests.VM().add_drive(test_img)
+ if iotests.qemu_default_machine == 'pc':
+ self.vm.add_drive(None, 'media=cdrom', 'ide')
self.vm.launch()
def tearDown(self):
@@ -170,8 +172,8 @@ class TestSingleDrive(iotests.QMPTestCase):
if iotests.qemu_default_machine != 'pc':
return
- result = self.vm.qmp('drive-mirror', device='ide1-cd0', sync='full',
- target=target_img)
+ result = self.vm.qmp('drive-mirror', device='drive1', # CD-ROM
+ sync='full', target=target_img)
self.assert_qmp(result, 'error/class', 'GenericError')
def test_image_not_found(self):
@@ -710,6 +712,9 @@ class TestRepairQuorum(iotests.QMPTestCase):
def setUp(self):
self.vm = iotests.VM()
+ if iotests.qemu_default_machine == 'pc':
+ self.vm.add_drive(None, 'media=cdrom', 'ide')
+
# Add each individual quorum images
for i in self.IMAGES:
qemu_img('create', '-f', iotests.imgfmt, i,
@@ -837,7 +842,8 @@ class TestRepairQuorum(iotests.QMPTestCase):
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='drive0', # CD-ROM
+ sync='full',
node_name='repair0',
replaces='img1',
target=quorum_repair_img, format=iotests.imgfmt)
diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055
index e6e0ac4..c8e3578 100755
--- a/tests/qemu-iotests/055
+++ b/tests/qemu-iotests/055
@@ -42,6 +42,8 @@ class TestSingleDrive(iotests.QMPTestCase):
qemu_img('create', '-f', iotests.imgfmt, blockdev_target_img,
str(TestSingleDrive.image_len))
self.vm =
iotests.VM().add_drive(test_img).add_drive(blockdev_target_img)
+ if iotests.qemu_default_machine == 'pc':
+ self.vm.add_drive(None, 'media=cdrom', 'ide')
self.vm.launch()
def tearDown(self):
@@ -107,7 +109,7 @@ class TestSingleDrive(iotests.QMPTestCase):
if iotests.qemu_default_machine != 'pc':
return
- result = self.vm.qmp('drive-backup', device='ide1-cd0',
+ result = self.vm.qmp('drive-backup', device='drive2', # CD-ROM
target=target_img, sync='full')
self.assert_qmp(result, 'error/class', 'GenericError')
@@ -115,7 +117,7 @@ class TestSingleDrive(iotests.QMPTestCase):
if iotests.qemu_default_machine != 'pc':
return
- result = self.vm.qmp('blockdev-backup', device='ide1-cd0',
+ result = self.vm.qmp('blockdev-backup', device='drive2', # CD-ROM
target='drive1', sync='full')
self.assert_qmp(result, 'error/class', 'GenericError')
@@ -255,6 +257,8 @@ class TestSingleTransaction(iotests.QMPTestCase):
qemu_img('create', '-f', iotests.imgfmt, blockdev_target_img,
str(TestSingleDrive.image_len))
self.vm =
iotests.VM().add_drive(test_img).add_drive(blockdev_target_img)
+ if iotests.qemu_default_machine == 'pc':
+ self.vm.add_drive(None, 'media=cdrom', 'ide')
self.vm.launch()
def tearDown(self):
@@ -334,7 +338,7 @@ class TestSingleTransaction(iotests.QMPTestCase):
result = self.vm.qmp('transaction', actions=[{
'type': cmd,
- 'data': { 'device': 'ide1-cd0',
+ 'data': { 'device': 'drive2', # CD-ROM
'target': target,
'sync': 'full' },
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/16] Block patches, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 01/16] qemu-iotests: qemu machine type support, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 03/16] qemu-iotests: s390x: fix test 041 and 055, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 04/16] qemu-iotests: s390x: fix test 049, reject negative sizes in QemuOpts, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 02/16] qemu-iotests: disable default qemu devices for cross-platform compatibility, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 05/16] qemu-iotests: s390x: fix test 130, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 07/16] qemu-img: Fix crash in amend invocation, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 06/16] block/raw-posix: Use raw_normalize_devicepath(), Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 08/16] iotests: More options for VM.add_drive(), Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 09/16] iotests: Respect -nodefaults in tests 41 and 55,
Kevin Wolf <=
- [Qemu-devel] [PULL 10/16] iotests: Do not suppress segfaults in bash tests, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 11/16] iotests: Warn if python subprocess is killed, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 15/16] qcow2: reorder fields in Qcow2CachedTable to reduce padding, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 14/16] docs: document how to configure the qcow2 L2/refcount caches, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 12/16] qcow2: mark the memory as no longer needed after qcow2_cache_empty(), Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 16/16] quorum: validate vote threshold against num_children even if read-pattern is fifo, Kevin Wolf, 2015/09/04
- [Qemu-devel] [PULL 13/16] qcow2: add option to clean unused cache entries after some time, Kevin Wolf, 2015/09/04
- Re: [Qemu-devel] [PULL 00/16] Block patches, Peter Maydell, 2015/09/07