* [PATCH v3 1/4] tests/functional/ppc64: add pseries CPU hotplug test
2026-11-24 11:00 [PATCH v3 0/4] tests/functional/ppc64: add pseries hotplug and caps tests Anushree Mathur
@ 2026-11-24 11:00 ` Anushree Mathur
2026-11-27 1:57 ` Utkarsh Verma
2026-11-24 11:00 ` [PATCH v3 2/4] tests/functional/ppc64: add pseries security caps test Anushree Mathur
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Anushree Mathur @ 2026-11-24 11:00 UTC (permalink / raw)
To: Harsh Prateek Bora, Cédric Le Goater, Nicholas Piggin,
qemu-devel, qemu-ppc
Cc: Anushree Mathur, Thomas Huth, Amit Machhiwal, Miles Glenn,
Aditya Gupta, misanjum, Chinmay Rath, Utkarsh Verma
Add a functional test that exercises DLPAR (Dynamic Logical
Partitioning) CPU hotplug and unplug on the pseries machine type.
The pseries machine supports adding and removing CPU cores at runtime
via RTAS calls made by the guest. This test boots a minimal Linux
kernel with a single core (-smp 2,threads=2,cores=1,maxcpus=4), then
uses QMP device_add to attach a second core, verifies the guest sees
it via /sys/devices/system/cpu/online, and then removes it again.
The CPU driver name is detected dynamically via query-hotpluggable-cpus
so the test remains correct when the default pseries CPU changes in a
future QEMU release (e.g. power10 -> power11).
Two variants are provided:
- test_pseries_cpu_hotplug_tcg: runs under TCG on any host arch.
- test_pseries_cpu_hotplug_kvm: runs under KVM on ppc64le hosts with
kvm-hv loaded; skipped automatically elsewhere. An explicit
/proc/modules check for kvm_hv is added because on ppc64le the base
kvm module can create /dev/kvm without kvm-hv, which would cause the
test to error rather than skip.
x-vof=on is intentionally NOT used: VOF skips the SLOF firmware path
that sets up the RTAS event interrupt, causing CPU hotplug events to be
silently dropped by the guest kernel.
Signed-off-by: Anushree Mathur <anushree.mathur@linux.ibm.com>
---
v3: put the -smp option on its own line in the comments and use plain
ASCII instead of arrows; added snapshot=on to the rootfs drive; bounded
the wait loops (45 seconds) and report a failure message on timeout;
wait for the QMP DEVICE_DELETED event after device_del.
tests/functional/ppc64/meson.build | 2 +
tests/functional/ppc64/test_hotplug_cpu.py | 207 +++++++++++++++++++++
2 files changed, 209 insertions(+)
create mode 100755 tests/functional/ppc64/test_hotplug_cpu.py
diff --git a/tests/functional/ppc64/meson.build b/tests/functional/ppc64/meson.build
index cb3c745624..45468087cb 100644
--- a/tests/functional/ppc64/meson.build
+++ b/tests/functional/ppc64/meson.build
@@ -2,6 +2,7 @@
test_ppc64_timeouts = {
'fadump' : 480,
+ 'hotplug_cpu' : 480,
'hv' : 1000,
'mac99' : 120,
'openbsd' : 240,
@@ -19,6 +20,7 @@ tests_ppc64_system_quick = [
tests_ppc64_system_thorough = [
'e500',
'fadump',
+ 'hotplug_cpu',
'hv',
'mac99',
'openbsd',
diff --git a/tests/functional/ppc64/test_hotplug_cpu.py b/tests/functional/ppc64/test_hotplug_cpu.py
new file mode 100755
index 0000000000..57bcf9af63
--- /dev/null
+++ b/tests/functional/ppc64/test_hotplug_cpu.py
@@ -0,0 +1,207 @@
+#!/usr/bin/env python3
+# Copyright (c) 2025 IBM Corporation
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+import platform
+
+from qemu_test import LinuxKernelTest, Asset
+from qemu_test import exec_command_and_wait_for_pattern
+
+
+class PseriesCpuHotplug(LinuxKernelTest):
+ """
+ Test DLPAR CPU hotplug/unplug on the pseries machine type.
+
+ The pseries machine implements the PAPR CPU hotplug protocol: the
+ hypervisor presents Dynamic Reconfiguration Connectors (DRCs) to
+ the guest, and the guest uses RTAS calls to accept or reject CPUs
+ that are offered or withdrawn.
+
+ Topology used (passed as the -smp option):
+ 2,threads=2,cores=1,maxcpus=4
+ This gives 1 active core (cpu0+cpu1 online) and room for a second
+ one. Hot-add core-id=2 and online goes from 0-1 to 0-3; hot-remove
+ it and online goes back to 0-1. Verified via
+ /sys/devices/system/cpu/online.
+
+ Two variants are provided:
+ * test_pseries_cpu_hotplug_tcg - uses TCG, runs on any host arch.
+ * test_pseries_cpu_hotplug_kvm - uses KVM, requires a ppc64le host
+ with kvm-hv loaded; skipped automatically on other hosts.
+ """
+
+ timeout = 480
+
+ # Buildroot image built for pseries (ppc64le little-endian paravirtual).
+ ASSET_KERNEL = Asset(
+ ('https://github.com/raphael502/qemu-ppc-boot/raw/refs/heads/main/'
+ 'buildroot/qemu_ppc64le_pseries-2023.11-8-gdcd9f0f6eb-20240104/'
+ 'vmlinux'),
+ 'fc20d5820ad83ed514ac5f88af7e2692d47ab7f36dab290cdb137d05b98502f5')
+
+ ASSET_ROOTFS = Asset(
+ ('https://github.com/raphael502/qemu-ppc-boot/raw/refs/heads/main/'
+ 'buildroot/qemu_ppc64le_pseries-2023.11-8-gdcd9f0f6eb-20240104/'
+ 'rootfs.ext2'),
+ '6fd31e2300e9921d1192aa5c997760fc8bc40a18513cc466c56902f72d61fd23')
+
+ def _boot_pseries(self, accel):
+ """
+ Boot pseries with 1 core present and room for a second core.
+
+ The -smp option used here:
+ 2,threads=2,cores=1,maxcpus=4
+ gives us:
+ * 1 active core -> cpu0 + cpu1 (2 SMT threads)
+ * 1 spare core slot that can be filled by device_add
+
+ accel must be 'tcg' or 'kvm'.
+ """
+ kernel_path = self.ASSET_KERNEL.fetch()
+ rootfs_path = self.ASSET_ROOTFS.fetch()
+
+ self.set_machine('pseries')
+ # Do NOT use x-vof=on here: VOF skips the SLOF firmware path that
+ # sets up the RTAS event interrupt (epow/check-exception). Without
+ # SLOF, the guest kernel's pseries_hp_wq workqueue is never triggered
+ # and CPU hotplug RTAS events are silently dropped.
+ if accel == 'tcg':
+ self.vm.add_args('-accel', 'tcg,thread=multi')
+ else:
+ self.vm.add_args('-accel', 'kvm')
+ self.vm.add_args('-smp', '2,threads=2,cores=1,maxcpus=4')
+ self.vm.add_args('-m', '512M')
+ self.vm.set_console()
+ # snapshot=on keeps the cached rootfs asset unmodified
+ self.vm.add_args(
+ '-drive',
+ f'file={rootfs_path},if=scsi,index=0,format=raw,snapshot=on')
+ self.vm.add_args(
+ '-kernel', kernel_path,
+ '-append', 'root=/dev/sda console=hvc0 rootwait printk.time=0',
+ )
+ self.vm.launch()
+ self.wait_for_console_pattern('buildroot login:')
+ exec_command_and_wait_for_pattern(self, 'root', '#')
+
+ def _get_hotplug_cpu_driver(self):
+ """
+ Return the spapr-cpu-core driver name for an empty hotplug slot.
+
+ query-hotpluggable-cpus lists all possible CPU slots; entries
+ without a 'qom-path' key are currently empty. The 'type' field
+ of any empty slot gives the driver name to pass to device_add.
+ This avoids hard-coding a CPU version string (e.g.
+ 'power11_v2.0-spapr-cpu-core') that would break when the default
+ pseries CPU changes in a future QEMU release.
+ """
+ cpus = self.vm.cmd('query-hotpluggable-cpus')
+ for entry in cpus:
+ if 'qom-path' not in entry:
+ return entry['type']
+ self.fail('No empty hotpluggable CPU slot found')
+
+ def _do_cpu_hotplug(self):
+ """
+ Shared hotplug/unplug logic, called after the guest has booted.
+
+ Confirms cpu0+cpu1 are online, hot-adds a second core (cpu2+cpu3),
+ verifies they come online, hot-removes the core, and verifies they
+ go offline. Finishes with a clean guest poweroff.
+ """
+ # Confirm initial state: cpu0 and cpu1 online, cpu2 offline/absent.
+ # Use /sys/devices/system/cpu/online which lists only truly online
+ # CPUs - sysfs cpu dirs exist for possible CPUs too so ls is wrong.
+ exec_command_and_wait_for_pattern(
+ self,
+ 'cat /sys/devices/system/cpu/online',
+ '0-1',
+ )
+
+ # Detect the correct driver for the empty hotplug slot dynamically
+ # so the test works regardless of which CPU version pseries defaults
+ # to (power10, power11, etc.).
+ driver = self._get_hotplug_cpu_driver()
+
+ # Hot-add core at core-id=2 (supplies threads cpu2 and cpu3 in SMT-2).
+ # With threads=2 the available hotplug slot is core-id=2.
+ self.vm.cmd(
+ 'device_add',
+ driver=driver,
+ id='hotcpu1',
+ **{'core-id': 2},
+ )
+
+ # Poll (for up to 45 seconds) until cpu2+cpu3 are online. The
+ # sentinel is built using a shell variable (echo hotplug_cpu_$R)
+ # so the full strings 'hotplug_cpu_done' and 'hotplug_cpu_timeout'
+ # never appear in the command text. This avoids a false match on
+ # the shell's echo of the typed command, which
+ # exec_command_and_wait_for_pattern scans before any output arrives.
+ exec_command_and_wait_for_pattern(
+ self,
+ 'for i in $(seq 1 90); do'
+ ' [ "$(cat /sys/devices/system/cpu/online)" = "0-3" ] && break;'
+ ' sleep 0.5; done;'
+ ' if [ "$(cat /sys/devices/system/cpu/online)" = "0-3" ];'
+ ' then R=done; else R=timeout; fi; echo hotplug_cpu_$R',
+ 'hotplug_cpu_done',
+ failure_message='hotplug_cpu_timeout',
+ )
+
+ # Hot-remove the core and wait for QEMU to confirm it is gone.
+ self.vm.cmd('device_del', id='hotcpu1')
+ event = self.vm.event_wait(
+ 'DEVICE_DELETED',
+ timeout=60.0,
+ match={'data': {'device': 'hotcpu1'}},
+ )
+ self.assertIsNotNone(event, 'DEVICE_DELETED not received for hotcpu1')
+
+ # Poll (for up to 45 seconds) until the guest sees the core gone.
+ exec_command_and_wait_for_pattern(
+ self,
+ 'for i in $(seq 1 90); do'
+ ' [ "$(cat /sys/devices/system/cpu/online)" = "0-1" ] && break;'
+ ' sleep 0.5; done;'
+ ' if [ "$(cat /sys/devices/system/cpu/online)" = "0-1" ];'
+ ' then R=done; else R=timeout; fi; echo unplug_cpu_$R',
+ 'unplug_cpu_done',
+ failure_message='unplug_cpu_timeout',
+ )
+
+ exec_command_and_wait_for_pattern(self, 'poweroff', '#')
+ self.vm.wait()
+
+ def test_pseries_cpu_hotplug_tcg(self):
+ """Hot-add then hot-remove a CPU core on pseries using TCG."""
+ self.require_accelerator('tcg')
+ self._boot_pseries('tcg')
+ self._do_cpu_hotplug()
+
+ def test_pseries_cpu_hotplug_kvm(self):
+ """Hot-add then hot-remove a CPU core on pseries using KVM.
+
+ Requires a ppc64le host with kvm-hv loaded; skipped automatically
+ on other hosts.
+ """
+ self.require_accelerator('kvm')
+ # On ppc64le the base kvm module can be loaded (and /dev/kvm created)
+ # without kvm-hv, so checking /dev/kvm alone is not sufficient.
+ # Verify that kvm_hv is actually present in /proc/modules.
+ # This check is ppc64-specific; other arches (x86, arm, ...) use
+ # different KVM modules and rely solely on /dev/kvm.
+ if platform.machine() in ('ppc64le', 'ppc64'):
+ try:
+ with open('/proc/modules', encoding='utf-8') as f:
+ if not any(line.split()[0] == 'kvm_hv' for line in f):
+ self.skipTest('kvm-hv module is not loaded')
+ except OSError:
+ pass
+ self._boot_pseries('kvm')
+ self._do_cpu_hotplug()
+
+
+if __name__ == '__main__':
+ PseriesCpuHotplug.main()
--
2.55.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 1/4] tests/functional/ppc64: add pseries CPU hotplug test
2026-11-24 11:00 ` [PATCH v3 1/4] tests/functional/ppc64: add pseries CPU hotplug test Anushree Mathur
@ 2026-11-27 1:57 ` Utkarsh Verma
0 siblings, 0 replies; 8+ messages in thread
From: Utkarsh Verma @ 2026-11-27 1:57 UTC (permalink / raw)
To: Anushree Mathur, Harsh Prateek Bora, Cédric Le Goater,
Nicholas Piggin, qemu-devel, qemu-ppc
Cc: Thomas Huth, Amit Machhiwal, Miles Glenn, Aditya Gupta, misanjum,
Chinmay Rath
On 11/24/26 4:30 PM, Anushree Mathur wrote:
> Add a functional test that exercises DLPAR (Dynamic Logical
> Partitioning) CPU hotplug and unplug on the pseries machine type.
<snip>> + exec_command_and_wait_for_pattern(self, 'poweroff', '#')
> + self.vm.wait()
Nit: '#' is not a good pattern to wait for, since it can match an old
prompt. It would be better to use 'Power down' like the other tests do.
Though it is not harmful here because self.vm.wait() follows, but it
would be more accurate. I tried poweroff and the console shows:
# poweroff
<snip>
[ T163] reboot: Power down
Apart from that, the patch looks good to me.
Reviewed-by: Utkarsh Verma <uverma@linux.ibm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 2/4] tests/functional/ppc64: add pseries security caps test
2026-11-24 11:00 [PATCH v3 0/4] tests/functional/ppc64: add pseries hotplug and caps tests Anushree Mathur
2026-11-24 11:00 ` [PATCH v3 1/4] tests/functional/ppc64: add pseries CPU hotplug test Anushree Mathur
@ 2026-11-24 11:00 ` Anushree Mathur
2026-11-27 12:15 ` Utkarsh Verma
2026-11-24 11:00 ` [PATCH v3 3/4] tests/functional/ppc64: add pseries virtio-blk hotplug test Anushree Mathur
2026-11-24 11:00 ` [PATCH v3 4/4] MAINTAINERS: add pseries hotplug and caps functional tests Anushree Mathur
3 siblings, 1 reply; 8+ messages in thread
From: Anushree Mathur @ 2026-11-24 11:00 UTC (permalink / raw)
To: Harsh Prateek Bora, Cédric Le Goater, Nicholas Piggin,
qemu-devel, qemu-ppc
Cc: Anushree Mathur, Thomas Huth, Amit Machhiwal, Miles Glenn,
Aditya Gupta, misanjum, Chinmay Rath, Utkarsh Verma
Add a quick functional test (no Linux boot required) that checks that
the pseries machine type accepts its security capability options and
reports them back with the configured values, and that backward-compatible
versioned machine types can be instantiated, using the QMP interface.
Each test starts QEMU with -S (halted) so no firmware or kernel is
needed. The tests cover:
* test_pseries_in_query_machines: pseries appears in query-machines
and is marked is-default=true.
* test_pseries_security_caps_override: cap-cfpc, cap-sbbc, cap-ibs
and cap-ccf-assist overrides are accepted, the machine starts and
qom-get on /machine returns the values that were set.
* test_pseries_nested_hv_cap: cap-nested-hv=on is accepted and
qom-get reports it as on.
* test_pseries_compat_7_2/9_2/10_0: versioned compat machines can be
instantiated and are not marked is-default.
* test_pseries_cap_hpt_max_page_size: cap-hpt-max-page-size is
reachable via the QOM tree at /machine.
All tests complete in under 5 seconds each and are registered in the
tests_ppc64_system_quick list.
Signed-off-by: Anushree Mathur <anushree.mathur@linux.ibm.com>
---
v3: check the cap-cfpc, cap-sbbc, cap-ibs, cap-ccf-assist and
cap-nested-hv values with qom-get instead of only checking that QEMU
starts; dropped the redundant "pseries" from the -machine arguments;
the compat machine check now looks at is-default (is-current is not a
query-machines field, so the old assertion could never fail).
tests/functional/ppc64/meson.build | 1 +
tests/functional/ppc64/test_pseries_caps.py | 169 ++++++++++++++++++++
2 files changed, 170 insertions(+)
create mode 100755 tests/functional/ppc64/test_pseries_caps.py
diff --git a/tests/functional/ppc64/meson.build b/tests/functional/ppc64/meson.build
index 45468087cb..d91209f041 100644
--- a/tests/functional/ppc64/meson.build
+++ b/tests/functional/ppc64/meson.build
@@ -14,6 +14,7 @@ test_ppc64_timeouts = {
tests_ppc64_system_quick = [
'migration',
+ 'pseries_caps',
'vmstate',
]
diff --git a/tests/functional/ppc64/test_pseries_caps.py b/tests/functional/ppc64/test_pseries_caps.py
new file mode 100755
index 0000000000..2b2d33229f
--- /dev/null
+++ b/tests/functional/ppc64/test_pseries_caps.py
@@ -0,0 +1,169 @@
+#!/usr/bin/env python3
+# Copyright (c) 2025 IBM Corporation
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from qemu_test import QemuSystemTest
+
+
+class PseriesCapsTest(QemuSystemTest):
+ """
+ Quick (no-boot) tests for pseries machine capabilities.
+
+ Each test starts QEMU with -S (halted) so no firmware or kernel is
+ needed. The tests exercise the QMP interface to verify that:
+
+ * The machine type is visible in 'query-machines' output.
+ * Known security capability properties (cap-cfpc, cap-sbbc,
+ cap-ibs, cap-ccf-assist, cap-nested-hv) are accepted and read
+ back with the values that were set.
+ * Versioned compat machines (pseries-7.2, pseries-9.2 and
+ pseries-10.0) can be instantiated and are not marked
+ is-default.
+ * cap-hpt-max-page-size is reachable via the QOM tree.
+ """
+
+ timeout = 30
+
+ # ------------------------------------------------------------------ #
+ # Helpers
+ # ------------------------------------------------------------------ #
+
+ def _launch_stopped(self, machine='pseries', extra_args=None):
+ """Launch QEMU paused (-S) for the named machine and return."""
+ self.set_machine(machine)
+ self.vm.add_args('-S', '-nodefaults')
+ if extra_args:
+ self.vm.add_args(*extra_args)
+ self.vm.launch()
+
+ def _query_machine_info(self, name):
+ """Return the entry from query-machines that matches *name* or alias."""
+ machines = self.vm.cmd('query-machines')
+ for m in machines:
+ if m['name'] == name or m.get('alias') == name:
+ return m
+ return None
+
+ # ------------------------------------------------------------------ #
+ # Test: basic pseries machine is visible in query-machines
+ # ------------------------------------------------------------------ #
+
+ def test_pseries_in_query_machines(self):
+ """pseries (latest) must appear in query-machines output."""
+ self._launch_stopped('pseries')
+ info = self._query_machine_info('pseries')
+ self.assertIsNotNone(info,
+ 'pseries not found in query-machines output')
+ # The default/latest versioned machine carries is-default=True.
+ self.assertTrue(
+ info.get('is-default', False),
+ 'pseries alias should be marked is-default=true',
+ )
+
+ # ------------------------------------------------------------------ #
+ # Test: security cap overrides are accepted without error
+ # ------------------------------------------------------------------ #
+
+ def test_pseries_security_caps_override(self):
+ """
+ Verify pseries accepts all well-known security cap overrides.
+
+ These are the options used by the KVM nested-HV path in
+ test_hv.py. Check that QEMU starts cleanly and that each
+ capability reads back through qom-get with the value that was
+ set on the command line.
+ """
+ caps = (
+ 'cap-cfpc=broken,'
+ 'cap-sbbc=broken,'
+ 'cap-ibs=broken,'
+ 'cap-ccf-assist=off'
+ )
+ self._launch_stopped('pseries', extra_args=['-machine', caps])
+ for name in ('cap-cfpc', 'cap-sbbc', 'cap-ibs'):
+ self.assertEqual(
+ self.vm.cmd('qom-get', path='/machine', property=name),
+ 'broken',
+ f'{name} should read back as broken',
+ )
+ self.assertFalse(
+ self.vm.cmd('qom-get', path='/machine',
+ property='cap-ccf-assist'),
+ 'cap-ccf-assist should read back as off',
+ )
+
+ # ------------------------------------------------------------------ #
+ # Test: nested-HV cap is accepted
+ # ------------------------------------------------------------------ #
+
+ def test_pseries_nested_hv_cap(self):
+ """pseries must accept cap-nested-hv=on and report it as on."""
+ self._launch_stopped(
+ 'pseries',
+ extra_args=['-machine', 'x-vof=on,cap-nested-hv=on'],
+ )
+ self.assertTrue(
+ self.vm.cmd('qom-get', path='/machine',
+ property='cap-nested-hv'),
+ 'cap-nested-hv should read back as on',
+ )
+
+ # ------------------------------------------------------------------ #
+ # Test: versioned compat machines can be instantiated
+ # ------------------------------------------------------------------ #
+
+ def _test_compat_machine(self, version_str):
+ """
+ Helper: launch a versioned compat machine and verify that the
+ name appears in query-machines and that it is not marked
+ is-default (the default is always the latest version).
+ """
+ self._launch_stopped(version_str)
+ info = self._query_machine_info(version_str)
+ self.assertIsNotNone(
+ info,
+ f'compat machine {version_str!r} not found in query-machines',
+ )
+ # query-machines only reports is-default for the default (latest)
+ # machine, so it must be absent or False for a compat machine.
+ self.assertFalse(
+ info.get('is-default', False),
+ f'{version_str} should not be marked is-default=true',
+ )
+
+ def test_pseries_compat_7_2(self):
+ """pseries-7.2 (vmstate reference version) can be instantiated."""
+ self._test_compat_machine('pseries-7.2')
+
+ def test_pseries_compat_9_2(self):
+ """pseries-9.2 can be instantiated."""
+ self._test_compat_machine('pseries-9.2')
+
+ def test_pseries_compat_10_0(self):
+ """pseries-10.0 can be instantiated."""
+ self._test_compat_machine('pseries-10.0')
+
+ # ------------------------------------------------------------------ #
+ # Test: cap-hpt-max-page-size is reachable via the QOM tree
+ # ------------------------------------------------------------------ #
+
+ def test_pseries_cap_hpt_max_page_size(self):
+ """
+ Verify that pseries exposes cap-hpt-max-page-size in its
+ machine properties (it is used by migration compat checks).
+ """
+ self._launch_stopped('pseries')
+ # query-machine-props is not a real QMP command; we use the
+ # object model instead.
+ props = self.vm.cmd('qom-list', path='/machine')
+ prop_names = [p['name'] for p in props]
+ # The property should be reachable via the QOM tree.
+ self.assertIn(
+ 'cap-hpt-max-page-size', prop_names,
+ 'pseries /machine must expose cap-hpt-max-page-size via QOM',
+ )
+
+
+if __name__ == '__main__':
+ PseriesCapsTest.main()
--
2.55.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 2/4] tests/functional/ppc64: add pseries security caps test
2026-11-24 11:00 ` [PATCH v3 2/4] tests/functional/ppc64: add pseries security caps test Anushree Mathur
@ 2026-11-27 12:15 ` Utkarsh Verma
0 siblings, 0 replies; 8+ messages in thread
From: Utkarsh Verma @ 2026-11-27 12:15 UTC (permalink / raw)
To: Anushree Mathur, Harsh Prateek Bora, Cédric Le Goater,
Nicholas Piggin, qemu-devel, qemu-ppc
Cc: Thomas Huth, Amit Machhiwal, Miles Glenn, Aditya Gupta, misanjum,
Chinmay Rath
On 11/24/26 4:30 PM, Anushree Mathur wrote:
> Add a quick functional test (no Linux boot required) that checks that
> the pseries machine type accepts its security capability options and
> reports them back with the configured values, and that backward-compatible
> versioned machine types can be instantiated, using the QMP interface.
>
> Each test starts QEMU with -S (halted) so no firmware or kernel is
> needed. The tests cover:
>
> * test_pseries_in_query_machines: pseries appears in query-machines
> and is marked is-default=true.
> * test_pseries_security_caps_override: cap-cfpc, cap-sbbc, cap-ibs
> and cap-ccf-assist overrides are accepted, the machine starts and
> qom-get on /machine returns the values that were set.
> * test_pseries_nested_hv_cap: cap-nested-hv=on is accepted and
> qom-get reports it as on.
> * test_pseries_compat_7_2/9_2/10_0: versioned compat machines can be
> instantiated and are not marked is-default.
> * test_pseries_cap_hpt_max_page_size: cap-hpt-max-page-size is
> reachable via the QOM tree at /machine.
>
> All tests complete in under 5 seconds each and are registered in the
> tests_ppc64_system_quick list.
>
> Signed-off-by: Anushree Mathur <anushree.mathur@linux.ibm.com>
> ---
> v3: check the cap-cfpc, cap-sbbc, cap-ibs, cap-ccf-assist and
> cap-nested-hv values with qom-get instead of only checking that QEMU
> starts; dropped the redundant "pseries" from the -machine arguments;
> the compat machine check now looks at is-default (is-current is not a
> query-machines field, so the old assertion could never fail).
>
> tests/functional/ppc64/meson.build | 1 +
> tests/functional/ppc64/test_pseries_caps.py | 169 ++++++++++++++++++++
> 2 files changed, 170 insertions(+)
> create mode 100755 tests/functional/ppc64/test_pseries_caps.py
>
> diff --git a/tests/functional/ppc64/meson.build b/tests/functional/ppc64/meson.build
> index 45468087cb..d91209f041 100644
> --- a/tests/functional/ppc64/meson.build
> +++ b/tests/functional/ppc64/meson.build
> @@ -14,6 +14,7 @@ test_ppc64_timeouts = {
>
> tests_ppc64_system_quick = [
> 'migration',
> + 'pseries_caps',
> 'vmstate',
> ]
>
> diff --git a/tests/functional/ppc64/test_pseries_caps.py b/tests/functional/ppc64/test_pseries_caps.py
> new file mode 100755
> index 0000000000..2b2d33229f
> --- /dev/null
> +++ b/tests/functional/ppc64/test_pseries_caps.py
> @@ -0,0 +1,169 @@
> +#!/usr/bin/env python3
> +# Copyright (c) 2025 IBM Corporation
> +#
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +
> +from qemu_test import QemuSystemTest
> +
> +
> +class PseriesCapsTest(QemuSystemTest):
> + """
> + Quick (no-boot) tests for pseries machine capabilities.
> +
> + Each test starts QEMU with -S (halted) so no firmware or kernel is
> + needed. The tests exercise the QMP interface to verify that:
> +
Review comment by sashiko:
[LOW] In tests/functional/ppc64/test_pseries_caps.py (PseriesCapsTest
class docstring) and the commit message, the claim that -S means no
firmware is needed is inaccurate. spapr_machine_init() in hw/ppc/spapr.c
always looks up and loads slof.bin (vof.bin with x-vof=on) via
qemu_find_file() and load_image_targphys() before -S takes effect, and
it exits if the image is missing. -S only means the firmware is not
executed. Reword the docstring and commit message to say so, and note
that the image must still be present in pc-bios. Also,
test_pseries_nested_hv_cap passes the experimental x-vof=on with no
stated reason. cap-nested-hv is validated in cap_nested_kvm_hv_apply()
in hw/ppc/spapr_caps.c independently of VOF, so x-vof=on only switches
the required image to vof.bin and makes this one test depend on an
experimental x- property. The reason test_hv.py uses it (avoiding slow
SLOF boot) does not apply to a -S launch. Drop x-vof=on or add a comment
explaining why it is needed.
> + * The machine type is visible in 'query-machines' output.
> + * Known security capability properties (cap-cfpc, cap-sbbc,
> + cap-ibs, cap-ccf-assist, cap-nested-hv) are accepted and read
> + back with the values that were set.
> + * Versioned compat machines (pseries-7.2, pseries-9.2 and
> + pseries-10.0) can be instantiated and are not marked
> + is-default.
> + * cap-hpt-max-page-size is reachable via the QOM tree.
> + """
> +
> + timeout = 30
> +
> + # ------------------------------------------------------------------ #
> + # Helpers
> + # ------------------------------------------------------------------ #
> +
> + def _launch_stopped(self, machine='pseries', extra_args=None):
> + """Launch QEMU paused (-S) for the named machine and return."""
> + self.set_machine(machine)
> + self.vm.add_args('-S', '-nodefaults')
> + if extra_args:
> + self.vm.add_args(*extra_args)
> + self.vm.launch()
> +
> + def _query_machine_info(self, name):
> + """Return the entry from query-machines that matches *name* or alias."""
> + machines = self.vm.cmd('query-machines')
> + for m in machines:
> + if m['name'] == name or m.get('alias') == name:
> + return m
> + return None
> +
> + # ------------------------------------------------------------------ #
> + # Test: basic pseries machine is visible in query-machines
> + # ------------------------------------------------------------------ #
> +
> + def test_pseries_in_query_machines(self):
> + """pseries (latest) must appear in query-machines output."""
> + self._launch_stopped('pseries')
> + info = self._query_machine_info('pseries')
> + self.assertIsNotNone(info,
> + 'pseries not found in query-machines output')
> + # The default/latest versioned machine carries is-default=True.
> + self.assertTrue(
> + info.get('is-default', False),
> + 'pseries alias should be marked is-default=true',
> + )
> +
> + # ------------------------------------------------------------------ #
> + # Test: security cap overrides are accepted without error
> + # ------------------------------------------------------------------ #
> +
> + def test_pseries_security_caps_override(self):
> + """
> + Verify pseries accepts all well-known security cap overrides.
> +
> + These are the options used by the KVM nested-HV path in
> + test_hv.py. Check that QEMU starts cleanly and that each
> + capability reads back through qom-get with the value that was
> + set on the command line.
> + """
> + caps = (
> + 'cap-cfpc=broken,'
> + 'cap-sbbc=broken,'
> + 'cap-ibs=broken,'
> + 'cap-ccf-assist=off'
> + )
> + self._launch_stopped('pseries', extra_args=['-machine', caps])
> + for name in ('cap-cfpc', 'cap-sbbc', 'cap-ibs'):
> + self.assertEqual(
> + self.vm.cmd('qom-get', path='/machine', property=name),
> + 'broken',
> + f'{name} should read back as broken',
> + )
> + self.assertFalse(
> + self.vm.cmd('qom-get', path='/machine',
> + property='cap-ccf-assist'),
> + 'cap-ccf-assist should read back as off',
> + )
> +
> + # ------------------------------------------------------------------ #
> + # Test: nested-HV cap is accepted
> + # ------------------------------------------------------------------ #
> +
> + def test_pseries_nested_hv_cap(self):
> + """pseries must accept cap-nested-hv=on and report it as on."""
> + self._launch_stopped(
> + 'pseries',
> + extra_args=['-machine', 'x-vof=on,cap-nested-hv=on'],
> + )
> + self.assertTrue(
> + self.vm.cmd('qom-get', path='/machine',
> + property='cap-nested-hv'),
> + 'cap-nested-hv should read back as on',
> + )
> +
> + # ------------------------------------------------------------------ #
> + # Test: versioned compat machines can be instantiated
> + # ------------------------------------------------------------------ #
> +
> + def _test_compat_machine(self, version_str):
> + """
> + Helper: launch a versioned compat machine and verify that the
> + name appears in query-machines and that it is not marked
> + is-default (the default is always the latest version).
> + """
> + self._launch_stopped(version_str)
> + info = self._query_machine_info(version_str)
> + self.assertIsNotNone(
> + info,
> + f'compat machine {version_str!r} not found in query-machines',
> + )
> + # query-machines only reports is-default for the default (latest)
> + # machine, so it must be absent or False for a compat machine.
> + self.assertFalse(
> + info.get('is-default', False),
> + f'{version_str} should not be marked is-default=true',
> + )
> +
This test seems a little weak, as it is only checking for "is-default"
value is either False or is missing (which could be true for incorrect
values as well)
It would be better to atleast have the machine name property verified as
well.
> + def test_pseries_compat_7_2(self):
> + """pseries-7.2 (vmstate reference version) can be instantiated."""
> + self._test_compat_machine('pseries-7.2')
> +
> + def test_pseries_compat_9_2(self):
> + """pseries-9.2 can be instantiated."""
> + self._test_compat_machine('pseries-9.2')
> +
> + def test_pseries_compat_10_0(self):
> + """pseries-10.0 can be instantiated."""
> + self._test_compat_machine('pseries-10.0')
> +
> + # ------------------------------------------------------------------ #
> + # Test: cap-hpt-max-page-size is reachable via the QOM tree
> + # ------------------------------------------------------------------ #
> +
> + def test_pseries_cap_hpt_max_page_size(self):
> + """
> + Verify that pseries exposes cap-hpt-max-page-size in its
> + machine properties (it is used by migration compat checks).
> + """
> + self._launch_stopped('pseries')
> + # query-machine-props is not a real QMP command; we use the
> + # object model instead.
> + props = self.vm.cmd('qom-list', path='/machine')
> + prop_names = [p['name'] for p in props]
> + # The property should be reachable via the QOM tree.
> + self.assertIn(
> + 'cap-hpt-max-page-size', prop_names,
> + 'pseries /machine must expose cap-hpt-max-page-size via QOM',
> + )
> +
Review comment by sashiko:
[LOW] In tests/functional/ppc64/test_pseries_caps.py
(test_pseries_cap_hpt_max_page_size), the test only asserts that the
name cap-hpt-max-page-size appears in qom-list of /machine. The property
is registered unconditionally by spapr_caps_add_properties() from
capability_table in hw/ppc/spapr_caps.c, so the assertion passes even
with a broken getter or setter. Unlike the other cap tests in this file,
it never reads a value. Suggest qom-get on cap-hpt-max-page-size
asserting 65536 (the latest pseries default is 16, and
spapr_cap_get_pagesize() returns 1 << 16), and optionally setting
cap-hpt-max-page-size=16M and reading it back.
Regards,
Utkarsh
> +
> +if __name__ == '__main__':
> + PseriesCapsTest.main()
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 3/4] tests/functional/ppc64: add pseries virtio-blk hotplug test
2026-11-24 11:00 [PATCH v3 0/4] tests/functional/ppc64: add pseries hotplug and caps tests Anushree Mathur
2026-11-24 11:00 ` [PATCH v3 1/4] tests/functional/ppc64: add pseries CPU hotplug test Anushree Mathur
2026-11-24 11:00 ` [PATCH v3 2/4] tests/functional/ppc64: add pseries security caps test Anushree Mathur
@ 2026-11-24 11:00 ` Anushree Mathur
2026-11-27 12:51 ` Utkarsh Verma
2026-11-24 11:00 ` [PATCH v3 4/4] MAINTAINERS: add pseries hotplug and caps functional tests Anushree Mathur
3 siblings, 1 reply; 8+ messages in thread
From: Anushree Mathur @ 2026-11-24 11:00 UTC (permalink / raw)
To: Harsh Prateek Bora, Cédric Le Goater, Nicholas Piggin,
qemu-devel, qemu-ppc
Cc: Anushree Mathur, Thomas Huth, Amit Machhiwal, Miles Glenn,
Aditya Gupta, misanjum, Chinmay Rath, Utkarsh Verma
Add a functional test that hot-plugs and hot-unplugs a virtio-blk-pci
disk on the pseries machine. It runs with TCG, and also with KVM if
KVM is enabled.
On pseries a PCI device added through QMP is only enumerated by the
guest once rtas_errd (ppc64-diag) handles the RTAS hotplug event and
runs drmgr (powerpc-utils). Neither is in the buildroot image used by
the other pseries tests, so the test uses rootfs-hotplug.ext2: the same
image with those two tools added.
The test boots with a second PHB (phb1) present so that the guest
registers its slots, adds a null-co backend, hot-plugs virtio-blk-pci
into phb1.0 and waits for /dev/vda, then unplugs it and waits for both
the QMP DEVICE_DELETED event and /dev/vda to go away. The root drive is
used with snapshot=on so the cached asset is not modified by the guest.
Signed-off-by: Anushree Mathur <anushree.mathur@linux.ibm.com>
---
v3: the rtas_errd start and the initial /dev/vda checks used patterns
that also matched the echoed command, so they always passed; they now
use the shell variable sentinel, and rtas_errd is verified with pidof.
Bounded the wait loops (60 seconds) with a failure message on timeout,
and the test now asserts that DEVICE_DELETED was received.
tests/functional/ppc64/meson.build | 2 +
tests/functional/ppc64/test_hotplug_blk.py | 206 +++++++++++++++++++++
2 files changed, 208 insertions(+)
create mode 100755 tests/functional/ppc64/test_hotplug_blk.py
diff --git a/tests/functional/ppc64/meson.build b/tests/functional/ppc64/meson.build
index d91209f041..f483ce4d76 100644
--- a/tests/functional/ppc64/meson.build
+++ b/tests/functional/ppc64/meson.build
@@ -2,6 +2,7 @@
test_ppc64_timeouts = {
'fadump' : 480,
+ 'hotplug_blk' : 600,
'hotplug_cpu' : 480,
'hv' : 1000,
'mac99' : 120,
@@ -21,6 +22,7 @@ tests_ppc64_system_quick = [
tests_ppc64_system_thorough = [
'e500',
'fadump',
+ 'hotplug_blk',
'hotplug_cpu',
'hv',
'mac99',
diff --git a/tests/functional/ppc64/test_hotplug_blk.py b/tests/functional/ppc64/test_hotplug_blk.py
new file mode 100755
index 0000000000..a1d0dbcee5
--- /dev/null
+++ b/tests/functional/ppc64/test_hotplug_blk.py
@@ -0,0 +1,206 @@
+#!/usr/bin/env python3
+#
+# Functional test that hot-plugs and hot-unplugs a virtio-blk-pci disk
+# on the pseries machine type.
+#
+# Copyright (c) 2025 IBM Corporation
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+import platform
+
+from qemu_test import LinuxKernelTest, Asset
+from qemu_test import exec_command_and_wait_for_pattern
+
+
+class PseriesHotplugBlk(LinuxKernelTest):
+ """
+ Test virtio-blk-pci hotplug/unplug on the pseries machine type.
+
+ A pre-built rootfs image (based on the buildroot image used by
+ test_hotplug_cpu.py) is used as the guest OS. The image includes
+ rtas_errd from ppc64-diag, which is required on pseries to call the
+ ibm,configure-connector RTAS function that makes a QMP-hotplugged
+ PCI device visible to the kernel.
+
+ ppc64-diag is not packaged in Alpine Linux, so the Alpine+apk
+ approach used by test_hv.py cannot be used here. Instead a
+ self-contained rootfs with rtas_errd and drmgr (from powerpc-utils)
+ already installed is referenced as an Asset, following the same
+ pattern as test_hotplug_cpu.py.
+
+ The test is run with both TCG and KVM; the KVM variant needs a
+ ppc64 host with kvm-hv loaded and is skipped automatically otherwise.
+
+ A second spapr-pci-host-bridge (phb1, index=1) is present at VM
+ launch so the guest kernel registers its PCI slots with rpaphp
+ during boot-time PCI probe. Runtime DLPAR hotplug of
+ virtio-blk-pci into phb1.0 then works via the rtas_errd path.
+ """
+
+ timeout = 600
+
+ ASSET_KERNEL = Asset(
+ ('https://github.com/raphael502/qemu-ppc-boot/raw/refs/heads/main/'
+ 'buildroot/qemu_ppc64le_pseries-2023.11-8-gdcd9f0f6eb-20240104/'
+ 'vmlinux'),
+ 'fc20d5820ad83ed514ac5f88af7e2692d47ab7f36dab290cdb137d05b98502f5')
+
+ # Pre-built rootfs based on the buildroot pseries image above, with
+ # rtas_errd (from ppc64-diag) and drmgr (from powerpc-utils) added.
+ # rtas_errd is required to process RTAS hotplug events on pseries and
+ # it execs drmgr to configure the device; without them rpaphp
+ # registers the slots but the device is never enumerated by the kernel.
+ ASSET_ROOTFS = Asset(
+ ('https://github.com/raphael502/qemu-ppc-boot/raw/refs/heads/main/'
+ 'buildroot/qemu_ppc64le_pseries-2023.11-8-gdcd9f0f6eb-20240104/'
+ 'rootfs-hotplug.ext2'),
+ '01ab3421d313e7765176eb27193fdb5837281dc3c8484eed140de8a3e65908eb')
+
+ def _boot_pseries(self, accel):
+ """Boot pseries with phb1 present and rtas_errd running.
+
+ accel must be 'tcg' or 'kvm'.
+ """
+ kernel_path = self.ASSET_KERNEL.fetch()
+ rootfs_path = self.ASSET_ROOTFS.fetch()
+
+ self.set_machine('pseries')
+ if accel == 'tcg':
+ self.vm.add_args('-accel', 'tcg,thread=multi')
+ else:
+ self.vm.add_args('-accel', 'kvm')
+ self.vm.add_args('-smp', '2', '-m', '512M')
+ # Second PHB present at boot so the guest kernel registers its
+ # slots with rpaphp. Required for runtime DLPAR hotplug of
+ # virtio-blk-pci into phb1.0.
+ self.vm.add_args('-device', 'spapr-pci-host-bridge,id=phb1,index=1')
+ # snapshot=on keeps the cached rootfs asset unmodified
+ self.vm.add_args(
+ '-drive',
+ f'file={rootfs_path},if=scsi,index=0,format=raw,snapshot=on')
+ self.vm.add_args(
+ '-kernel', kernel_path,
+ '-append', 'root=/dev/sda console=hvc0 rootwait printk.time=0',
+ )
+ self.vm.set_console()
+ self.vm.launch()
+
+ self.wait_for_console_pattern('buildroot login:')
+ exec_command_and_wait_for_pattern(self, 'root', '#')
+
+ # Start rtas_errd so that RTAS hotplug events are processed.
+ # rtas_errd daemonizes by default (no -d flag). Wait (up to 5
+ # seconds) for it to show up in pidof and report the result
+ # through a shell variable, so the expected strings never appear
+ # in the command text and match the echoed command.
+ exec_command_and_wait_for_pattern(
+ self,
+ 'touch /var/log/platform; mkdir -p /var/log/dump;'
+ ' /usr/sbin/rtas_errd;'
+ ' for i in $(seq 1 10); do'
+ ' pidof rtas_errd > /dev/null && break; sleep 0.5; done;'
+ ' if pidof rtas_errd > /dev/null; then S=started;'
+ ' else S=failed; fi; echo rtas_errd_$S',
+ 'rtas_errd_started',
+ failure_message='rtas_errd_failed',
+ )
+
+ def _do_blk_hotplug(self):
+
+ # Confirm /dev/vda does not exist before hotplug. The result is
+ # printed through a shell variable so the expected string never
+ # appears in the command text, which would match the echoed command.
+ exec_command_and_wait_for_pattern(
+ self,
+ 'if test -b /dev/vda; then R=present; else R=absent; fi;'
+ ' echo vda_initial_$R',
+ 'vda_initial_absent',
+ failure_message='vda_initial_present',
+ )
+
+ # Add a null-co block backend (no image file needed).
+ self.vm.cmd(
+ 'blockdev-add',
+ **{
+ 'driver': 'null-co',
+ 'size': 1073741824,
+ 'node-name': 'testdisk',
+ },
+ )
+
+ # Hotplug virtio-blk-pci into phb1.0. The RTAS hotplug event
+ # (type 229) is delivered to the guest; rtas_errd calls
+ # ibm,configure-connector, the kernel enumerates the device and
+ # udev creates /dev/vda.
+ self.vm.cmd(
+ 'device_add',
+ driver='virtio-blk-pci',
+ drive='testdisk',
+ id='hotblk0',
+ bus='phb1.0',
+ addr='0x0',
+ )
+
+ # Poll (for up to 60 seconds) until /dev/vda appears. Use a shell
+ # variable sentinel so the strings 'vda_present' and 'vda_timeout'
+ # never appear in the typed command, avoiding a false match on the
+ # echoed command text.
+ exec_command_and_wait_for_pattern(
+ self,
+ 'for i in $(seq 1 60); do'
+ ' test -b /dev/vda && break; sleep 1; done;'
+ ' if test -b /dev/vda; then R=present; else R=timeout; fi;'
+ ' echo vda_$R',
+ 'vda_present',
+ failure_message='vda_timeout',
+ )
+
+ # Unplug the device and wait for the QMP deletion event.
+ self.vm.cmd('device_del', id='hotblk0')
+ event = self.vm.event_wait(
+ 'DEVICE_DELETED',
+ timeout=60.0,
+ match={'data': {'device': 'hotblk0'}},
+ )
+ self.assertIsNotNone(event, 'DEVICE_DELETED not received for hotblk0')
+
+ # Poll (for up to 60 seconds) until /dev/vda disappears.
+ exec_command_and_wait_for_pattern(
+ self,
+ 'for i in $(seq 1 60); do'
+ ' test -b /dev/vda || break; sleep 1; done;'
+ ' if test -b /dev/vda; then R=timeout; else R=absent; fi;'
+ ' echo vda_$R',
+ 'vda_absent',
+ failure_message='vda_timeout',
+ )
+
+ def test_pseries_hotplug_blk_tcg(self):
+ """Hotplug then unplug a virtio-blk-pci device on pseries (TCG)."""
+ self.require_accelerator('tcg')
+ self._boot_pseries('tcg')
+ self._do_blk_hotplug()
+
+ def test_pseries_hotplug_blk_kvm(self):
+ """Hotplug then unplug a virtio-blk-pci device on pseries (KVM).
+
+ Requires a ppc64 host with kvm-hv loaded; skipped automatically
+ on other hosts.
+ """
+ self.require_accelerator('kvm')
+ # On ppc64 the base kvm module can be loaded (and /dev/kvm created)
+ # without kvm-hv, so checking /dev/kvm alone is not sufficient.
+ if platform.machine() in ('ppc64le', 'ppc64'):
+ try:
+ with open('/proc/modules', encoding='utf-8') as f:
+ if not any(line.split()[0] == 'kvm_hv' for line in f):
+ self.skipTest('kvm-hv module is not loaded')
+ except OSError:
+ pass
+ self._boot_pseries('kvm')
+ self._do_blk_hotplug()
+
+
+if __name__ == '__main__':
+ PseriesHotplugBlk.main()
--
2.55.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 3/4] tests/functional/ppc64: add pseries virtio-blk hotplug test
2026-11-24 11:00 ` [PATCH v3 3/4] tests/functional/ppc64: add pseries virtio-blk hotplug test Anushree Mathur
@ 2026-11-27 12:51 ` Utkarsh Verma
0 siblings, 0 replies; 8+ messages in thread
From: Utkarsh Verma @ 2026-11-27 12:51 UTC (permalink / raw)
To: Anushree Mathur, Harsh Prateek Bora, Cédric Le Goater,
Nicholas Piggin, qemu-devel, qemu-ppc
Cc: Thomas Huth, Amit Machhiwal, Miles Glenn, Aditya Gupta, misanjum,
Chinmay Rath
On 11/24/26 4:30 PM, Anushree Mathur wrote:
> Add a functional test that hot-plugs and hot-unplugs a virtio-blk-pci
> disk on the pseries machine. It runs with TCG, and also with KVM if
> KVM is enabled.
>
> On pseries a PCI device added through QMP is only enumerated by the
> guest once rtas_errd (ppc64-diag) handles the RTAS hotplug event and
> runs drmgr (powerpc-utils). Neither is in the buildroot image used by
> the other pseries tests, so the test uses rootfs-hotplug.ext2: the same
> image with those two tools added.
>
> The test boots with a second PHB (phb1) present so that the guest
> registers its slots, adds a null-co backend, hot-plugs virtio-blk-pci
> into phb1.0 and waits for /dev/vda, then unplugs it and waits for both
> the QMP DEVICE_DELETED event and /dev/vda to go away. The root drive is
> used with snapshot=on so the cached asset is not modified by the guest.
>
> Signed-off-by: Anushree Mathur <anushree.mathur@linux.ibm.com>
> ---
> v3: the rtas_errd start and the initial /dev/vda checks used patterns
> that also matched the echoed command, so they always passed; they now
> use the shell variable sentinel, and rtas_errd is verified with pidof.
> Bounded the wait loops (60 seconds) with a failure message on timeout,
> and the test now asserts that DEVICE_DELETED was received.
>
> tests/functional/ppc64/meson.build | 2 +
> tests/functional/ppc64/test_hotplug_blk.py | 206 +++++++++++++++++++++
> 2 files changed, 208 insertions(+)
> create mode 100755 tests/functional/ppc64/test_hotplug_blk.py
>
Reviewed-by: Utkarsh Verma <uverma@linux.ibm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 4/4] MAINTAINERS: add pseries hotplug and caps functional tests
2026-11-24 11:00 [PATCH v3 0/4] tests/functional/ppc64: add pseries hotplug and caps tests Anushree Mathur
` (2 preceding siblings ...)
2026-11-24 11:00 ` [PATCH v3 3/4] tests/functional/ppc64: add pseries virtio-blk hotplug test Anushree Mathur
@ 2026-11-24 11:00 ` Anushree Mathur
3 siblings, 0 replies; 8+ messages in thread
From: Anushree Mathur @ 2026-11-24 11:00 UTC (permalink / raw)
To: Harsh Prateek Bora, Cédric Le Goater, Nicholas Piggin,
qemu-devel, qemu-ppc
Cc: Anushree Mathur, Thomas Huth, Amit Machhiwal, Miles Glenn,
Aditya Gupta, misanjum, Chinmay Rath, Utkarsh Verma
Add entries for the three new pseries functional tests introduced in
the preceding commits:
- tests/functional/ppc64/test_hotplug_blk.py
- tests/functional/ppc64/test_hotplug_cpu.py
- tests/functional/ppc64/test_pseries_caps.py
All of them belong under the sPAPR (pseries) section.
Signed-off-by: Anushree Mathur <anushree.mathur@linux.ibm.com>
---
v3: no changes.
MAINTAINERS | 3 +++
1 file changed, 3 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 15942aaba3..8456c5fbec 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1705,6 +1705,9 @@ F: tests/qtest/libqos/rtas*
F: tests/functional/ppc64/test_pseries.py
F: tests/functional/ppc64/test_hv.py
F: tests/functional/ppc64/test_tuxrun.py
+F: tests/functional/ppc64/test_hotplug_blk.py
+F: tests/functional/ppc64/test_hotplug_cpu.py
+F: tests/functional/ppc64/test_pseries_caps.py
PowerNV (Non-Virtualized)
M: Nicholas Piggin <npiggin@gmail.com>
--
2.55.0
^ permalink raw reply related [flat|nested] 8+ messages in thread