From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: John Snow <jsnow@redhat.com>,
qemu-devel@nongnu.org, Cleber Rosa <crosa@redhat.com>,
Wainer dos Santos Moschetta <wainersm@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Cleber Rosa <crosa@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v4 00/16] python: add mypy support to python/qemu
Date: Mon, 29 Jun 2020 10:26:07 +0200 [thread overview]
Message-ID: <f7c36cc7-e05c-65cc-b6be-9da8d136b295@redhat.com> (raw)
In-Reply-To: <20200626204133.14500-1-jsnow@redhat.com>
+Cleber/Wainer.
On 6/26/20 10:41 PM, John Snow wrote:
> Based-on: 20200626202350.11060-1-jsnow@redhat.com
>
> This series modifies the python/qemu library to comply with mypy --strict.
> This requires my "refactor shutdown" patch as a pre-requisite.
>
> v4:
> 001/16:[----] [--] 'python/qmp.py: Define common types'
> 002/16:[----] [--] 'iotests.py: use qemu.qmp type aliases'
> 003/16:[----] [--] 'python/qmp.py: re-absorb MonitorResponseError'
> 004/16:[----] [--] 'python/qmp.py: Do not return None from cmd_obj'
> 005/16:[----] [--] 'python/qmp.py: add casts to JSON deserialization'
> 006/16:[----] [--] 'python/qmp.py: add QMPProtocolError'
> 007/16:[----] [--] 'python/machine.py: Fix monitor address typing'
> 008/16:[----] [--] 'python/machine.py: reorder __init__'
> 009/16:[----] [--] 'python/machine.py: Don't modify state in _base_args()'
> 010/16:[----] [--] 'python/machine.py: Handle None events in events_wait'
> 011/16:[----] [--] 'python/machine.py: use qmp.command'
> 012/16:[0010] [FC] 'python/machine.py: Add _qmp access shim'
> 013/16:[----] [-C] 'python/machine.py: fix _popen access'
> 014/16:[----] [--] 'python/qemu: make 'args' style arguments immutable'
> 015/16:[----] [--] 'iotests.py: Adjust HMP kwargs typing'
> 016/16:[----] [-C] 'python/qemu: Add mypy type annotations'
>
> - Rebased on "refactor shutdown" v4
> - Fixed _qmp access for scripts that disable QMP
See:
https://travis-ci.org/github/philmd/qemu/jobs/702507625#L5439
/ # uname -a
Linux buildroot 4.5.0-2-4kc-malta #1 Debian 4.5.5-1 (2016-05-29) mips
GNU/Linux
/ # reboot
/ # reboot: Restarting system
>>> {'execute': 'quit'}
qemu received signal 9; command: "mips-softmmu/qemu-system-mips -display
none -vga none -chardev
socket,id=mon,path=/tmp/tmpcojsc5u3/qemu-14540-monitor.sock -mon
chardev=mon,mode=control -machine malta -chardev
socket,id=console,path=/tmp/tmpcojsc5u3/qemu-14540-console.sock,server,nowait
-serial chardev:console -kernel
/tmp/avocado_xgmck2k5/avocado_job_83wkzs2f/12-tests_acceptance_boot_linux_console.py_BootLinuxConsole.test_mips_malta_cpio/boot/vmlinux-4.5.0-2-4kc-malta
-initrd
/tmp/avocado_xgmck2k5/avocado_job_83wkzs2f/12-tests_acceptance_boot_linux_console.py_BootLinuxConsole.test_mips_malta_cpiorootfs.cpio
-append printk.time=0 console=ttyS0 console=tty rdinit=/sbin/init
noreboot -no-reboot"
Reproduced traceback from:
/home/travis/build/philmd/qemu/build/tests/venv/lib/python3.6/site-packages/avocado/core/test.py:886
Traceback (most recent call last):
File
"/home/travis/build/philmd/qemu/build/tests/acceptance/avocado_qemu/__init__.py",
line 195, in tearDown
vm.shutdown()
File "/home/travis/build/philmd/qemu/python/qemu/machine.py", line
457, in shutdown
self._do_shutdown(has_quit)
File "/home/travis/build/philmd/qemu/python/qemu/machine.py", line
434, in _do_shutdown
self._soft_shutdown(has_quit, timeout)
File "/home/travis/build/philmd/qemu/python/qemu/machine.py", line
414, in _soft_shutdown
self._qmp.cmd('quit')
File "/home/travis/build/philmd/qemu/python/qemu/qmp.py", line 271, in cmd
return self.cmd_obj(qmp_cmd)
File "/home/travis/build/philmd/qemu/python/qemu/qmp.py", line 249, in
cmd_obj
self.__sock.sendall(json.dumps(qmp_cmd).encode('utf-8'))
BrokenPipeError: [Errno 32] Broken pipe
next prev parent reply other threads:[~2020-06-29 8:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-26 20:41 [PATCH v4 00/16] python: add mypy support to python/qemu John Snow
2020-06-26 20:41 ` [PATCH v4 01/16] python/qmp.py: Define common types John Snow
2020-06-26 20:41 ` [PATCH v4 02/16] iotests.py: use qemu.qmp type aliases John Snow
2020-06-26 20:41 ` [PATCH v4 03/16] python/qmp.py: re-absorb MonitorResponseError John Snow
2020-06-26 20:41 ` [PATCH v4 04/16] python/qmp.py: Do not return None from cmd_obj John Snow
2020-06-26 20:41 ` [PATCH v4 05/16] python/qmp.py: add casts to JSON deserialization John Snow
2020-06-26 20:41 ` [PATCH v4 06/16] python/qmp.py: add QMPProtocolError John Snow
2020-06-26 20:41 ` [PATCH v4 07/16] python/machine.py: Fix monitor address typing John Snow
2020-06-26 20:41 ` [PATCH v4 08/16] python/machine.py: reorder __init__ John Snow
2020-06-26 20:41 ` [PATCH v4 09/16] python/machine.py: Don't modify state in _base_args() John Snow
2020-06-26 20:41 ` [PATCH v4 10/16] python/machine.py: Handle None events in events_wait John Snow
2020-06-26 20:41 ` [PATCH v4 11/16] python/machine.py: use qmp.command John Snow
2020-06-26 20:41 ` [PATCH v4 12/16] python/machine.py: Add _qmp access shim John Snow
2020-06-26 20:41 ` [PATCH v4 13/16] python/machine.py: fix _popen access John Snow
2020-06-26 20:41 ` [PATCH v4 14/16] python/qemu: make 'args' style arguments immutable John Snow
2020-06-26 20:41 ` [PATCH v4 15/16] iotests.py: Adjust HMP kwargs typing John Snow
2020-06-26 20:41 ` [PATCH v4 16/16] python/qemu: Add mypy type annotations John Snow
2020-06-29 8:26 ` Philippe Mathieu-Daudé [this message]
2020-06-29 14:30 ` [PATCH v4 00/16] python: add mypy support to python/qemu John Snow
2020-07-01 17:18 ` John Snow
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=f7c36cc7-e05c-65cc-b6be-9da8d136b295@redhat.com \
--to=philmd@redhat.com \
--cc=crosa@redhat.com \
--cc=ehabkost@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=wainersm@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).