From: Akash Kulhalli Date: Wed, 10 Jun 2026 10:54:13 +0000 (+0530) Subject: qemuhotplugtest: test setvcpu async unplug X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44da70fc45be4cf5774d60345c3f190113478a46;p=thirdparty%2Flibvirt.git qemuhotplugtest: test setvcpu async unplug Add async unplug coverage for the setvcpu path. The x86 case covers removal of a single hotpluggable vCPU entity, while the ppc64 case covers removal of a grouped hotpluggable entity. Both cases verify the pending XML before DEVICE_DELETED, the final XML after completion, and the expected vcpu-removed events. Signed-off-by: Akash Kulhalli Reviewed-by: Peter Krempa --- diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 0ea2789aec..d6924202e6 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -765,7 +765,7 @@ testQemuHotplugCpuGroupAsync(const void *opaque) } -static int G_GNUC_UNUSED +static int testQemuHotplugCpuIndividualAsync(const void *opaque) { return testQemuHotplugCpuAsync(opaque, false); @@ -1171,10 +1171,14 @@ mymain(void) DO_TEST_CPU_INDIVIDUAL("x86_64", "x86-modern-individual-add", "7", true, false); DO_TEST_CPU_INDIVIDUAL("x86_64", "x86-modern-individual-add", "6,7", true, true); DO_TEST_CPU_INDIVIDUAL("x86_64", "x86-modern-individual-add", "7", false, true); + DO_TEST_CPU_INDIVIDUAL_ASYNC("x86_64", "x86-modern-individual-del-async", + "7", "vcpu7", "7"); DO_TEST_CPU_INDIVIDUAL("ppc64", "ppc64-modern-individual", "16-23", true, false); DO_TEST_CPU_INDIVIDUAL("ppc64", "ppc64-modern-individual", "16-22", true, true); DO_TEST_CPU_INDIVIDUAL("ppc64", "ppc64-modern-individual", "17", true, true); + DO_TEST_CPU_INDIVIDUAL_ASYNC("ppc64", "ppc64-modern-individual-del-async", + "16-23", "vcpu16", "16-23"); qemuTestDriverFree(&driver); virObjectUnref(data.vm); diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-del-async-domain.xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-del-async-domain.xml new file mode 100644 index 0000000000..29f1a5ac45 --- /dev/null +++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-del-async-domain.xml @@ -0,0 +1,68 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hvm + + + + POWER9 + + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + +
+ + + + + +