* [PULL 1/7] tests/acceptance/virtio-gpu.py: use require_accelerator()
2021-07-20 23:30 [PULL for 6.1 0/7] Python and Acceptance Tests Cleber Rosa
@ 2021-07-20 23:30 ` Cleber Rosa
2021-07-20 23:30 ` [PULL 2/7] tests/acceptance/virtio-gpu.py: combine x86_64 arch tags Cleber Rosa
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Cleber Rosa @ 2021-07-20 23:30 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Cc: Elena Ufimtseva, John G Johnson, Jagannathan Raman, Beraldo Leal,
Wainer dos Santos Moschetta, Willian Rampazzo, Willian Rampazzo,
Cleber Rosa, Philippe Mathieu-Daudé,
Eduardo Habkost
Since efe30d501 there's a shorthand for requiring specific
accelerators, and canceling the test if it's not available.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210714174051.28164-2-crosa@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/acceptance/virtio-gpu.py | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py
index 589332c1b7..42602a240a 100644
--- a/tests/acceptance/virtio-gpu.py
+++ b/tests/acceptance/virtio-gpu.py
@@ -17,10 +17,6 @@
import subprocess
-ACCEL_NOT_AVAILABLE_FMT = "%s accelerator does not seem to be available"
-KVM_NOT_AVAILABLE = ACCEL_NOT_AVAILABLE_FMT % "KVM"
-
-
def pick_default_vug_bin():
relative_path = "./contrib/vhost-user-gpu/vhost-user-gpu"
if is_readable_executable_file(relative_path):
@@ -66,8 +62,7 @@ def test_virtio_vga_virgl(self):
self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0 rdinit=/bin/bash"
)
# FIXME: should check presence of virtio, virgl etc
- if not kvm_available(self.arch, self.qemu_bin):
- self.cancel(KVM_NOT_AVAILABLE)
+ self.require_accelerator('kvm')
kernel_path = self.fetch_asset(self.KERNEL_URL)
initrd_path = self.fetch_asset(self.INITRD_URL)
@@ -107,8 +102,7 @@ def test_vhost_user_vga_virgl(self):
self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0 rdinit=/bin/bash"
)
# FIXME: should check presence of vhost-user-gpu, virgl, memfd etc
- if not kvm_available(self.arch, self.qemu_bin):
- self.cancel(KVM_NOT_AVAILABLE)
+ self.require_accelerator('kvm')
vug = pick_default_vug_bin()
if not vug:
--
2.31.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 2/7] tests/acceptance/virtio-gpu.py: combine x86_64 arch tags
2021-07-20 23:30 [PULL for 6.1 0/7] Python and Acceptance Tests Cleber Rosa
2021-07-20 23:30 ` [PULL 1/7] tests/acceptance/virtio-gpu.py: use require_accelerator() Cleber Rosa
@ 2021-07-20 23:30 ` Cleber Rosa
2021-07-20 23:30 ` [PULL 3/7] tests/acceptance/virtio-gpu.py: combine CPU tags Cleber Rosa
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Cleber Rosa @ 2021-07-20 23:30 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Cc: Elena Ufimtseva, John G Johnson, Jagannathan Raman, Beraldo Leal,
Wainer dos Santos Moschetta, Willian Rampazzo, Willian Rampazzo,
Cleber Rosa, Philippe Mathieu-Daudé,
Eduardo Habkost
The test class in question is x86_64 specific, so it's possible to set
the tags at the class level.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210714174051.28164-3-crosa@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/acceptance/virtio-gpu.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py
index 42602a240a..729b99b2e5 100644
--- a/tests/acceptance/virtio-gpu.py
+++ b/tests/acceptance/virtio-gpu.py
@@ -30,6 +30,7 @@ def pick_default_vug_bin():
class VirtioGPUx86(Test):
"""
:avocado: tags=virtio-gpu
+ :avocado: tags=arch:x86_64
"""
KERNEL_COMMON_COMMAND_LINE = "printk.time=0 "
@@ -54,7 +55,6 @@ def wait_for_console_pattern(self, success_message, vm=None):
def test_virtio_vga_virgl(self):
"""
- :avocado: tags=arch:x86_64
:avocado: tags=device:virtio-vga
:avocado: tags=cpu:host
"""
@@ -94,7 +94,6 @@ def test_virtio_vga_virgl(self):
def test_vhost_user_vga_virgl(self):
"""
- :avocado: tags=arch:x86_64
:avocado: tags=device:vhost-user-vga
:avocado: tags=cpu:host
"""
--
2.31.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 3/7] tests/acceptance/virtio-gpu.py: combine CPU tags
2021-07-20 23:30 [PULL for 6.1 0/7] Python and Acceptance Tests Cleber Rosa
2021-07-20 23:30 ` [PULL 1/7] tests/acceptance/virtio-gpu.py: use require_accelerator() Cleber Rosa
2021-07-20 23:30 ` [PULL 2/7] tests/acceptance/virtio-gpu.py: combine x86_64 arch tags Cleber Rosa
@ 2021-07-20 23:30 ` Cleber Rosa
2021-07-20 23:30 ` [PULL 4/7] tests/acceptance/virtio-gpu.py: combine kernel command line Cleber Rosa
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Cleber Rosa @ 2021-07-20 23:30 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Cc: Elena Ufimtseva, John G Johnson, Jagannathan Raman, Beraldo Leal,
Wainer dos Santos Moschetta, Willian Rampazzo, Willian Rampazzo,
Cleber Rosa, Philippe Mathieu-Daudé,
Eduardo Habkost
Like previously done with the arch tags, all tests use the same CPU
value so it's possible to combine them at the class level.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210714174051.28164-4-crosa@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/acceptance/virtio-gpu.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py
index 729b99b2e5..20a59fabf3 100644
--- a/tests/acceptance/virtio-gpu.py
+++ b/tests/acceptance/virtio-gpu.py
@@ -31,6 +31,7 @@ class VirtioGPUx86(Test):
"""
:avocado: tags=virtio-gpu
:avocado: tags=arch:x86_64
+ :avocado: tags=cpu:host
"""
KERNEL_COMMON_COMMAND_LINE = "printk.time=0 "
@@ -56,7 +57,6 @@ def wait_for_console_pattern(self, success_message, vm=None):
def test_virtio_vga_virgl(self):
"""
:avocado: tags=device:virtio-vga
- :avocado: tags=cpu:host
"""
kernel_command_line = (
self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0 rdinit=/bin/bash"
@@ -95,7 +95,6 @@ def test_virtio_vga_virgl(self):
def test_vhost_user_vga_virgl(self):
"""
:avocado: tags=device:vhost-user-vga
- :avocado: tags=cpu:host
"""
kernel_command_line = (
self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0 rdinit=/bin/bash"
--
2.31.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 4/7] tests/acceptance/virtio-gpu.py: combine kernel command line
2021-07-20 23:30 [PULL for 6.1 0/7] Python and Acceptance Tests Cleber Rosa
` (2 preceding siblings ...)
2021-07-20 23:30 ` [PULL 3/7] tests/acceptance/virtio-gpu.py: combine CPU tags Cleber Rosa
@ 2021-07-20 23:30 ` Cleber Rosa
2021-07-20 23:30 ` [PULL 5/7] tests/acceptance/virtio-gpu.py: use virtio-vga-gl Cleber Rosa
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Cleber Rosa @ 2021-07-20 23:30 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Cc: Elena Ufimtseva, John G Johnson, Jagannathan Raman, Beraldo Leal,
Wainer dos Santos Moschetta, Willian Rampazzo, Willian Rampazzo,
Cleber Rosa, Philippe Mathieu-Daudé,
Eduardo Habkost
Both tests use the same kernel command line arguments, so there's no
need to have a common and then an additional set of arguments.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210714174051.28164-5-crosa@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/acceptance/virtio-gpu.py | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py
index 20a59fabf3..fbde278705 100644
--- a/tests/acceptance/virtio-gpu.py
+++ b/tests/acceptance/virtio-gpu.py
@@ -34,7 +34,7 @@ class VirtioGPUx86(Test):
:avocado: tags=cpu:host
"""
- KERNEL_COMMON_COMMAND_LINE = "printk.time=0 "
+ KERNEL_COMMAND_LINE = "printk.time=0 console=ttyS0 rdinit=/bin/bash"
KERNEL_URL = (
"https://archives.fedoraproject.org/pub/fedora"
"/linux/releases/33/Everything/x86_64/os/images"
@@ -58,9 +58,6 @@ def test_virtio_vga_virgl(self):
"""
:avocado: tags=device:virtio-vga
"""
- kernel_command_line = (
- self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0 rdinit=/bin/bash"
- )
# FIXME: should check presence of virtio, virgl etc
self.require_accelerator('kvm')
@@ -78,7 +75,7 @@ def test_virtio_vga_virgl(self):
"-initrd",
initrd_path,
"-append",
- kernel_command_line,
+ self.KERNEL_COMMAND_LINE,
)
try:
self.vm.launch()
@@ -96,9 +93,6 @@ def test_vhost_user_vga_virgl(self):
"""
:avocado: tags=device:vhost-user-vga
"""
- kernel_command_line = (
- self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0 rdinit=/bin/bash"
- )
# FIXME: should check presence of vhost-user-gpu, virgl, memfd etc
self.require_accelerator('kvm')
@@ -145,7 +139,7 @@ def test_vhost_user_vga_virgl(self):
"-initrd",
initrd_path,
"-append",
- kernel_command_line,
+ self.KERNEL_COMMAND_LINE,
)
self.vm.launch()
self.wait_for_console_pattern("as init process")
--
2.31.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 5/7] tests/acceptance/virtio-gpu.py: use virtio-vga-gl
2021-07-20 23:30 [PULL for 6.1 0/7] Python and Acceptance Tests Cleber Rosa
` (3 preceding siblings ...)
2021-07-20 23:30 ` [PULL 4/7] tests/acceptance/virtio-gpu.py: combine kernel command line Cleber Rosa
@ 2021-07-20 23:30 ` Cleber Rosa
2021-07-20 23:30 ` [PULL 6/7] tests/acceptance/virtio-gpu.py: provide kernel and initrd hashes Cleber Rosa
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Cleber Rosa @ 2021-07-20 23:30 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Cc: Elena Ufimtseva, John G Johnson, Jagannathan Raman, Beraldo Leal,
Wainer dos Santos Moschetta, Willian Rampazzo, Willian Rampazzo,
Cleber Rosa, Marc-André Lureau, Philippe Mathieu-Daudé,
Eduardo Habkost
Since 49afbca3b, the use of an optional virgl renderer is not
available anymore, and since b36eb8860f, the way to choose a GL based
rendered is to use the "virtio-vga-gl" device.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210714174051.28164-6-crosa@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/acceptance/virtio-gpu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py
index fbde278705..0f84affe82 100644
--- a/tests/acceptance/virtio-gpu.py
+++ b/tests/acceptance/virtio-gpu.py
@@ -56,7 +56,7 @@ def wait_for_console_pattern(self, success_message, vm=None):
def test_virtio_vga_virgl(self):
"""
- :avocado: tags=device:virtio-vga
+ :avocado: tags=device:virtio-vga-gl
"""
# FIXME: should check presence of virtio, virgl etc
self.require_accelerator('kvm')
@@ -67,7 +67,7 @@ def test_virtio_vga_virgl(self):
self.vm.set_console()
self.vm.add_args("-m", "2G")
self.vm.add_args("-machine", "pc,accel=kvm")
- self.vm.add_args("-device", "virtio-vga,virgl=on")
+ self.vm.add_args("-device", "virtio-vga-gl")
self.vm.add_args("-display", "egl-headless")
self.vm.add_args(
"-kernel",
--
2.31.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 6/7] tests/acceptance/virtio-gpu.py: provide kernel and initrd hashes
2021-07-20 23:30 [PULL for 6.1 0/7] Python and Acceptance Tests Cleber Rosa
` (4 preceding siblings ...)
2021-07-20 23:30 ` [PULL 5/7] tests/acceptance/virtio-gpu.py: use virtio-vga-gl Cleber Rosa
@ 2021-07-20 23:30 ` Cleber Rosa
2021-07-20 23:30 ` [PULL 7/7] remote/memory: Replace share parameter with ram_flags Cleber Rosa
2021-07-21 13:06 ` [PULL for 6.1 0/7] Python and Acceptance Tests Peter Maydell
7 siblings, 0 replies; 9+ messages in thread
From: Cleber Rosa @ 2021-07-20 23:30 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Cc: Elena Ufimtseva, John G Johnson, Jagannathan Raman, Beraldo Leal,
Wainer dos Santos Moschetta, Willian Rampazzo, Willian Rampazzo,
Cleber Rosa, Philippe Mathieu-Daudé,
Eduardo Habkost
By providing kernel and initrd hashes, the test guarantees the
integrity of the images used and avoids the warnings set by
fetch_asset() when hashes are lacking.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210714174051.28164-7-crosa@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/acceptance/virtio-gpu.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py
index 0f84affe82..4acc1e6d5f 100644
--- a/tests/acceptance/virtio-gpu.py
+++ b/tests/acceptance/virtio-gpu.py
@@ -40,11 +40,13 @@ class VirtioGPUx86(Test):
"/linux/releases/33/Everything/x86_64/os/images"
"/pxeboot/vmlinuz"
)
+ KERNEL_HASH = '1433cfe3f2ffaa44de4ecfb57ec25dc2399cdecf'
INITRD_URL = (
"https://archives.fedoraproject.org/pub/fedora"
"/linux/releases/33/Everything/x86_64/os/images"
"/pxeboot/initrd.img"
)
+ INITRD_HASH = 'c828d68a027b53e5220536585efe03412332c2d9'
def wait_for_console_pattern(self, success_message, vm=None):
wait_for_console_pattern(
@@ -61,8 +63,8 @@ def test_virtio_vga_virgl(self):
# FIXME: should check presence of virtio, virgl etc
self.require_accelerator('kvm')
- kernel_path = self.fetch_asset(self.KERNEL_URL)
- initrd_path = self.fetch_asset(self.INITRD_URL)
+ kernel_path = self.fetch_asset(self.KERNEL_URL, self.KERNEL_HASH)
+ initrd_path = self.fetch_asset(self.INITRD_URL, self.INITRD_HASH)
self.vm.set_console()
self.vm.add_args("-m", "2G")
@@ -100,8 +102,8 @@ def test_vhost_user_vga_virgl(self):
if not vug:
self.cancel("Could not find vhost-user-gpu")
- kernel_path = self.fetch_asset(self.KERNEL_URL)
- initrd_path = self.fetch_asset(self.INITRD_URL)
+ kernel_path = self.fetch_asset(self.KERNEL_URL, self.KERNEL_HASH)
+ initrd_path = self.fetch_asset(self.INITRD_URL, self.INITRD_HASH)
# Create socketpair to connect proxy and remote processes
qemu_sock, vug_sock = socket.socketpair(
--
2.31.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 7/7] remote/memory: Replace share parameter with ram_flags
2021-07-20 23:30 [PULL for 6.1 0/7] Python and Acceptance Tests Cleber Rosa
` (5 preceding siblings ...)
2021-07-20 23:30 ` [PULL 6/7] tests/acceptance/virtio-gpu.py: provide kernel and initrd hashes Cleber Rosa
@ 2021-07-20 23:30 ` Cleber Rosa
2021-07-21 13:06 ` [PULL for 6.1 0/7] Python and Acceptance Tests Peter Maydell
7 siblings, 0 replies; 9+ messages in thread
From: Cleber Rosa @ 2021-07-20 23:30 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Cc: Elena Ufimtseva, John G Johnson, Jagannathan Raman, Beraldo Leal,
David Hildenbrand, Yang Zhong, Pankaj Gupta,
Wainer dos Santos Moschetta, Peter Xu, Willian Rampazzo,
Cleber Rosa, Philippe Mathieu-Daudé,
Eduardo Habkost
From: Yang Zhong <yang.zhong@intel.com>
Fixes: d5015b801340 ("softmmu/memory: Pass ram_flags to
qemu_ram_alloc_from_fd()")
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210709052800.63588-1-yang.zhong@intel.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
hw/remote/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/remote/memory.c b/hw/remote/memory.c
index 472ed2a272..6e21ab1a45 100644
--- a/hw/remote/memory.c
+++ b/hw/remote/memory.c
@@ -46,7 +46,7 @@ void remote_sysmem_reconfig(MPQemuMsg *msg, Error **errp)
subregion = g_new(MemoryRegion, 1);
memory_region_init_ram_from_fd(subregion, NULL,
name, sysmem_info->sizes[region],
- true, msg->fds[region],
+ RAM_SHARED, msg->fds[region],
sysmem_info->offsets[region],
errp);
--
2.31.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PULL for 6.1 0/7] Python and Acceptance Tests
2021-07-20 23:30 [PULL for 6.1 0/7] Python and Acceptance Tests Cleber Rosa
` (6 preceding siblings ...)
2021-07-20 23:30 ` [PULL 7/7] remote/memory: Replace share parameter with ram_flags Cleber Rosa
@ 2021-07-21 13:06 ` Peter Maydell
7 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2021-07-21 13:06 UTC (permalink / raw)
To: Cleber Rosa
Cc: Elena Ufimtseva, John G Johnson, Jagannathan Raman, Beraldo Leal,
QEMU Developers, Wainer dos Santos Moschetta, Willian Rampazzo,
Philippe Mathieu-Daudé,
Eduardo Habkost
On Wed, 21 Jul 2021 at 00:30, Cleber Rosa <crosa@redhat.com> wrote:
>
> The following changes since commit c04b4d9e6b596ead3cf6046a9243fbfee068ef33:
>
> Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2021-07-20 16:59:33 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/cleber.gnu/qemu.git/ tags/python-next-pull-request
>
> for you to fetch changes up to f4a3fda43e389fa26d41ec9cd24f42c5fe20ba9d:
>
> remote/memory: Replace share parameter with ram_flags (2021-07-20 15:34:20 -0400)
>
> ----------------------------------------------------------------
> Acceptance Tests
>
> - Fix for tests/acceptance/virtio-gpu.py to match the change in device
> name
> - Fix for failure caught by tests/acceptance/multiprocess.py
>
> PS: While not a maintainer for the subsystem in PATCH 7, I'm including
> it as a one-off to facilitate the landing of the fix as discussed in
> the mailing list.
>
> ----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.1
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread