Files
qemu-reims-vgpu/tests/functional/aarch64/test_vm_launch_update_aarch.py
T
Ani Sinha 0b70c6ce7b Add functional and unit tests for the vm-launch-update device
This patchset adds functional and unit tests that exercize various functions
and behaviors of vm-launch-update device. It uses the IGVM files that were
introduced in the previous patch for exercizing the hypervisor interface.

CC: Alex Graf <graf@amazon.com>
CC: Gerd Hoffman <kraxel@redhat.com>
Reviewed-by: Alexander Graf <graf@amazon.com>
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Message-ID: <20260817142010.80693-11-anisinha@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2026-08-20 16:40:33 +02:00

34 lines
934 B
Python
Executable File

#!/usr/bin/env python3
#
# Check for vm-launch-update device.
#
# Copyright (c) 2026 Red Hat, Inc.
#
# Author:
# Ani Sinha <anisinha@redhat.com>
#
# SPDX-License-Identifier: GPL-2.0-or-later
from qemu_test import QemuSystemTest
class VmLaunchUpdateDeviceCheck(QemuSystemTest):
def aarch64_fail_test(self):
"""
Currently the device is only supported for pc platforms.
"""
self.vm.add_args('-machine', 'virt', '-device',
'vm-launch-update,id=fwupd1')
self.vm.set_qmp_monitor(enabled=False)
self.vm.launch()
self.vm.wait()
self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1")
self.assertRegex(self.vm.get_log(),
r'This machine does not support vm-launch-update device')
def test_vm_launch_update(self):
self.aarch64_fail_test()
if __name__ == '__main__':
QemuSystemTest.main()