aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2023-10-16 12:37:48 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2023-10-16 12:37:48 -0400
commit800485762e6564e04e2ab315132d477069562d91 (patch)
tree19ff602da72d056916ca091498584869c82d332e /docs
parent9390f0fd3e30ac61e94ea2fc4a923d88ed486645 (diff)
parentb6aed193e5ecca32bb07e062f58f0daca06e7009 (diff)
downloadqemu-800485762e6564e04e2ab315132d477069562d91.zip
qemu-800485762e6564e04e2ab315132d477069562d91.tar.gz
qemu-800485762e6564e04e2ab315132d477069562d91.tar.bz2
Merge tag 'python-pull-request' of https://gitlab.com/jsnow/qemu into staging
Python Pullreq Python PR: - Use socketpair for all machine.py connections - Support Python 3.12 - Switch iotests over to using raise-on-error QMP command interface (Thank you very much, Vladimir!) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+ber27ys35W+dsvQfe+BBqr8OQ4FAmUpldkACgkQfe+BBqr8 # OQ4NtRAAnkEmXsECAxQ2ewvf3yK8PTFm4Oq5nqMIw+KB94ATrsGzk3z1rLvatSl3 # 6VLsV2+FWoOEyKrsfu5DIfbuo4d3TZTU7N2DIZpVpvO166K+fXbzp8skAg+n3BMC # tWkSOcnsT6+8aqyxxyASdHvbbE7pvPw8OA3oIIstsYeZ5/HHpOWXNj1kjCsnL0lW # 7y5h6UUKGmnCPdixyk042+AvKkT7GAKVjFnjUF5JHv0iR2KpQ+O9H7OEalqQT5w5 # eab4oMGuIYhzYe+MNpyybAB3Xd2pxhcppk+sl4dCE8qmMn7KRoTNw1iu+qhsNQfQ # JILZoCPtYMhpef4X0ulH8PFBMweBptqOjo4lpz9QIdMWTf86IE0yIT9DCy3aSjpp # ywwxhFKJS43gz4WHkEJlrY9PHwLsULaV/Cz6HKJAU6h9aFtcNdT4pkCOERnZ8X4C # yHlNReTG5Dz1sYzKJ/k9LTjAaVDasumR8/yadaUCwalj5zexQ27qlIM6oc5wdIRQ # up1VHi7odF5KHb6GeqdniuuEF6NBCYRAV5nz+dbd6exfKOaxYRrr48yh9SUm8QS6 # JCvMMFFAZCIrI/nkRVajbLi9L5O3fg5abtlzSzh9o4iyf8Rf/1gtKNxZRK1NZIjQ # cTYBJXpMulNx7bM2CPNsPWGqCTAjAcu10svqTA8luGj4fqdTNyU= # =02Bd # -----END PGP SIGNATURE----- # gpg: Signature made Fri 13 Oct 2023 15:09:13 EDT # gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full] # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * tag 'python-pull-request' of https://gitlab.com/jsnow/qemu: (25 commits) python: use vm.cmd() instead of vm.qmp() where appropriate scripts: add python_qmp_updater.py tests/vm/basevm.py: use cmd() instead of qmp() iotests.py: pause_job(): drop return value iotests: drop some extra ** in qmp() call iotests: drop some extra semicolons iotests: refactor some common qmp result checks into generic pattern iotests: add some missed checks of qmp result iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine. python/machine.py: upgrade vm.cmd() method python/qemu: rename command() to cmd() python: rename QEMUMonitorProtocol.cmd() to cmd_raw() scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd() qmp_shell.py: _fill_completion() use .command() instead of .cmd() python/qemu/qmp/legacy: cmd(): drop cmd_id unused argument Python: Enable python3.12 support configure: fix error message to say Python 3.8 python/qmp: remove Server.wait_closed() call for Python 3.12 Python/iotests: Add type hint for nbd module python/machine: remove unused sock_dir argument ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/testing.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index f3e2472..b0680cb 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -1014,8 +1014,8 @@ class. Here's a simple usage example:
"""
def test_qmp_human_info_version(self):
self.vm.launch()
- res = self.vm.command('human-monitor-command',
- command_line='info version')
+ res = self.vm.cmd('human-monitor-command',
+ command_line='info version')
self.assertRegexpMatches(res, r'^(\d+\.\d+\.\d)')
To execute your test, run:
@@ -1065,15 +1065,15 @@ and hypothetical example follows:
first_machine.launch()
second_machine.launch()
- first_res = first_machine.command(
+ first_res = first_machine.cmd(
'human-monitor-command',
command_line='info version')
- second_res = second_machine.command(
+ second_res = second_machine.cmd(
'human-monitor-command',
command_line='info version')
- third_res = self.get_vm(name='third_machine').command(
+ third_res = self.get_vm(name='third_machine').cmd(
'human-monitor-command',
command_line='info version')