* [PULL 1/9] Python/iotests: Add type hint for nbd module
2023-10-04 19:46 [PULL 0/9] Python patches John Snow
@ 2023-10-04 19:46 ` John Snow
2023-10-05 14:05 ` Eric Blake
2023-10-04 19:46 ` [PULL 2/9] python/machine: move socket setup out of _base_args property John Snow
` (8 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: John Snow @ 2023-10-04 19:46 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
John Snow, Philippe Mathieu-Daudé, Cleber Rosa,
Peter Maydell, qemu-arm, Joel Stanley, qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Eric Blake, Ani Sinha,
Eduardo Habkost, Markus Armbruster
The test bails gracefully if this module isn't installed, but linters
need a little help understanding that. It's enough to just declare the
type in this case.
(Fixes pylint complaining about use of an uninitialized variable because
it isn't wise enough to understand the notrun call is noreturn.)
Signed-off-by: John Snow <jsnow@redhat.com>
---
tests/qemu-iotests/tests/nbd-multiconn | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/tests/nbd-multiconn b/tests/qemu-iotests/tests/nbd-multiconn
index 478a1eaba27..7e686a786ea 100755
--- a/tests/qemu-iotests/tests/nbd-multiconn
+++ b/tests/qemu-iotests/tests/nbd-multiconn
@@ -20,6 +20,8 @@
import os
from contextlib import contextmanager
+from types import ModuleType
+
import iotests
from iotests import qemu_img_create, qemu_io
@@ -28,7 +30,7 @@ disk = os.path.join(iotests.test_dir, 'disk')
size = '4M'
nbd_sock = os.path.join(iotests.sock_dir, 'nbd_sock')
nbd_uri = 'nbd+unix:///{}?socket=' + nbd_sock
-
+nbd: ModuleType
@contextmanager
def open_nbd(export_name):
--
2.41.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PULL 1/9] Python/iotests: Add type hint for nbd module
2023-10-04 19:46 ` [PULL 1/9] Python/iotests: Add type hint for nbd module John Snow
@ 2023-10-05 14:05 ` Eric Blake
2023-10-05 14:55 ` John Snow
0 siblings, 1 reply; 15+ messages in thread
From: Eric Blake @ 2023-10-05 14:05 UTC (permalink / raw)
To: John Snow
Cc: qemu-devel, Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
Philippe Mathieu-Daudé, Cleber Rosa, Peter Maydell, qemu-arm,
Joel Stanley, qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Ani Sinha,
Eduardo Habkost, Markus Armbruster
On Wed, Oct 04, 2023 at 03:46:05PM -0400, John Snow wrote:
> The test bails gracefully if this module isn't installed, but linters
> need a little help understanding that. It's enough to just declare the
> type in this case.
>
> (Fixes pylint complaining about use of an uninitialized variable because
> it isn't wise enough to understand the notrun call is noreturn.)
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> tests/qemu-iotests/tests/nbd-multiconn | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Since there's questions about this pull request seeming to be the
first time this patch has appeared on list, I'll go ahead and review
it here on the assumption that a v2 pull request is warranted.
>
> diff --git a/tests/qemu-iotests/tests/nbd-multiconn b/tests/qemu-iotests/tests/nbd-multiconn
> index 478a1eaba27..7e686a786ea 100755
> --- a/tests/qemu-iotests/tests/nbd-multiconn
> +++ b/tests/qemu-iotests/tests/nbd-multiconn
> @@ -20,6 +20,8 @@
>
> import os
> from contextlib import contextmanager
> +from types import ModuleType
> +
> import iotests
> from iotests import qemu_img_create, qemu_io
>
> @@ -28,7 +30,7 @@ disk = os.path.join(iotests.test_dir, 'disk')
> size = '4M'
> nbd_sock = os.path.join(iotests.sock_dir, 'nbd_sock')
> nbd_uri = 'nbd+unix:///{}?socket=' + nbd_sock
> -
> +nbd: ModuleType
Is it possible to put this closer to the code actually using 'nbd', as
in this region?
| if __name__ == '__main__':
| try:
| # Easier to use libnbd than to try and set up parallel
| # 'qemu-nbd --list' or 'qemu-io' processes, but not all systems
| # have libnbd installed.
| import nbd # type: ignore
but then again, open_nbd() right after your current location utilizes
the variable, so I guess not. I trust your judgment on silencing the
linters, so whether or not you move it (if moving is even possible),
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PULL 1/9] Python/iotests: Add type hint for nbd module
2023-10-05 14:05 ` Eric Blake
@ 2023-10-05 14:55 ` John Snow
0 siblings, 0 replies; 15+ messages in thread
From: John Snow @ 2023-10-05 14:55 UTC (permalink / raw)
To: Eric Blake
Cc: qemu-devel, Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
Philippe Mathieu-Daudé, Cleber Rosa, Peter Maydell, qemu-arm,
Joel Stanley, Qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Ani Sinha,
Eduardo Habkost, Markus Armbruster
[-- Attachment #1: Type: text/plain, Size: 3174 bytes --]
On Thu, Oct 5, 2023, 10:05 AM Eric Blake <eblake@redhat.com> wrote:
> On Wed, Oct 04, 2023 at 03:46:05PM -0400, John Snow wrote:
> > The test bails gracefully if this module isn't installed, but linters
> > need a little help understanding that. It's enough to just declare the
> > type in this case.
> >
> > (Fixes pylint complaining about use of an uninitialized variable because
> > it isn't wise enough to understand the notrun call is noreturn.)
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
> > tests/qemu-iotests/tests/nbd-multiconn | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
>
> Since there's questions about this pull request seeming to be the
> first time this patch has appeared on list, I'll go ahead and review
> it here on the assumption that a v2 pull request is warranted.
>
Sorry... Tried to "sneak" in some real trivial stuff, but didn't mean to
try and pull a fast one. I figured it'd get reviewed and then we'd merge. I
can see this sentiment is not a well expected one 😓
> >
> > diff --git a/tests/qemu-iotests/tests/nbd-multiconn
> b/tests/qemu-iotests/tests/nbd-multiconn
> > index 478a1eaba27..7e686a786ea 100755
> > --- a/tests/qemu-iotests/tests/nbd-multiconn
> > +++ b/tests/qemu-iotests/tests/nbd-multiconn
> > @@ -20,6 +20,8 @@
> >
> > import os
> > from contextlib import contextmanager
> > +from types import ModuleType
> > +
> > import iotests
> > from iotests import qemu_img_create, qemu_io
> >
> > @@ -28,7 +30,7 @@ disk = os.path.join(iotests.test_dir, 'disk')
> > size = '4M'
> > nbd_sock = os.path.join(iotests.sock_dir, 'nbd_sock')
> > nbd_uri = 'nbd+unix:///{}?socket=' + nbd_sock
> > -
> > +nbd: ModuleType
>
> Is it possible to put this closer to the code actually using 'nbd', as
> in this region?
>
> | if __name__ == '__main__':
> | try:
> | # Easier to use libnbd than to try and set up parallel
> | # 'qemu-nbd --list' or 'qemu-io' processes, but not all systems
> | # have libnbd installed.
> | import nbd # type: ignore
>
> but then again, open_nbd() right after your current location utilizes
> the variable, so I guess not. I trust your judgment on silencing the
> linters, so whether or not you move it (if moving is even possible),
>
It might be possible to move things around to be more localized, but this
was the smallest possible diffstat.
It's not really about the type, the declaration also helps pylint not
complain the "potentially" illegal use. (type: ignore isn't sufficient.)
The alternative is, I think, using some try...except around the import up
at the top, and using a HAVE_NBDLIB variable that we use to exit early
instead. I think there's no real benefit to that much churn, and this gets
the job done with less.
It might be possible to teach pylint that notrun is a NORETURN function,
but I didn't explore that avenue.
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
Thanks, and apologies for the fastball.
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.
> Virtualization: qemu.org | libguestfs.org
>
>
[-- Attachment #2: Type: text/html, Size: 4975 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PULL 2/9] python/machine: move socket setup out of _base_args property
2023-10-04 19:46 [PULL 0/9] Python patches John Snow
2023-10-04 19:46 ` [PULL 1/9] Python/iotests: Add type hint for nbd module John Snow
@ 2023-10-04 19:46 ` John Snow
2023-10-04 19:46 ` [PULL 3/9] python/machine: close sock_pair in cleanup path John Snow
` (7 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: John Snow @ 2023-10-04 19:46 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
John Snow, Philippe Mathieu-Daudé, Cleber Rosa,
Peter Maydell, qemu-arm, Joel Stanley, qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Eric Blake, Ani Sinha,
Eduardo Habkost, Markus Armbruster, Daniel P . Berrangé
This property isn't meant to do much else besides return a list of
strings, so move this setup back out into _pre_launch().
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20230928044943.849073-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/machine/machine.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py
index 35d5a672dbb..345610d6e46 100644
--- a/python/qemu/machine/machine.py
+++ b/python/qemu/machine/machine.py
@@ -301,9 +301,7 @@ def _base_args(self) -> List[str]:
if self._qmp_set:
if self._sock_pair:
- fd = self._sock_pair[0].fileno()
- os.set_inheritable(fd, True)
- moncdev = f"socket,id=mon,fd={fd}"
+ moncdev = f"socket,id=mon,fd={self._sock_pair[0].fileno()}"
elif isinstance(self._monitor_address, tuple):
moncdev = "socket,id=mon,host={},port={}".format(
*self._monitor_address
@@ -340,6 +338,7 @@ def _pre_launch(self) -> None:
if self._qmp_set:
if self._monitor_address is None:
self._sock_pair = socket.socketpair()
+ os.set_inheritable(self._sock_pair[0].fileno(), True)
sock = self._sock_pair[1]
if isinstance(self._monitor_address, str):
self._remove_files.append(self._monitor_address)
--
2.41.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PULL 3/9] python/machine: close sock_pair in cleanup path
2023-10-04 19:46 [PULL 0/9] Python patches John Snow
2023-10-04 19:46 ` [PULL 1/9] Python/iotests: Add type hint for nbd module John Snow
2023-10-04 19:46 ` [PULL 2/9] python/machine: move socket setup out of _base_args property John Snow
@ 2023-10-04 19:46 ` John Snow
2023-10-04 19:46 ` [PULL 4/9] python/console_socket: accept existing FD in initializer John Snow
` (6 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: John Snow @ 2023-10-04 19:46 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
John Snow, Philippe Mathieu-Daudé, Cleber Rosa,
Peter Maydell, qemu-arm, Joel Stanley, qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Eric Blake, Ani Sinha,
Eduardo Habkost, Markus Armbruster, Daniel P . Berrangé
If everything has gone smoothly, we'll already have closed the socket we
gave to the child during post_launch. The other half of the pair that we
gave to the QMP connection should, likewise, be definitively closed by
now.
However, in the cleanup path, it's possible we've created the socketpair
but flubbed the launch and need to clean up resources. These resources
*would* be handled by the garbage collector, but that can happen at
unpredictable times. Nicer to just clean them up synchronously on the
exit path, here.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20230928044943.849073-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/machine/machine.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py
index 345610d6e46..e26109e6f0e 100644
--- a/python/qemu/machine/machine.py
+++ b/python/qemu/machine/machine.py
@@ -396,6 +396,11 @@ def _post_shutdown(self) -> None:
finally:
assert self._qmp_connection is None
+ if self._sock_pair:
+ self._sock_pair[0].close()
+ self._sock_pair[1].close()
+ self._sock_pair = None
+
self._close_qemu_log_file()
self._load_io_log()
--
2.41.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PULL 4/9] python/console_socket: accept existing FD in initializer
2023-10-04 19:46 [PULL 0/9] Python patches John Snow
` (2 preceding siblings ...)
2023-10-04 19:46 ` [PULL 3/9] python/machine: close sock_pair in cleanup path John Snow
@ 2023-10-04 19:46 ` John Snow
2023-10-04 19:46 ` [PULL 5/9] python/machine: use socketpair() for console connections John Snow
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: John Snow @ 2023-10-04 19:46 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
John Snow, Philippe Mathieu-Daudé, Cleber Rosa,
Peter Maydell, qemu-arm, Joel Stanley, qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Eric Blake, Ani Sinha,
Eduardo Habkost, Markus Armbruster, Daniel P . Berrangé
Useful if we want to use ConsoleSocket() for a socket created by
socketpair().
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20230928044943.849073-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/machine/console_socket.py | 29 +++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/python/qemu/machine/console_socket.py b/python/qemu/machine/console_socket.py
index 4e28ba9bb23..0a4e09ffc73 100644
--- a/python/qemu/machine/console_socket.py
+++ b/python/qemu/machine/console_socket.py
@@ -24,19 +24,32 @@ class ConsoleSocket(socket.socket):
"""
ConsoleSocket represents a socket attached to a char device.
- Optionally (if drain==True), drains the socket and places the bytes
- into an in memory buffer for later processing.
-
- Optionally a file path can be passed in and we will also
- dump the characters to this file for debugging purposes.
+ :param address: An AF_UNIX path or address.
+ :param sock_fd: Optionally, an existing socket file descriptor.
+ One of address or sock_fd must be specified.
+ :param file: Optionally, a filename to log to.
+ :param drain: Optionally, drains the socket and places the bytes
+ into an in memory buffer for later processing.
"""
- def __init__(self, address: str, file: Optional[str] = None,
+ def __init__(self,
+ address: Optional[str] = None,
+ sock_fd: Optional[int] = None,
+ file: Optional[str] = None,
drain: bool = False):
+ if address is None and sock_fd is None:
+ raise ValueError("one of 'address' or 'sock_fd' must be specified")
+ if address is not None and sock_fd is not None:
+ raise ValueError("can't specify both 'address' and 'sock_fd'")
+
self._recv_timeout_sec = 300.0
self._sleep_time = 0.5
self._buffer: Deque[int] = deque()
- socket.socket.__init__(self, socket.AF_UNIX, socket.SOCK_STREAM)
- self.connect(address)
+ if address is not None:
+ socket.socket.__init__(self, socket.AF_UNIX, socket.SOCK_STREAM)
+ self.connect(address)
+ else:
+ assert sock_fd is not None
+ socket.socket.__init__(self, fileno=sock_fd)
self._logfile = None
if file:
# pylint: disable=consider-using-with
--
2.41.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PULL 5/9] python/machine: use socketpair() for console connections
2023-10-04 19:46 [PULL 0/9] Python patches John Snow
` (3 preceding siblings ...)
2023-10-04 19:46 ` [PULL 4/9] python/console_socket: accept existing FD in initializer John Snow
@ 2023-10-04 19:46 ` John Snow
2023-10-04 19:46 ` [PULL 6/9] python/machine: use socketpair() for qtest connection John Snow
` (4 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: John Snow @ 2023-10-04 19:46 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
John Snow, Philippe Mathieu-Daudé, Cleber Rosa,
Peter Maydell, qemu-arm, Joel Stanley, qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Eric Blake, Ani Sinha,
Eduardo Habkost, Markus Armbruster, Daniel P . Berrangé
Create a socketpair for the console output. This should help eliminate
race conditions around console text early in the boot process that might
otherwise have been dropped on the floor before being able to connect to
QEMU under "server,nowait".
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20230928044943.849073-5-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/machine/machine.py | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py
index e26109e6f0e..4156b8cf7d4 100644
--- a/python/qemu/machine/machine.py
+++ b/python/qemu/machine/machine.py
@@ -159,6 +159,8 @@ def __init__(self,
self._name = name or f"{id(self):x}"
self._sock_pair: Optional[Tuple[socket.socket, socket.socket]] = None
+ self._cons_sock_pair: Optional[
+ Tuple[socket.socket, socket.socket]] = None
self._temp_dir: Optional[str] = None
self._base_temp_dir = base_temp_dir
self._sock_dir = sock_dir
@@ -316,8 +318,9 @@ def _base_args(self) -> List[str]:
for _ in range(self._console_index):
args.extend(['-serial', 'null'])
if self._console_set:
- chardev = ('socket,id=console,path=%s,server=on,wait=off' %
- self._console_address)
+ assert self._cons_sock_pair is not None
+ fd = self._cons_sock_pair[0].fileno()
+ chardev = f"socket,id=console,fd={fd}"
args.extend(['-chardev', chardev])
if self._console_device_type is None:
args.extend(['-serial', 'chardev:console'])
@@ -352,6 +355,10 @@ def _pre_launch(self) -> None:
nickname=self._name
)
+ if self._console_set:
+ self._cons_sock_pair = socket.socketpair()
+ os.set_inheritable(self._cons_sock_pair[0].fileno(), True)
+
# NOTE: Make sure any opened resources are *definitely* freed in
# _post_shutdown()!
# pylint: disable=consider-using-with
@@ -369,6 +376,9 @@ def _pre_launch(self) -> None:
def _post_launch(self) -> None:
if self._sock_pair:
self._sock_pair[0].close()
+ if self._cons_sock_pair:
+ self._cons_sock_pair[0].close()
+
if self._qmp_connection:
if self._sock_pair:
self._qmp.connect()
@@ -524,6 +534,11 @@ def _early_cleanup(self) -> None:
self._console_socket.close()
self._console_socket = None
+ if self._cons_sock_pair:
+ self._cons_sock_pair[0].close()
+ self._cons_sock_pair[1].close()
+ self._cons_sock_pair = None
+
def _hard_shutdown(self) -> None:
"""
Perform early cleanup, kill the VM, and wait for it to terminate.
@@ -885,10 +900,19 @@ def console_socket(self) -> socket.socket:
"""
if self._console_socket is None:
LOG.debug("Opening console socket")
+ if not self._console_set:
+ raise QEMUMachineError(
+ "Attempt to access console socket with no connection")
+ assert self._cons_sock_pair is not None
+ # os.dup() is used here for sock_fd because otherwise we'd
+ # have two rich python socket objects that would each try to
+ # close the same underlying fd when either one gets garbage
+ # collected.
self._console_socket = console_socket.ConsoleSocket(
- self._console_address,
+ sock_fd=os.dup(self._cons_sock_pair[1].fileno()),
file=self._console_log_path,
drain=self._drain_console)
+ self._cons_sock_pair[1].close()
return self._console_socket
@property
--
2.41.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PULL 6/9] python/machine: use socketpair() for qtest connection
2023-10-04 19:46 [PULL 0/9] Python patches John Snow
` (4 preceding siblings ...)
2023-10-04 19:46 ` [PULL 5/9] python/machine: use socketpair() for console connections John Snow
@ 2023-10-04 19:46 ` John Snow
2023-10-04 19:46 ` [PULL 7/9] python/machine: remove unused sock_dir argument John Snow
` (3 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: John Snow @ 2023-10-04 19:46 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
John Snow, Philippe Mathieu-Daudé, Cleber Rosa,
Peter Maydell, qemu-arm, Joel Stanley, qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Eric Blake, Ani Sinha,
Eduardo Habkost, Markus Armbruster, Daniel P . Berrangé
Like the QMP and console sockets, begin using socketpairs for the qtest
connection, too. After this patch, we'll be able to remove the vestigial
sock_dir argument, but that cleanup is best done in its own patch.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20230928044943.849073-6-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/machine/qtest.py | 49 +++++++++++++++++++++++++++++-------
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py
index 1c46138bd0c..8180d3ab017 100644
--- a/python/qemu/machine/qtest.py
+++ b/python/qemu/machine/qtest.py
@@ -24,6 +24,7 @@
Optional,
Sequence,
TextIO,
+ Tuple,
)
from qemu.qmp import SocketAddrT
@@ -38,23 +39,41 @@ class QEMUQtestProtocol:
:param address: QEMU address, can be either a unix socket path (string)
or a tuple in the form ( address, port ) for a TCP
connection
- :param server: server mode, listens on the socket (bool)
+ :param sock: An existing socket can be provided as an alternative to
+ an address. One of address or sock must be provided.
+ :param server: server mode, listens on the socket. Only meaningful
+ in conjunction with an address and not an existing
+ socket.
+
:raise socket.error: on socket connection errors
.. note::
No connection is established by __init__(), this is done
by the connect() or accept() methods.
"""
- def __init__(self, address: SocketAddrT,
+ def __init__(self,
+ address: Optional[SocketAddrT] = None,
+ sock: Optional[socket.socket] = None,
server: bool = False):
+ if address is None and sock is None:
+ raise ValueError("Either 'address' or 'sock' must be specified")
+ if address is not None and sock is not None:
+ raise ValueError(
+ "Either 'address' or 'sock' must be specified, but not both")
+ if sock is not None and server:
+ raise ValueError("server=True is meaningless when passing socket")
+
self._address = address
- self._sock = self._get_sock()
+ self._sock = sock or self._get_sock()
self._sockfile: Optional[TextIO] = None
+
if server:
+ assert self._address is not None
self._sock.bind(self._address)
self._sock.listen(1)
def _get_sock(self) -> socket.socket:
+ assert self._address is not None
if isinstance(self._address, tuple):
family = socket.AF_INET
else:
@@ -67,7 +86,8 @@ def connect(self) -> None:
@raise socket.error on socket connection errors
"""
- self._sock.connect(self._address)
+ if self._address is not None:
+ self._sock.connect(self._address)
self._sockfile = self._sock.makefile(mode='r')
def accept(self) -> None:
@@ -127,29 +147,40 @@ def __init__(self,
base_temp_dir=base_temp_dir,
sock_dir=sock_dir, qmp_timer=qmp_timer)
self._qtest: Optional[QEMUQtestProtocol] = None
- self._qtest_path = os.path.join(sock_dir, name + "-qtest.sock")
+ self._qtest_sock_pair: Optional[
+ Tuple[socket.socket, socket.socket]] = None
@property
def _base_args(self) -> List[str]:
args = super()._base_args
+ assert self._qtest_sock_pair is not None
+ fd = self._qtest_sock_pair[0].fileno()
args.extend([
- '-qtest', f"unix:path={self._qtest_path}",
+ '-chardev', f"socket,id=qtest,fd={fd}",
+ '-qtest', 'chardev:qtest',
'-accel', 'qtest'
])
return args
def _pre_launch(self) -> None:
+ self._qtest_sock_pair = socket.socketpair()
+ os.set_inheritable(self._qtest_sock_pair[0].fileno(), True)
super()._pre_launch()
- self._qtest = QEMUQtestProtocol(self._qtest_path, server=True)
+ self._qtest = QEMUQtestProtocol(sock=self._qtest_sock_pair[1])
def _post_launch(self) -> None:
assert self._qtest is not None
super()._post_launch()
- self._qtest.accept()
+ if self._qtest_sock_pair:
+ self._qtest_sock_pair[0].close()
+ self._qtest.connect()
def _post_shutdown(self) -> None:
+ if self._qtest_sock_pair:
+ self._qtest_sock_pair[0].close()
+ self._qtest_sock_pair[1].close()
+ self._qtest_sock_pair = None
super()._post_shutdown()
- self._remove_if_exists(self._qtest_path)
def qtest(self, cmd: str) -> str:
"""
--
2.41.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PULL 7/9] python/machine: remove unused sock_dir argument
2023-10-04 19:46 [PULL 0/9] Python patches John Snow
` (5 preceding siblings ...)
2023-10-04 19:46 ` [PULL 6/9] python/machine: use socketpair() for qtest connection John Snow
@ 2023-10-04 19:46 ` John Snow
2023-10-04 19:46 ` [PULL 8/9] python/qmp: remove Server.wait_closed() call for Python 3.12 John Snow
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: John Snow @ 2023-10-04 19:46 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
John Snow, Philippe Mathieu-Daudé, Cleber Rosa,
Peter Maydell, qemu-arm, Joel Stanley, qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Eric Blake, Ani Sinha,
Eduardo Habkost, Markus Armbruster, Daniel P . Berrangé
By using a socketpair for all of the sockets managed by the VM class and
its extensions, we don't need the sock_dir argument anymore, so remove
it.
We only added this argument so that we could specify a second, shorter
temporary directory for cases where the temp/log dirs were "too long" as
a socket name on macOS. We don't need it for this class now. In one
case, avocado testing takes over responsibility for creating an
appropriate sockdir.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20230928044943.849073-7-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/machine/machine.py | 18 ------------------
python/qemu/machine/qtest.py | 5 +----
tests/avocado/acpi-bits.py | 5 +----
tests/avocado/avocado_qemu/__init__.py | 2 +-
tests/avocado/machine_aspeed.py | 5 ++++-
tests/qemu-iotests/iotests.py | 2 +-
tests/qemu-iotests/tests/copy-before-write | 3 +--
7 files changed, 9 insertions(+), 31 deletions(-)
diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py
index 4156b8cf7d4..d539e91268a 100644
--- a/python/qemu/machine/machine.py
+++ b/python/qemu/machine/machine.py
@@ -127,7 +127,6 @@ def __init__(self,
name: Optional[str] = None,
base_temp_dir: str = "/var/tmp",
monitor_address: Optional[SocketAddrT] = None,
- sock_dir: Optional[str] = None,
drain_console: bool = False,
console_log: Optional[str] = None,
log_dir: Optional[str] = None,
@@ -141,7 +140,6 @@ def __init__(self,
@param name: prefix for socket and log file names (default: qemu-PID)
@param base_temp_dir: default location where temp files are created
@param monitor_address: address for QMP monitor
- @param sock_dir: where to create socket (defaults to base_temp_dir)
@param drain_console: (optional) True to drain console socket to buffer
@param console_log: (optional) path to console log file
@param log_dir: where to create and keep log files
@@ -163,7 +161,6 @@ def __init__(self,
Tuple[socket.socket, socket.socket]] = None
self._temp_dir: Optional[str] = None
self._base_temp_dir = base_temp_dir
- self._sock_dir = sock_dir
self._log_dir = log_dir
self._monitor_address = monitor_address
@@ -189,9 +186,6 @@ def __init__(self,
self._console_index = 0
self._console_set = False
self._console_device_type: Optional[str] = None
- self._console_address = os.path.join(
- self.sock_dir, f"{self._name}.con"
- )
self._console_socket: Optional[socket.socket] = None
self._console_file: Optional[socket.SocketIO] = None
self._remove_files: List[str] = []
@@ -335,9 +329,6 @@ def args(self) -> List[str]:
return self._args
def _pre_launch(self) -> None:
- if self._console_set:
- self._remove_files.append(self._console_address)
-
if self._qmp_set:
if self._monitor_address is None:
self._sock_pair = socket.socketpair()
@@ -937,15 +928,6 @@ def temp_dir(self) -> str:
dir=self._base_temp_dir)
return self._temp_dir
- @property
- def sock_dir(self) -> str:
- """
- Returns the directory used for sockfiles by this machine.
- """
- if self._sock_dir:
- return self._sock_dir
- return self.temp_dir
-
@property
def log_dir(self) -> str:
"""
diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py
index 8180d3ab017..4f5ede85b23 100644
--- a/python/qemu/machine/qtest.py
+++ b/python/qemu/machine/qtest.py
@@ -135,17 +135,14 @@ def __init__(self,
wrapper: Sequence[str] = (),
name: Optional[str] = None,
base_temp_dir: str = "/var/tmp",
- sock_dir: Optional[str] = None,
qmp_timer: Optional[float] = None):
# pylint: disable=too-many-arguments
if name is None:
name = "qemu-%d" % os.getpid()
- if sock_dir is None:
- sock_dir = base_temp_dir
super().__init__(binary, args, wrapper=wrapper, name=name,
base_temp_dir=base_temp_dir,
- sock_dir=sock_dir, qmp_timer=qmp_timer)
+ qmp_timer=qmp_timer)
self._qtest: Optional[QEMUQtestProtocol] = None
self._qtest_sock_pair: Optional[
Tuple[socket.socket, socket.socket]] = None
diff --git a/tests/avocado/acpi-bits.py b/tests/avocado/acpi-bits.py
index bb3f8186899..eca13dc5181 100644
--- a/tests/avocado/acpi-bits.py
+++ b/tests/avocado/acpi-bits.py
@@ -92,17 +92,14 @@ def __init__(self,
base_temp_dir: str = "/var/tmp",
debugcon_log: str = "debugcon-log.txt",
debugcon_addr: str = "0x403",
- sock_dir: Optional[str] = None,
qmp_timer: Optional[float] = None):
# pylint: disable=too-many-arguments
if name is None:
name = "qemu-bits-%d" % os.getpid()
- if sock_dir is None:
- sock_dir = base_temp_dir
super().__init__(binary, args, wrapper=wrapper, name=name,
base_temp_dir=base_temp_dir,
- sock_dir=sock_dir, qmp_timer=qmp_timer)
+ qmp_timer=qmp_timer)
self.debugcon_log = debugcon_log
self.debugcon_addr = debugcon_addr
self.base_temp_dir = base_temp_dir
diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py
index 0172a359b71..0589534f28a 100644
--- a/tests/avocado/avocado_qemu/__init__.py
+++ b/tests/avocado/avocado_qemu/__init__.py
@@ -322,7 +322,7 @@ def require_multiprocess(self):
def _new_vm(self, name, *args):
self._sd = tempfile.TemporaryDirectory(prefix="qemu_")
vm = QEMUMachine(self.qemu_bin, base_temp_dir=self.workdir,
- sock_dir=self._sd.name, log_dir=self.logdir)
+ log_dir=self.logdir)
self.log.debug('QEMUMachine "%s" created', name)
self.log.debug('QEMUMachine "%s" temp_dir: %s', name, vm.temp_dir)
self.log.debug('QEMUMachine "%s" log_dir: %s', name, vm.log_dir)
diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py
index 90f1b7cb77a..f691ee3fb82 100644
--- a/tests/avocado/machine_aspeed.py
+++ b/tests/avocado/machine_aspeed.py
@@ -247,7 +247,10 @@ def test_arm_ast2600_evb_buildroot_tpm(self):
image_path = self.fetch_asset(image_url, asset_hash=image_hash,
algorithm='sha256')
- socket = os.path.join(self.vm.sock_dir, 'swtpm-socket')
+ # force creation of VM object, which also defines self._sd
+ vm = self.vm
+
+ socket = os.path.join(self._sd.name, 'swtpm-socket')
subprocess.run(['swtpm', 'socket', '-d', '--tpm2',
'--tpmstate', f'dir={self.vm.temp_dir}',
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index ef66fbd62b0..145c6827138 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -823,7 +823,7 @@ def __init__(self, path_suffix=''):
super().__init__(qemu_prog, qemu_opts, wrapper=wrapper,
name=name,
base_temp_dir=test_dir,
- sock_dir=sock_dir, qmp_timer=timer)
+ qmp_timer=timer)
self._num_drives = 0
def _post_shutdown(self) -> None:
diff --git a/tests/qemu-iotests/tests/copy-before-write b/tests/qemu-iotests/tests/copy-before-write
index 2ffe092b318..d3987db9421 100755
--- a/tests/qemu-iotests/tests/copy-before-write
+++ b/tests/qemu-iotests/tests/copy-before-write
@@ -44,8 +44,7 @@ class TestCbwError(iotests.QMPTestCase):
opts = ['-nodefaults', '-display', 'none', '-machine', 'none']
self.vm = QEMUMachine(iotests.qemu_prog, opts,
- base_temp_dir=iotests.test_dir,
- sock_dir=iotests.sock_dir)
+ base_temp_dir=iotests.test_dir)
self.vm.launch()
def do_cbw_error(self, on_cbw_error):
--
2.41.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PULL 8/9] python/qmp: remove Server.wait_closed() call for Python 3.12
2023-10-04 19:46 [PULL 0/9] Python patches John Snow
` (6 preceding siblings ...)
2023-10-04 19:46 ` [PULL 7/9] python/machine: remove unused sock_dir argument John Snow
@ 2023-10-04 19:46 ` John Snow
2023-10-04 19:46 ` [PULL 9/9] Python: test " John Snow
2023-10-05 4:48 ` [PULL 0/9] Python patches Philippe Mathieu-Daudé
9 siblings, 0 replies; 15+ messages in thread
From: John Snow @ 2023-10-04 19:46 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
John Snow, Philippe Mathieu-Daudé, Cleber Rosa,
Peter Maydell, qemu-arm, Joel Stanley, qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Eric Blake, Ani Sinha,
Eduardo Habkost, Markus Armbruster
This patch is a backport from
https://gitlab.com/qemu-project/python-qemu-qmp/-/commit/e03a3334b6a477beb09b293708632f2c06fe9f61
According to Guido in https://github.com/python/cpython/issues/104344 ,
this call was never meant to wait for the server to shut down - that is
handled synchronously - but instead, this waits for all connections to
close. Or, it would have, if it wasn't broken since it was introduced.
3.12 fixes the bug, which now causes a hang in our code. The fix is just
to remove the wait.
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/qmp/protocol.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/python/qemu/qmp/protocol.py b/python/qemu/qmp/protocol.py
index 753182131fd..a4ffdfad51b 100644
--- a/python/qemu/qmp/protocol.py
+++ b/python/qemu/qmp/protocol.py
@@ -495,7 +495,6 @@ async def _stop_server(self) -> None:
try:
self.logger.debug("Stopping server.")
self._server.close()
- await self._server.wait_closed()
self.logger.debug("Server stopped.")
finally:
self._server = None
--
2.41.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PULL 9/9] Python: test Python 3.12
2023-10-04 19:46 [PULL 0/9] Python patches John Snow
` (7 preceding siblings ...)
2023-10-04 19:46 ` [PULL 8/9] python/qmp: remove Server.wait_closed() call for Python 3.12 John Snow
@ 2023-10-04 19:46 ` John Snow
2023-10-05 4:48 ` [PULL 0/9] Python patches Philippe Mathieu-Daudé
9 siblings, 0 replies; 15+ messages in thread
From: John Snow @ 2023-10-04 19:46 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
John Snow, Philippe Mathieu-Daudé, Cleber Rosa,
Peter Maydell, qemu-arm, Joel Stanley, qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Eric Blake, Ani Sinha,
Eduardo Habkost, Markus Armbruster
Python 3.12 has released, so update the test infrastructure to test
against this version.
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/setup.cfg | 3 ++-
tests/docker/dockerfiles/python.docker | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/python/setup.cfg b/python/setup.cfg
index 8c67dce4579..48668609d3e 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -18,6 +18,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
+ Programming Language :: Python :: 3.12
Typing :: Typed
[options]
@@ -182,7 +183,7 @@ multi_line_output=3
# of python available on your system to run this test.
[tox:tox]
-envlist = py38, py39, py310, py311
+envlist = py38, py39, py310, py311, py312
skip_missing_interpreters = true
[testenv]
diff --git a/tests/docker/dockerfiles/python.docker b/tests/docker/dockerfiles/python.docker
index 383ccbdc3a5..a3c1321190c 100644
--- a/tests/docker/dockerfiles/python.docker
+++ b/tests/docker/dockerfiles/python.docker
@@ -11,7 +11,11 @@ ENV PACKAGES \
python3-pip \
python3-tox \
python3-virtualenv \
- python3.10
+ python3.10 \
+ python3.11 \
+ python3.12 \
+ python3.8 \
+ python3.9
RUN dnf install -y $PACKAGES
RUN rpm -q $PACKAGES | sort > /packages.txt
--
2.41.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PULL 0/9] Python patches
2023-10-04 19:46 [PULL 0/9] Python patches John Snow
` (8 preceding siblings ...)
2023-10-04 19:46 ` [PULL 9/9] Python: test " John Snow
@ 2023-10-05 4:48 ` Philippe Mathieu-Daudé
2023-10-05 13:00 ` Stefan Hajnoczi
9 siblings, 1 reply; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-05 4:48 UTC (permalink / raw)
To: John Snow, qemu-devel
Cc: Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
Cleber Rosa, Peter Maydell, qemu-arm, Joel Stanley, qemu-block,
Beraldo Leal, Vladimir Sementsov-Ogievskiy, Hanna Reitz,
Michael S. Tsirkin, Vladimir Sementsov-Ogievskiy, Thomas Huth,
Eric Blake, Ani Sinha, Eduardo Habkost, Markus Armbruster
Hi John,
On 4/10/23 21:46, John Snow wrote:
> The following changes since commit da1034094d375afe9e3d8ec8980550ea0f06f7e0:
>
> Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-10-03 07:43:44 -0400)
>
> are available in the Git repository at:
>
> https://gitlab.com/jsnow/qemu.git tags/python-pull-request
>
> for you to fetch changes up to 4d7a663cbe8343e884b88e44bd88d37dd0a470e5:
>
> Python: test Python 3.12 (2023-10-04 15:19:00 -0400)
>
> ----------------------------------------------------------------
> Python pullreq
>
> Buffering improvements for qemu machine, minor changes to support the
> newly released Python 3.12
>
> ----------------------------------------------------------------
>
> John Snow (9):
> Python/iotests: Add type hint for nbd module
> python/machine: move socket setup out of _base_args property
> python/machine: close sock_pair in cleanup path
> python/console_socket: accept existing FD in initializer
> python/machine: use socketpair() for console connections
> python/machine: use socketpair() for qtest connection
> python/machine: remove unused sock_dir argument
> python/qmp: remove Server.wait_closed() call for Python 3.12
> Python: test Python 3.12
Is that a pull request or a patch series to be reviewed?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PULL 0/9] Python patches
2023-10-05 4:48 ` [PULL 0/9] Python patches Philippe Mathieu-Daudé
@ 2023-10-05 13:00 ` Stefan Hajnoczi
2023-10-05 14:59 ` John Snow
0 siblings, 1 reply; 15+ messages in thread
From: Stefan Hajnoczi @ 2023-10-05 13:00 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: John Snow, qemu-devel, Alex Bennée, Cédric Le Goater,
Wainer dos Santos Moschetta, Kevin Wolf, Andrew Jeffery,
Cleber Rosa, Peter Maydell, qemu-arm, Joel Stanley, qemu-block,
Beraldo Leal, Vladimir Sementsov-Ogievskiy, Hanna Reitz,
Michael S. Tsirkin, Vladimir Sementsov-Ogievskiy, Thomas Huth,
Eric Blake, Ani Sinha, Eduardo Habkost, Markus Armbruster
On Thu, 5 Oct 2023 at 00:49, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Hi John,
>
> On 4/10/23 21:46, John Snow wrote:
> > The following changes since commit da1034094d375afe9e3d8ec8980550ea0f06f7e0:
> >
> > Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-10-03 07:43:44 -0400)
> >
> > are available in the Git repository at:
> >
> > https://gitlab.com/jsnow/qemu.git tags/python-pull-request
> >
> > for you to fetch changes up to 4d7a663cbe8343e884b88e44bd88d37dd0a470e5:
> >
> > Python: test Python 3.12 (2023-10-04 15:19:00 -0400)
> >
> > ----------------------------------------------------------------
> > Python pullreq
> >
> > Buffering improvements for qemu machine, minor changes to support the
> > newly released Python 3.12
> >
> > ----------------------------------------------------------------
> >
> > John Snow (9):
> > Python/iotests: Add type hint for nbd module
> > python/machine: move socket setup out of _base_args property
> > python/machine: close sock_pair in cleanup path
> > python/console_socket: accept existing FD in initializer
> > python/machine: use socketpair() for console connections
> > python/machine: use socketpair() for qtest connection
> > python/machine: remove unused sock_dir argument
> > python/qmp: remove Server.wait_closed() call for Python 3.12
> > Python: test Python 3.12
>
> Is that a pull request or a patch series to be reviewed?
Strange, some of the patches have Reviewed-by tags but others do not.
I could not find a "Add type hint for nbd module" patch on the mailing
list before this pull request, so I guess it hasn't been reviewed.
I'll hold off from merging this series for now.
John: Please make sure all patches have been on the mailing list for
review before sending a pull request.
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PULL 0/9] Python patches
2023-10-05 13:00 ` Stefan Hajnoczi
@ 2023-10-05 14:59 ` John Snow
0 siblings, 0 replies; 15+ messages in thread
From: John Snow @ 2023-10-05 14:59 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: Philippe Mathieu-Daudé, qemu-devel, Alex Bennée,
Cédric Le Goater, Wainer dos Santos Moschetta, Kevin Wolf,
Andrew Jeffery, Cleber Rosa, Peter Maydell, qemu-arm,
Joel Stanley, Qemu-block, Beraldo Leal,
Vladimir Sementsov-Ogievskiy, Hanna Reitz, Michael S. Tsirkin,
Vladimir Sementsov-Ogievskiy, Thomas Huth, Eric Blake, Ani Sinha,
Eduardo Habkost, Markus Armbruster
[-- Attachment #1: Type: text/plain, Size: 2093 bytes --]
On Thu, Oct 5, 2023, 9:00 AM Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Thu, 5 Oct 2023 at 00:49, Philippe Mathieu-Daudé <philmd@linaro.org>
> wrote:
> >
> > Hi John,
> >
> > On 4/10/23 21:46, John Snow wrote:
> > > The following changes since commit
> da1034094d375afe9e3d8ec8980550ea0f06f7e0:
> > >
> > > Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into
> staging (2023-10-03 07:43:44 -0400)
> > >
> > > are available in the Git repository at:
> > >
> > > https://gitlab.com/jsnow/qemu.git tags/python-pull-request
> > >
> > > for you to fetch changes up to
> 4d7a663cbe8343e884b88e44bd88d37dd0a470e5:
> > >
> > > Python: test Python 3.12 (2023-10-04 15:19:00 -0400)
> > >
> > > ----------------------------------------------------------------
> > > Python pullreq
> > >
> > > Buffering improvements for qemu machine, minor changes to support the
> > > newly released Python 3.12
> > >
> > > ----------------------------------------------------------------
> > >
> > > John Snow (9):
> > > Python/iotests: Add type hint for nbd module
> > > python/machine: move socket setup out of _base_args property
> > > python/machine: close sock_pair in cleanup path
> > > python/console_socket: accept existing FD in initializer
> > > python/machine: use socketpair() for console connections
> > > python/machine: use socketpair() for qtest connection
> > > python/machine: remove unused sock_dir argument
> > > python/qmp: remove Server.wait_closed() call for Python 3.12
> > > Python: test Python 3.12
> >
> > Is that a pull request or a patch series to be reviewed?
>
> Strange, some of the patches have Reviewed-by tags but others do not.
> I could not find a "Add type hint for nbd module" patch on the mailing
> list before this pull request, so I guess it hasn't been reviewed.
>
> I'll hold off from merging this series for now.
>
> John: Please make sure all patches have been on the mailing list for
> review before sending a pull request.
>
> Stefan
>
Okey Dokey.
--js
[-- Attachment #2: Type: text/html, Size: 3047 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread