mirror of https://github.com/xemu-project/xemu.git
iotests: use iotests.VM in 238
Test 238 does not require the kvm accelerator. Using the qtest accelerator allows the test to run in both non-kvm and non-tcg environments. iotests.VM implicitly uses the qtest accelerator and is really the class that this test should be using. Switch to that instead of qemu.QEMUMachine. Suggested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
c4e0780ed1
commit
b74b1adef0
|
@ -23,17 +23,12 @@ import os
|
||||||
import iotests
|
import iotests
|
||||||
from iotests import log
|
from iotests import log
|
||||||
|
|
||||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
|
|
||||||
|
|
||||||
from qemu import QEMUMachine
|
|
||||||
|
|
||||||
if iotests.qemu_default_machine == 's390-ccw-virtio':
|
if iotests.qemu_default_machine == 's390-ccw-virtio':
|
||||||
virtio_scsi_device = 'virtio-scsi-ccw'
|
virtio_scsi_device = 'virtio-scsi-ccw'
|
||||||
else:
|
else:
|
||||||
virtio_scsi_device = 'virtio-scsi-pci'
|
virtio_scsi_device = 'virtio-scsi-pci'
|
||||||
|
|
||||||
vm = QEMUMachine(iotests.qemu_prog)
|
vm = iotests.VM()
|
||||||
vm.add_args('-machine', 'accel=kvm')
|
|
||||||
vm.launch()
|
vm.launch()
|
||||||
|
|
||||||
log(vm.qmp('blockdev-add', node_name='hd0', driver='null-co'))
|
log(vm.qmp('blockdev-add', node_name='hd0', driver='null-co'))
|
||||||
|
|
Loading…
Reference in New Issue