From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id BF79B1FF0AF for ; Thu, 10 Sep 2026 13:08:48 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BA53E2165A; Thu, 10 Sep 2026 13:08:37 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server 3/6] tests: hotplug: add cases for known defects Date: Thu, 10 Sep 2026 13:00:30 +0200 Message-ID: <20260910110832.2822954-4-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260910110832.2822954-1-d.csapak@proxmox.com> References: <20260910110832.2822954-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.436 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) PROLO_LEO1 0.1 Meta Catches all Leo drug variations so far RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: VO3NOYF6MTZM63AKW4BV4KMYWSRKFWVR X-Message-ID-Hash: VO3NOYF6MTZM63AKW4BV4KMYWSRKFWVR X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: adds some test cases that highlight currently known defects: * adding scsi14 with an lsi controller tries to hotplug a bridge and fails * a failed disk add with iothread does not clean up an io thread * hotplugging a tablet device into an aarch64 vm results in errors due to wrong parameter use of a function. The tests don't fail, but record the faulty behavior. Fixes for these are sent as individual patches. Signed-off-by: Dominik Csapak --- src/test/hotplug/aarch64/tablet-enable.conf | 21 ++++++++++++ .../aarch64/tablet-enable.conf.expected | 28 ++++++++++++++++ src/test/hotplug/disk-add-fail.conf | 17 ++++++++++ src/test/hotplug/disk-add-fail.conf.expected | 32 +++++++++++++++++++ src/test/hotplug/disk-add-scsi14-old.conf | 15 +++++++++ .../hotplug/disk-add-scsi14-old.conf.expected | 23 +++++++++++++ 6 files changed, 136 insertions(+) create mode 100644 src/test/hotplug/aarch64/tablet-enable.conf create mode 100644 src/test/hotplug/aarch64/tablet-enable.conf.expected create mode 100644 src/test/hotplug/disk-add-fail.conf create mode 100644 src/test/hotplug/disk-add-fail.conf.expected create mode 100644 src/test/hotplug/disk-add-scsi14-old.conf create mode 100644 src/test/hotplug/disk-add-scsi14-old.conf.expected diff --git a/src/test/hotplug/aarch64/tablet-enable.conf b/src/test/hotplug/aarch64/tablet-enable.conf new file mode 100644 index 00000000..bb523819 --- /dev/null +++ b/src/test/hotplug/aarch64/tablet-enable.conf @@ -0,0 +1,21 @@ +# TEST: enabling the tablet device on aarch64 hotplugs tablet and keyboard +# HOST_ARCH: aarch64 +arch: aarch64 +bios: ovmf +bootdisk: scsi0 +cores: 2 +efidisk0: local:8006/vm-8006-disk-2.qcow2,efitype=4m +machine: virt-10.1 +memory: 2048 +name: hotplug +net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0 +ostype: l26 +scsi0: local:8006/vm-8006-disk-0.qcow2,size=32G +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 1 +tablet: 0 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 + +[PENDING] +tablet: 1 diff --git a/src/test/hotplug/aarch64/tablet-enable.conf.expected b/src/test/hotplug/aarch64/tablet-enable.conf.expected new file mode 100644 index 00000000..708c5432 --- /dev/null +++ b/src/test/hotplug/aarch64/tablet-enable.conf.expected @@ -0,0 +1,28 @@ +# recorded actions +hmp device_add driver=usb-tablet,id=tablet,bus=uhci.0,port=1 + +# hotplug errors +tablet: hotplug problem - Too few arguments for subroutine 'PVE::QemuServer::QMPHelpers::qemu_deviceadd' (got 1; expected 2) + +# differences to a freshly started VM + +# resulting config +arch: aarch64 +bios: ovmf +bootdisk: scsi0 +cores: 2 +efidisk0: local:8006/vm-8006-disk-2.qcow2,efitype=4m +machine: virt-10.1 +memory: 2048 +name: hotplug +net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0 +ostype: l26 +scsi0: local:8006/vm-8006-disk-0.qcow2,size=32G +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 1 +tablet: 0 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 + +[PENDING] +tablet: 1 diff --git a/src/test/hotplug/disk-add-fail.conf b/src/test/hotplug/disk-add-fail.conf new file mode 100644 index 00000000..89851b4f --- /dev/null +++ b/src/test/hotplug/disk-add-fail.conf @@ -0,0 +1,17 @@ +# TEST: a disk that does not show up after hotplug is detached again +# FAIL_DEVICE_ADD: virtio1 +bootdisk: scsi0 +cores: 2 +machine: pc-i440fx-10.1 +memory: 2048 +name: hotplug +net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0 +ostype: l26 +scsi0: local:8006/vm-8006-disk-0.qcow2,size=32G +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 1 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 + +[PENDING] +virtio1: local:8006/vm-8006-disk-1.qcow2,iothread=1,size=32G diff --git a/src/test/hotplug/disk-add-fail.conf.expected b/src/test/hotplug/disk-add-fail.conf.expected new file mode 100644 index 00000000..8a36d951 --- /dev/null +++ b/src/test/hotplug/disk-add-fail.conf.expected @@ -0,0 +1,32 @@ +# recorded actions +storage activate_volumes ["local:8006/vm-8006-disk-1.qcow2"] +qmp object-add {"id":"iothread-virtio1","qom-type":"iothread"} +qmp object-del {"id":"throttle-drive-virtio1"} +qmp object-add {"id":"throttle-drive-virtio1","limits":{},"qom-type":"throttle-group"} +qmp blockdev-add {"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-1.qcow2","node-name":"ef4c217a7f08cf59741edc1790023f5","read-only":false},"node-name":"ff4c217a7f08cf59741edc1790023f5","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"} +hmp device_add driver=virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,write-cache=on +qmp blockdev-del {"node-name":"drive-virtio1"} +qmp object-del {"id":"throttle-drive-virtio1"} + +# hotplug errors +virtio1: hotplug problem - error on hotplug device 'virtio1' + +# differences to a freshly started VM +object iothread-virtio1: only present in running VM + +# resulting config +bootdisk: scsi0 +cores: 2 +machine: pc-i440fx-10.1 +memory: 2048 +name: hotplug +net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0 +ostype: l26 +scsi0: local:8006/vm-8006-disk-0.qcow2,size=32G +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 1 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 + +[PENDING] +virtio1: local:8006/vm-8006-disk-1.qcow2,iothread=1,size=32G diff --git a/src/test/hotplug/disk-add-scsi14-old.conf b/src/test/hotplug/disk-add-scsi14-old.conf new file mode 100644 index 00000000..9f9e72b9 --- /dev/null +++ b/src/test/hotplug/disk-add-scsi14-old.conf @@ -0,0 +1,15 @@ +# TEST: hotplugging a SCSI disk whose new LSI controller needs a hotplugged PCI bridge fails on QEMU < 11.1 +bootdisk: scsi0 +cores: 2 +machine: pc-i440fx-11.0 +memory: 2048 +name: hotplug +net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0 +ostype: l26 +scsi0: local:8006/vm-8006-disk-0.qcow2,size=32G +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 1 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 + +[PENDING] +scsi14: local:8006/vm-8006-disk-1.qcow2,size=32G diff --git a/src/test/hotplug/disk-add-scsi14-old.conf.expected b/src/test/hotplug/disk-add-scsi14-old.conf.expected new file mode 100644 index 00000000..63c2678d --- /dev/null +++ b/src/test/hotplug/disk-add-scsi14-old.conf.expected @@ -0,0 +1,23 @@ +# recorded actions +storage activate_volumes ["local:8006/vm-8006-disk-1.qcow2"] + +# hotplug errors +scsi14: hotplug problem - can't hotplug bridge necessary for 'scsihw2' + +# differences to a freshly started VM + +# resulting config +bootdisk: scsi0 +cores: 2 +machine: pc-i440fx-11.0 +memory: 2048 +name: hotplug +net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0 +ostype: l26 +scsi0: local:8006/vm-8006-disk-0.qcow2,size=32G +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 1 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 + +[PENDING] +scsi14: local:8006/vm-8006-disk-1.qcow2,size=32G -- 2.47.3