On 2026-06-10 2:37 PM, Peter Krempa wrote:
On Wed, May 20, 2026 at 16:49:36 +0530, Akash Kulhalli via Devel wrote:
Add async unplug coverage for the setvcpus count-based path.
The test downscales an x86 domain by multiple hotpluggable vCPU entities,
verifying the pending XML before completion, the final XML after DEVICE_DELETED
processing, and one vcpu-removed event for each removed vCPU.
Signed-off-by: Akash Kulhalli <[email protected]>
---
tests/qemuhotplugtest.c | 20 +++
...x86-modern-bulk-downscale-async-domain.xml | 42 +++++
...6-modern-bulk-downscale-async-monitor.json | 159 ++++++++++++++++++
...odern-bulk-downscale-async-result-conf.xml | 42 +++++
...odern-bulk-downscale-async-result-live.xml | 50 ++++++
...lk-downscale-async-result-pending-live.xml | 50 ++++++
6 files changed, 363 insertions(+)
create mode 100644
tests/qemuhotplugtestcpus/x86-modern-bulk-downscale-async-domain.xml
create mode 100644
tests/qemuhotplugtestcpus/x86-modern-bulk-downscale-async-monitor.json
create mode 100644
tests/qemuhotplugtestcpus/x86-modern-bulk-downscale-async-result-conf.xml
create mode 100644
tests/qemuhotplugtestcpus/x86-modern-bulk-downscale-async-result-live.xml
create mode 100644
tests/qemuhotplugtestcpus/x86-modern-bulk-downscale-async-result-pending-live.xml
After this one the build passes, so you'll need to either move the code
around so that new functions are added only when used or add
G_GNUC_UNUSED or something like that to satisfy the requirement that the
tree must cleanly build after each patch.
I'll mark them unused in the initial patches, and then remove the
attribute when they're used in the same patch. That should keep the
builds clean.
Regarding the testing, it's IMO a bit too much code for the stuff [1] it
will be testing, but since we don't have anything for testing events I
guess I'm okay with it once you post a fixed version.
You can add:
Reviewed-by: Peter Krempa <[email protected]>
To patches 1-5.
[1] Generally I also judge the code for the "What if I'm the one stuck
with maintaining it after the original author is no longer contributing
to the project" situation.