aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-07-21 11:02:25 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-07-21 11:02:26 +0100
commit033bd16b8afbaafdcef37356705016d9c3c475fa (patch)
treeddc0342a4f191b3d90d678429808fe4c61e9adbe
parent801f3db7564dcce8a37a70833c0abe40ec19f8ce (diff)
parentf4a3fda43e389fa26d41ec9cd24f42c5fe20ba9d (diff)
downloadqemu-033bd16b8afbaafdcef37356705016d9c3c475fa.zip
qemu-033bd16b8afbaafdcef37356705016d9c3c475fa.tar.gz
qemu-033bd16b8afbaafdcef37356705016d9c3c475fa.tar.bz2
Merge remote-tracking branch 'remotes/cleber-gitlab/tags/python-next-pull-request' into staging
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. # gpg: Signature made Wed 21 Jul 2021 00:26:17 BST # gpg: using RSA key 7ABB96EB8B46B94D5E0FE9BB657E8D33A5F209F3 # gpg: Good signature from "Cleber Rosa <crosa@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 7ABB 96EB 8B46 B94D 5E0F E9BB 657E 8D33 A5F2 09F3 * remotes/cleber-gitlab/tags/python-next-pull-request: remote/memory: Replace share parameter with ram_flags tests/acceptance/virtio-gpu.py: provide kernel and initrd hashes tests/acceptance/virtio-gpu.py: use virtio-vga-gl tests/acceptance/virtio-gpu.py: combine kernel command line tests/acceptance/virtio-gpu.py: combine CPU tags tests/acceptance/virtio-gpu.py: combine x86_64 arch tags tests/acceptance/virtio-gpu.py: use require_accelerator() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/remote/memory.c2
-rw-r--r--tests/acceptance/virtio-gpu.py42
2 files changed, 16 insertions, 28 deletions
diff --git a/hw/remote/memory.c b/hw/remote/memory.c
index 472ed2a..6e21ab1 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);
diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py
index 589332c..4acc1e6 100644
--- a/tests/acceptance/virtio-gpu.py
+++ b/tests/acceptance/virtio-gpu.py
@@ -17,10 +17,6 @@ import socket
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):
@@ -34,19 +30,23 @@ def pick_default_vug_bin():
class VirtioGPUx86(Test):
"""
:avocado: tags=virtio-gpu
+ :avocado: tags=arch:x86_64
+ :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"
"/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(
@@ -58,24 +58,18 @@ class VirtioGPUx86(Test):
def test_virtio_vga_virgl(self):
"""
- :avocado: tags=arch:x86_64
- :avocado: tags=device:virtio-vga
- :avocado: tags=cpu:host
+ :avocado: tags=device:virtio-vga-gl
"""
- kernel_command_line = (
- 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)
+ 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")
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",
@@ -83,7 +77,7 @@ class VirtioGPUx86(Test):
"-initrd",
initrd_path,
"-append",
- kernel_command_line,
+ self.KERNEL_COMMAND_LINE,
)
try:
self.vm.launch()
@@ -99,23 +93,17 @@ class VirtioGPUx86(Test):
def test_vhost_user_vga_virgl(self):
"""
- :avocado: tags=arch:x86_64
:avocado: tags=device:vhost-user-vga
- :avocado: tags=cpu:host
"""
- kernel_command_line = (
- 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:
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(
@@ -153,7 +141,7 @@ class VirtioGPUx86(Test):
"-initrd",
initrd_path,
"-append",
- kernel_command_line,
+ self.KERNEL_COMMAND_LINE,
)
self.vm.launch()
self.wait_for_console_pattern("as init process")