-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'pull-request-2024-07-02' of https://gitlab.com/thuth/qemu …
…into staging * Fix interrupt controller migration on s390x with TCG and enable qtest * Fix memory leaks in qtests * Use a proper qom-tree parent for s390x virtio-net devices * Add hotplug avocado test for virtio-blk * Fix Travis jobs (need python3-tomli now) # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmaD1qsRHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbWOtg//a+6nRcV8crCGzMaxhH32NxcjvV7TPiAI # FioqOsomKfKKTMIDlbjsgQiQWqGrN/mdnxSzasypxZrC3eoDYJCIUyQfR2iGe4t2 # JJ4gQhQGuXkSstGErj8yw83UnG1drG+XuZ/psSij4/R2ft6Me8miFSh3cCgIm541 # 0DtffV6rAXIEqA+bswKsPq+7bq6ZCxZjaWgKhzfP5RNnpjPvHYMDDPZt9a2Fk9xC # d3TILh/0djuVr8nZNUkQJBT5EU6dxVDb1JMqn4G6e6kWtiDBh/XwvMtC0KHVCJH1 # tHDz7n+FpwBfpo1cz0Y/Bn9pTW4K9KZ+GVlLOihfbh7Eaix0+RPzLKCigLVg1v8I # HaNFr70FxF5Xzmvie36arEKf0CwQCinxvfM9USBD0uP3tOzSZwX2XxM0+FBIjUf3 # fYIY8qV1hQZM5tXFxtU5LW4A64pVGwEHlEIcodxo8mY/DnZUdIvB5L5C4rxATnVr # t2eWc23sGdMZgKxUtlG0PIr80ImkYBWFOLztUmDPOff6igiyw2ZxaLQHyERPEc0O # 1CL4K4K5FKNtJgjSwJyU1NquGKk85vUSjiUW1JOvInUFjRECIQ7+R41p6FU+eTHO # l50cKaf2TCWqDOwMOjFYOHj6TWZGXnTmkSN60g0OLioy3UY+Kghd2Zq+aTK5ptyh # 1BhcvTin9Zg= # =lLG3 # -----END PGP SIGNATURE----- # gpg: Signature made Tue 02 Jul 2024 03:30:03 AM PDT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "[email protected]" # gpg: Good signature from "Thomas Huth <[email protected]>" [full] # gpg: aka "Thomas Huth <[email protected]>" [full] # gpg: aka "Thomas Huth <[email protected]>" [unknown] # gpg: aka "Thomas Huth <[email protected]>" [full] * tag 'pull-request-2024-07-02' of https://gitlab.com/thuth/qemu: pc-bios/s390-ccw: Remove duplicated LDFLAGS .travis.yml: Install python3-tomli in all build jobs tests/avocado: add hotplug_blk test hw/s390x: Attach default virtio-net devices to the /machine/virtual-css-bridge docs: add precision about capstone for execlog plugin tests/qtest: Free GThread tests/qtest: Free paths tests/qtest: Free old machine variable name tests/qtest: Free unused QMP response tests/qtest: Use qtest_add_data_func_full() tests/qtest/migration-test: enable on s390x with TCG hw/intc/s390_flic: Fix interrupt controller migration on s390x with TCG Signed-off-by: Richard Henderson <[email protected]>
- Loading branch information
Showing
12 changed files
with
181 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Functional test that hotplugs a virtio blk disk and checks it on a Linux | ||
# guest | ||
# | ||
# Copyright (c) 2021 Red Hat, Inc. | ||
# Copyright (c) Yandex | ||
# | ||
# This work is licensed under the terms of the GNU GPL, version 2 or | ||
# later. See the COPYING file in the top-level directory. | ||
|
||
import time | ||
|
||
from avocado_qemu import LinuxTest | ||
|
||
|
||
class HotPlug(LinuxTest): | ||
def blockdev_add(self) -> None: | ||
self.vm.cmd('blockdev-add', **{ | ||
'driver': 'null-co', | ||
'size': 1073741824, | ||
'node-name': 'disk' | ||
}) | ||
|
||
def assert_vda(self) -> None: | ||
self.ssh_command('test -e /sys/block/vda') | ||
|
||
def assert_no_vda(self) -> None: | ||
with self.assertRaises(AssertionError): | ||
self.assert_vda() | ||
|
||
def plug(self) -> None: | ||
args = { | ||
'driver': 'virtio-blk-pci', | ||
'drive': 'disk', | ||
'id': 'virtio-disk0', | ||
'bus': 'pci.1', | ||
'addr': 1 | ||
} | ||
|
||
self.assert_no_vda() | ||
self.vm.cmd('device_add', args) | ||
try: | ||
self.assert_vda() | ||
except AssertionError: | ||
time.sleep(1) | ||
self.assert_vda() | ||
|
||
def unplug(self) -> None: | ||
self.vm.cmd('device_del', id='virtio-disk0') | ||
|
||
self.vm.event_wait('DEVICE_DELETED', 1.0, | ||
match={'data': {'device': 'virtio-disk0'}}) | ||
|
||
self.assert_no_vda() | ||
|
||
def test(self) -> None: | ||
""" | ||
:avocado: tags=arch:x86_64 | ||
:avocado: tags=machine:q35 | ||
:avocado: tags=accel:kvm | ||
""" | ||
self.require_accelerator('kvm') | ||
self.vm.add_args('-accel', 'kvm') | ||
self.vm.add_args('-device', 'pcie-pci-bridge,id=pci.1,bus=pcie.0') | ||
|
||
self.launch_and_wait() | ||
self.blockdev_add() | ||
|
||
self.plug() | ||
self.unplug() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.