From: Anushree Mathur <anushree.mathur@linux.ibm.com>
To: "Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"Cédric Le Goater" <clg@redhat.com>,
"Nicholas Piggin" <npiggin@gmail.com>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: Anushree Mathur <anushree.mathur@linux.ibm.com>,
Thomas Huth <thuth@redhat.com>,
Amit Machhiwal <amachhiw@linux.ibm.com>,
Miles Glenn <milesg@linux.ibm.com>,
Aditya Gupta <adityag@linux.ibm.com>,
misanjum@linux.ibm.com, Chinmay Rath <rathc@linux.ibm.com>,
Utkarsh Verma <uverma@linux.ibm.com>
Subject: [PATCH v3 0/4] tests/functional/ppc64: add pseries hotplug and caps tests
Date: Tue, 24 Nov 2026 16:30:26 +0530 [thread overview]
Message-ID: <20261124110030.30097-1-anushree.mathur@linux.ibm.com> (raw)
Hi all,
This series adds three new functional tests for the pseries (sPAPR/PAPR)
machine type and registers them in MAINTAINERS.
Patch 1 adds test_hotplug_cpu.py. It boots a buildroot guest with one
core (-smp 2,threads=2,cores=1,maxcpus=4), hot-adds a second core with
QMP device_add and waits until /sys/devices/system/cpu/online changes
from 0-1 to 0-3. It then hot-removes the core with device_del, waits
for the QMP DEVICE_DELETED event and for the guest to be back at 0-1.
It runs with TCG and, if available, with KVM.
Patch 2 adds test_pseries_caps.py, a quick test that does not boot a
guest. QEMU is started halted (-S) and QMP is used to check that
pseries starts with the security capability options (cap-cfpc,
cap-sbbc, cap-ibs, cap-ccf-assist, cap-nested-hv) and that qom-get
returns the values that were set, that pseries-7.2, 9.2 and 10.0 can be
instantiated, and that cap-hpt-max-page-size is visible under /machine
in the QOM tree.
Patch 3 adds test_hotplug_blk.py. It boots a similar guest with a
second PCI host bridge (phb1), hot-adds a virtio-blk-pci disk backed by
a null-co node with QMP device_add and waits for /dev/vda to appear in
the guest. It then hot-removes the disk with device_del and waits for
the DEVICE_DELETED event and for /dev/vda to disappear. The guest
needs rtas_errd and drmgr to enumerate the new device, so the test uses
a rootfs that includes them. I raised the patch that adds this image
(rootfs-hotplug.ext2) to qemu-ppc-boot, see
https://github.com/raphael502/qemu-ppc-boot/pull/1. It has been merged,
so the test downloads the image from that repository. The test runs
with TCG, and also with KVM if KVM is enabled.
Patch 4 adds the MAINTAINERS entries for the three tests.
Testing
-------
The three tests were run on a ppc64le POWER host with both TCG and KVM
and pass. checkpatch.pl reports no errors or warnings on any patch
(apart from the expected "MAINTAINERS needs updating" notices on
patches 1-3, resolved by patch 4), and pylint with
tests/functional/pylintrc reports nothing for the new files.
Links to previous versions:
- v2:
https://lore.kernel.org/qemu-devel/20261119062951.83498-1-anushree.mathur@linux.ibm.com/
- v1 for CPU hotplug and caps tests:
https://lore.kernel.org/qemu-devel/20261030131025.32219-1-anushree.mathur@linux.ibm.com/
- RFC v1 for virtio-blk hotplug test:
https://lore.kernel.org/qemu-devel/20261103141938.41147-1-anushree.mathur@linux.ibm.com/
Changes in v3 (review comments from Utkarsh Verma on v2):
- Patch 1: put the -smp option on its own line and replaced the arrow
characters with ASCII; added snapshot=on to the rootfs drive; bounded
the guest wait loops to 45 seconds with a failure message; wait for
the QMP DEVICE_DELETED event after device_del.
- Patch 2: the caps tests now check the values with qom-get instead of
only checking that QEMU starts; dropped the redundant "pseries" from
the -machine arguments; the compat machine check now uses is-default,
as is-current is not a query-machines field and the old assertion
could never fail.
- Patch 3: the rtas_errd start and the initial /dev/vda checks matched
the echoed command and always passed, so they now use the shell
variable sentinel and rtas_errd is verified with pidof; bounded the
wait loops to 60 seconds with a failure message; assert that
DEVICE_DELETED was received.
- Patch 4: no changes.
Changes in v2:
- Combined the two v1 postings above into one series.
- Patch 1: buildroot kernel and rootfs assets now point to
raphael502/qemu-ppc-boot instead of legoater/qemu-ppc-boot. They are
the same files; the sha256 values are unchanged and were re-verified.
Wrapped the long URL lines to keep checkpatch quiet.
- Patch 2: reworded the commit message to say what is actually checked
(the options are accepted and the machine starts), fixed docstrings
that did not match the code, and dropped the skipped
query-cpu-model-expansion placeholder test.
- Patch 3: no longer an RFC. v1 was an RFC because rootfs-hotplug.ext2
was not available yet; it is now merged in qemu-ppc-boot and the
asset URLs point to it (the sha256 is unchanged). The vmlinux asset
also points to qemu-ppc-boot, and the test file is now executable
like the other functional tests.
- Patch 4: a single MAINTAINERS patch covering all three tests
(previously a separate patch for the CPU and caps tests, and an
entry inside the virtio-blk patch).
- Rebased on current master (6883fb508c).
Anushree Mathur (4):
tests/functional/ppc64: add pseries CPU hotplug test
tests/functional/ppc64: add pseries security caps test
tests/functional/ppc64: add pseries virtio-blk hotplug test
MAINTAINERS: add pseries hotplug and caps functional tests
MAINTAINERS | 3 +
tests/functional/ppc64/meson.build | 5 +
tests/functional/ppc64/test_hotplug_blk.py | 206 +++++++++++++++++++
tests/functional/ppc64/test_hotplug_cpu.py | 207 ++++++++++++++++++++
tests/functional/ppc64/test_pseries_caps.py | 169 ++++++++++++++++
5 files changed, 590 insertions(+)
create mode 100755 tests/functional/ppc64/test_hotplug_blk.py
create mode 100755 tests/functional/ppc64/test_hotplug_cpu.py
create mode 100755 tests/functional/ppc64/test_pseries_caps.py
base-commit: 6883fb508cb7a93e2e7b44c0582bfd9fc2196d4d
--
2.55.0
next reply other threads:[~2026-11-24 11:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 11:00 Anushree Mathur [this message]
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
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
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
2026-11-24 11:00 ` [PATCH v3 4/4] MAINTAINERS: add pseries hotplug and caps functional tests Anushree Mathur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261124110030.30097-1-anushree.mathur@linux.ibm.com \
--to=anushree.mathur@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=amachhiw@linux.ibm.com \
--cc=clg@redhat.com \
--cc=harshpb@linux.ibm.com \
--cc=milesg@linux.ibm.com \
--cc=misanjum@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rathc@linux.ibm.com \
--cc=thuth@redhat.com \
--cc=uverma@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.