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. -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEeruW64tGuU1eD+m7ZX6NM6XyCfMFAmD3W5kACgkQZX6NM6Xy CfNiGA/9HLPiLydr7NGr7QXTrWima0oj2V+vO0WYzYiye9AANuTiOtcSpEZQzxCE va4mWql8B3IgC/q+AoCj/HX5rj1jHTwZy4UzgftnsxhbsewkQP1jHPWN5j98HcAd lAtA9pzqXluFmr/3fvqDGO7eaMgIHHaSU2fvxnyvz4L5moFsPKL8EeofSrz3a17k AJyC+QLLv5btXkguLL333GB8aAziLQSazBADFg8GOG9Gn88a7C8D2KtD8U7kAt/Y WF/RHdBF2T3rjqyjAJh+u0UyIyU4CSv6yR51BG6wtlw/kkGS0n5g2A2Uq+ecyIf9 DPwJ07KMk7oHj5ZxvqE9dyKpwklc697TRLep36RH1JlXw0cdxCOjCFYk1TeANccz A3mnSgOQDYjtv8FbPto/qdRoi7DkWcFOu3DQQzscpIzVczNCa143cJahY+pTA2t4 sKIkxtsFJu3lw8fTJuoIsAY0sWrlROfaRwsZqmsm3a4fH2e/9VcEI9wn2pR/ZsWZ aM/o0JxdU3xI/ZeiSXt8aneFPp7LksN0zFceuXpXFY5dQCktvwCPAr9z8aZzE+Lg nFHSaZ9RK8xQg/YHv2i0z3QkBn1BREF8YH2PYiW0QI5oNtqXPB4eQOL5T0Qh+gJk bT3Jswf2BA2tcGvtbY83iDgXLHYlyuOTwqneYUx1qL80EmoSeQc= =Bs7z -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
033bd16b8a
@ -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);
|
||||
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user