Message ID | 20241203092153.60590-3-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | cli: Remove mentions of legacy '-machine foo, accel=bar' command line | expand |
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
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 --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")
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(-)