mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
tests/acceptance/virtio-gpu.py: provide kernel and initrd hashes
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>
This commit is contained in:
parent
3a05eee2fe
commit
074fca10c0
1 changed files with 6 additions and 4 deletions
|
@ -40,11 +40,13 @@ class VirtioGPUx86(Test):
|
||||||
"/linux/releases/33/Everything/x86_64/os/images"
|
"/linux/releases/33/Everything/x86_64/os/images"
|
||||||
"/pxeboot/vmlinuz"
|
"/pxeboot/vmlinuz"
|
||||||
)
|
)
|
||||||
|
KERNEL_HASH = '1433cfe3f2ffaa44de4ecfb57ec25dc2399cdecf'
|
||||||
INITRD_URL = (
|
INITRD_URL = (
|
||||||
"https://archives.fedoraproject.org/pub/fedora"
|
"https://archives.fedoraproject.org/pub/fedora"
|
||||||
"/linux/releases/33/Everything/x86_64/os/images"
|
"/linux/releases/33/Everything/x86_64/os/images"
|
||||||
"/pxeboot/initrd.img"
|
"/pxeboot/initrd.img"
|
||||||
)
|
)
|
||||||
|
INITRD_HASH = 'c828d68a027b53e5220536585efe03412332c2d9'
|
||||||
|
|
||||||
def wait_for_console_pattern(self, success_message, vm=None):
|
def wait_for_console_pattern(self, success_message, vm=None):
|
||||||
wait_for_console_pattern(
|
wait_for_console_pattern(
|
||||||
|
@ -61,8 +63,8 @@ class VirtioGPUx86(Test):
|
||||||
# FIXME: should check presence of virtio, virgl etc
|
# FIXME: should check presence of virtio, virgl etc
|
||||||
self.require_accelerator('kvm')
|
self.require_accelerator('kvm')
|
||||||
|
|
||||||
kernel_path = self.fetch_asset(self.KERNEL_URL)
|
kernel_path = self.fetch_asset(self.KERNEL_URL, self.KERNEL_HASH)
|
||||||
initrd_path = self.fetch_asset(self.INITRD_URL)
|
initrd_path = self.fetch_asset(self.INITRD_URL, self.INITRD_HASH)
|
||||||
|
|
||||||
self.vm.set_console()
|
self.vm.set_console()
|
||||||
self.vm.add_args("-m", "2G")
|
self.vm.add_args("-m", "2G")
|
||||||
|
@ -100,8 +102,8 @@ class VirtioGPUx86(Test):
|
||||||
if not vug:
|
if not vug:
|
||||||
self.cancel("Could not find vhost-user-gpu")
|
self.cancel("Could not find vhost-user-gpu")
|
||||||
|
|
||||||
kernel_path = self.fetch_asset(self.KERNEL_URL)
|
kernel_path = self.fetch_asset(self.KERNEL_URL, self.KERNEL_HASH)
|
||||||
initrd_path = self.fetch_asset(self.INITRD_URL)
|
initrd_path = self.fetch_asset(self.INITRD_URL, self.INITRD_HASH)
|
||||||
|
|
||||||
# Create socketpair to connect proxy and remote processes
|
# Create socketpair to connect proxy and remote processes
|
||||||
qemu_sock, vug_sock = socket.socketpair(
|
qemu_sock, vug_sock = socket.socketpair(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue