[Qemu-devel] [PATCH v2 for-4.0] tests/qemu-iotests/235: Allow fallback to tcg

Thomas Huth posted 1 patch 5 years, 1 month ago
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1553678622-17295-1-git-send-email-thuth@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
tests/qemu-iotests/235 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH v2 for-4.0] tests/qemu-iotests/235: Allow fallback to tcg
Posted by Thomas Huth 5 years, 1 month ago
iotest 235 currently only works with KVM - this is bad for systems where
it is not available, e.g. CI pipelines. The test also works when using
"tcg" as accelerator, so we can simply add that to the list of accelerators,
too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 v2: Do not remove the test from the "quick" group, since there was no
     real consensus about that change. We should maybe introduce a "ci"
     group instead later where this test here won't get added (since it
     currently does not work with accel=qtest)

 tests/qemu-iotests/235 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/235 b/tests/qemu-iotests/235
index 75c203b..2b6a8c1 100755
--- a/tests/qemu-iotests/235
+++ b/tests/qemu-iotests/235
@@ -49,7 +49,7 @@ qemu_img_create('-f', iotests.imgfmt, '-o', 'preallocation=metadata', disk,
                 str(size))
 
 vm = QEMUMachine(iotests.qemu_prog)
-vm.add_args('-machine', 'accel=kvm')
+vm.add_args('-machine', 'accel=kvm:tcg')
 if iotests.qemu_default_machine == 's390-ccw-virtio':
         vm.add_args('-no-shutdown')
 vm.add_args('-drive', 'id=src,file=' + disk)
-- 
1.8.3.1


Re: [Qemu-devel] [PATCH v2 for-4.0] tests/qemu-iotests/235: Allow fallback to tcg
Posted by Philippe Mathieu-Daudé 5 years, 1 month ago
Le mer. 27 mars 2019 10:24, Thomas Huth <thuth@redhat.com> a écrit :

> iotest 235 currently only works with KVM - this is bad for systems where
> it is not available, e.g. CI pipelines. The test also works when using
> "tcg" as accelerator, so we can simply add that to the list of
> accelerators,
> too.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  v2: Do not remove the test from the "quick" group, since there was no
>      real consensus about that change. We should maybe introduce a "ci"
>      group instead later where this test here won't get added (since it
>      currently does not work with accel=qtest)
>

I like that idea!


>  tests/qemu-iotests/235 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qemu-iotests/235 b/tests/qemu-iotests/235
> index 75c203b..2b6a8c1 100755
> --- a/tests/qemu-iotests/235
> +++ b/tests/qemu-iotests/235
> @@ -49,7 +49,7 @@ qemu_img_create('-f', iotests.imgfmt, '-o',
> 'preallocation=metadata', disk,
>                  str(size))
>
>  vm = QEMUMachine(iotests.qemu_prog)
> -vm.add_args('-machine', 'accel=kvm')
> +vm.add_args('-machine', 'accel=kvm:tcg')
>  if iotests.qemu_default_machine == 's390-ccw-virtio':
>          vm.add_args('-no-shutdown')
>  vm.add_args('-drive', 'id=src,file=' + disk)
> --
> 1.8.3.1
>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

>
Re: [Qemu-devel] [PATCH v2 for-4.0] tests/qemu-iotests/235: Allow fallback to tcg
Posted by Kevin Wolf 5 years ago
Am 27.03.2019 um 10:23 hat Thomas Huth geschrieben:
> iotest 235 currently only works with KVM - this is bad for systems where
> it is not available, e.g. CI pipelines. The test also works when using
> "tcg" as accelerator, so we can simply add that to the list of accelerators,
> too.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  v2: Do not remove the test from the "quick" group, since there was no
>      real consensus about that change. We should maybe introduce a "ci"
>      group instead later where this test here won't get added (since it
>      currently does not work with accel=qtest)

Thanks, applied to the block branch.

I think the real solution would be to do some debugging and make the
test work even with qtest. But for 4.0, your patch is fine.

Kevin