[Qemu-devel] [PATCH v4] iotests: use iotests.VM in 238

Stefan Hajnoczi posted 1 patch 6 years, 8 months ago
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu failed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190227144413.30975-1-stefanha@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/238 | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
[Qemu-devel] [PATCH v4] iotests: use iotests.VM in 238
Posted by Stefan Hajnoczi 6 years, 8 months ago
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>
---
 tests/qemu-iotests/238 | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/tests/qemu-iotests/238 b/tests/qemu-iotests/238
index f81ee1112f..1c0a46fa90 100755
--- a/tests/qemu-iotests/238
+++ b/tests/qemu-iotests/238
@@ -23,17 +23,12 @@ import os
 import iotests
 from iotests import log
 
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'scripts'))
-
-from qemu import QEMUMachine
-
 if iotests.qemu_default_machine == 's390-ccw-virtio':
     virtio_scsi_device = 'virtio-scsi-ccw'
 else:
     virtio_scsi_device = 'virtio-scsi-pci'
 
-vm = QEMUMachine(iotests.qemu_prog)
-vm.add_args('-machine', 'accel=kvm')
+vm = iotests.VM()
 vm.launch()
 
 log(vm.qmp('blockdev-add', node_name='hd0', driver='null-co'))
-- 
2.20.1


Re: [Qemu-devel] [PATCH v4] iotests: use iotests.VM in 238
Posted by Kevin Wolf 6 years, 8 months ago
Am 27.02.2019 um 15:44 hat Stefan Hajnoczi geschrieben:
> 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>

Thanks, applied to the block branch.

Kevin