On Fri, Jun 26, 2026 at 01:19:31AM +0400, Marc-André Lureau wrote: > Add runtime detection of HMP availability so tests gracefully skip > instead of failing when QEMU is built without HMP support. > > For qtests (drive_del-test), use compile-time #ifndef CONFIG_HMP guards. > > For bash iotests, add _require_hmp() to common.rc that probes QEMU. > > For Python iotests, add _verify_hmp() and a require_hmp parameter > threaded through execute_setup_common()/main()/script_initialize()/ > script_main(). > > An earlier version of this series did an almost-complete conversion of > the tests to QMP. However, this made the series even longer. I decided > to post-pone it for now.
Makese sense as a tradeoff. > > Signed-off-by: Marc-Andre Lureau <[email protected]> > --- > tests/qtest/drive_del-test.c | 25 > ++++++++++++++++++++++ > tests/qemu-iotests/028 | 1 + > tests/qemu-iotests/045 | 3 ++- > tests/qemu-iotests/051 | 1 + > tests/qemu-iotests/056 | 3 ++- > tests/qemu-iotests/060 | 1 + > tests/qemu-iotests/068 | 1 + > tests/qemu-iotests/071 | 1 + > tests/qemu-iotests/081 | 1 + > tests/qemu-iotests/091 | 1 + > tests/qemu-iotests/093 | 3 ++- > tests/qemu-iotests/102 | 1 + > tests/qemu-iotests/117 | 1 + > tests/qemu-iotests/119 | 1 + > tests/qemu-iotests/120 | 1 + > tests/qemu-iotests/124 | 3 ++- > tests/qemu-iotests/130 | 1 + > tests/qemu-iotests/132 | 3 ++- > tests/qemu-iotests/136 | 3 ++- > tests/qemu-iotests/142 | 1 + > tests/qemu-iotests/145 | 1 + > tests/qemu-iotests/146 | 1 + > tests/qemu-iotests/148 | 3 ++- > tests/qemu-iotests/151 | 3 ++- > tests/qemu-iotests/152 | 3 ++- > tests/qemu-iotests/153 | 1 + > tests/qemu-iotests/156 | 1 + > tests/qemu-iotests/157 | 1 + > tests/qemu-iotests/161 | 1 + > tests/qemu-iotests/165 | 3 ++- > tests/qemu-iotests/172 | 1 + > tests/qemu-iotests/181 | 1 + > tests/qemu-iotests/185 | 1 + > tests/qemu-iotests/186 | 1 + > tests/qemu-iotests/192 | 1 + > tests/qemu-iotests/201 | 1 + > tests/qemu-iotests/216 | 3 ++- > tests/qemu-iotests/225 | 1 + > tests/qemu-iotests/232 | 1 + > tests/qemu-iotests/236 | 3 ++- > tests/qemu-iotests/245 | 3 ++- > tests/qemu-iotests/246 | 3 ++- > tests/qemu-iotests/249 | 1 + > tests/qemu-iotests/254 | 3 ++- > tests/qemu-iotests/255 | 3 ++- > tests/qemu-iotests/257 | 3 ++- > tests/qemu-iotests/260 | 3 ++- > tests/qemu-iotests/264 | 3 ++- > tests/qemu-iotests/267 | 1 + > tests/qemu-iotests/274 | 3 ++- > tests/qemu-iotests/280 | 1 + > tests/qemu-iotests/281 | 3 ++- > tests/qemu-iotests/283 | 1 + > tests/qemu-iotests/286 | 1 + > tests/qemu-iotests/298 | 3 ++- > tests/qemu-iotests/300 | 3 ++- > tests/qemu-iotests/304 | 3 ++- > tests/qemu-iotests/310 | 3 ++- > tests/qemu-iotests/common.rc | 8 +++++++ > tests/qemu-iotests/iotests.py | 14 +++++++++++- > tests/qemu-iotests/tests/backup-discard-source | 3 ++- > tests/qemu-iotests/tests/copy-before-write | 3 ++- > tests/qemu-iotests/tests/image-fleecing | 3 ++- > tests/qemu-iotests/tests/iothreads-create | 3 ++- > tests/qemu-iotests/tests/luks-detached-header | 3 ++- > .../tests/migrate-bitmaps-postcopy-test | 3 ++- > tests/qemu-iotests/tests/migrate-bitmaps-test | 3 ++- > tests/qemu-iotests/tests/mirror-change-copy-mode | 3 ++- > tests/qemu-iotests/tests/mirror-ready-cancel-error | 3 ++- > tests/qemu-iotests/tests/qcow2-internal-snapshots | 1 + > tests/qemu-iotests/tests/qsd-migrate | 3 ++- > tests/qemu-iotests/tests/reopen-file | 3 ++- > tests/qemu-iotests/tests/write-zeroes-unmap | 1 + > 73 files changed, 152 insertions(+), 37 deletions(-) Reviewed-by: Daniel P. Berrangé <[email protected]> With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
