diff mbox series

[2/7] tests/functional/test_virtio_gpu: Remove legacy '-machine foo,accel=bar'

Message ID 20241203092153.60590-3-philmd@linaro.org (mailing list archive)
State New
Headers show
Series cli: Remove mentions of legacy '-machine foo,accel=bar' command line | expand

Commit Message

Philippe Mathieu-Daudé Dec. 3, 2024, 9:21 a.m. UTC
Since commit 6f6e1698a68 ("vl: configure accelerators from -accel
options") we prefer the '-accel bar' command line option.

Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in
functional tests.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 tests/functional/test_virtio_gpu.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Daniel P. Berrangé Dec. 3, 2024, 9:34 a.m. UTC | #1
On Tue, Dec 03, 2024 at 10:21:48AM +0100, Philippe Mathieu-Daudé wrote:
> Since commit 6f6e1698a68 ("vl: configure accelerators from -accel
> options") we prefer the '-accel bar' command line option.
> 
> Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in
> functional tests.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  tests/functional/test_virtio_gpu.py | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
Thomas Huth Dec. 3, 2024, 10:23 a.m. UTC | #2
On 03/12/2024 10.21, Philippe Mathieu-Daudé wrote:
> Since commit 6f6e1698a68 ("vl: configure accelerators from -accel
> options") we prefer the '-accel bar' command line option.
> 
> Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in
> functional tests.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   tests/functional/test_virtio_gpu.py | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/functional/test_virtio_gpu.py b/tests/functional/test_virtio_gpu.py
> index d5027487ac4..cc0ec234861 100755
> --- a/tests/functional/test_virtio_gpu.py
> +++ b/tests/functional/test_virtio_gpu.py
> @@ -61,7 +61,8 @@ def test_virtio_vga_virgl(self):
>           self.vm.set_console()
>           self.vm.add_args("-cpu", "host")
>           self.vm.add_args("-m", "2G")
> -        self.vm.add_args("-machine", "pc,accel=kvm")
> +        self.vm.add_args('-accel', 'kvm')
> +        self.vm.add_args("-machine", "pc")

While you're at it, could you please change this test to use 
"self.set_machine('pc')" at the very beginning of the test function instead 
of using -machine pc here? That way the test gets properly skipped in case 
the machine is not available in the QEMU binary.

  Thanks,
   Thomas


>           self.vm.add_args("-device", "virtio-vga-gl")
>           self.vm.add_args("-display", "egl-headless")
>           self.vm.add_args(
> @@ -118,10 +119,11 @@ def test_vhost_user_vga_virgl(self):
>           )
>   
>           self.vm.set_console()
> +        self.vm.add_args('-accel', 'kvm')
>           self.vm.add_args("-cpu", "host")
>           self.vm.add_args("-m", "2G")
>           self.vm.add_args("-object", "memory-backend-memfd,id=mem,size=2G")
> -        self.vm.add_args("-machine", "pc,memory-backend=mem,accel=kvm")
> +        self.vm.add_args("-machine", "pc,memory-backend=mem")
>           self.vm.add_args("-chardev", "socket,id=vug,fd=%d" % qemu_sock.fileno())
>           self.vm.add_args("-device", "vhost-user-vga,chardev=vug")
>           self.vm.add_args("-display", "egl-headless")
diff mbox series

Patch

diff --git a/tests/functional/test_virtio_gpu.py b/tests/functional/test_virtio_gpu.py
index d5027487ac4..cc0ec234861 100755
--- a/tests/functional/test_virtio_gpu.py
+++ b/tests/functional/test_virtio_gpu.py
@@ -61,7 +61,8 @@  def test_virtio_vga_virgl(self):
         self.vm.set_console()
         self.vm.add_args("-cpu", "host")
         self.vm.add_args("-m", "2G")
-        self.vm.add_args("-machine", "pc,accel=kvm")
+        self.vm.add_args('-accel', 'kvm')
+        self.vm.add_args("-machine", "pc")
         self.vm.add_args("-device", "virtio-vga-gl")
         self.vm.add_args("-display", "egl-headless")
         self.vm.add_args(
@@ -118,10 +119,11 @@  def test_vhost_user_vga_virgl(self):
         )
 
         self.vm.set_console()
+        self.vm.add_args('-accel', 'kvm')
         self.vm.add_args("-cpu", "host")
         self.vm.add_args("-m", "2G")
         self.vm.add_args("-object", "memory-backend-memfd,id=mem,size=2G")
-        self.vm.add_args("-machine", "pc,memory-backend=mem,accel=kvm")
+        self.vm.add_args("-machine", "pc,memory-backend=mem")
         self.vm.add_args("-chardev", "socket,id=vug,fd=%d" % qemu_sock.fileno())
         self.vm.add_args("-device", "vhost-user-vga,chardev=vug")
         self.vm.add_args("-display", "egl-headless")