All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL v2 0/7] NBD patches
@ 2021-12-23  8:53 Vladimir Sementsov-Ogievskiy
  2021-12-23  8:53 ` [PULL v2 4/7] iotests.py: add qemu_tool_popen() Vladimir Sementsov-Ogievskiy
  2021-12-23 19:32 ` [PULL v2 0/7] NBD patches Richard Henderson
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2021-12-23  8:53 UTC (permalink / raw)
  To: qemu-block
  Cc: richard.henderson, peter.maydell, vsementsov, eblake, qemu-devel

The following changes since commit 2bf40d0841b942e7ba12953d515e62a436f0af84:

  Merge tag 'pull-user-20211220' of https://gitlab.com/rth7680/qemu into staging (2021-12-20 13:20:07 -0800)

are available in the Git repository at:

  https://src.openvz.org/scm/~vsementsov/qemu.git tags/pull-nbd-2021-12-22-v2

for you to fetch changes up to ab7f7e67a7e7b49964109501dfcde4ec29bae60e:

  iotests: add nbd-reconnect-on-open test (2021-12-23 09:40:34 +0100)

----------------------------------------------------------------
nbd: reconnect-on-open feature
  v2: simple fix for mypy and pylint complains on patch 04

----------------------------------------------------------------

Vladimir Sementsov-Ogievskiy (7):
  nbd: allow reconnect on open, with corresponding new options
  nbd/client-connection: nbd_co_establish_connection(): return real
    error
  nbd/client-connection: improve error message of cancelled attempt
  iotests.py: add qemu_tool_popen()
  iotests.py: add and use qemu_io_wrap_args()
  iotests.py: add qemu_io_popen()
  iotests: add nbd-reconnect-on-open test

 qapi/block-core.json                          |  9 ++-
 block/nbd.c                                   | 45 +++++++++++-
 nbd/client-connection.c                       | 59 ++++++++++-----
 tests/qemu-iotests/iotests.py                 | 37 ++++++----
 .../qemu-iotests/tests/nbd-reconnect-on-open  | 71 +++++++++++++++++++
 .../tests/nbd-reconnect-on-open.out           | 11 +++
 6 files changed, 200 insertions(+), 32 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/nbd-reconnect-on-open
 create mode 100644 tests/qemu-iotests/tests/nbd-reconnect-on-open.out

-- 
2.31.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PULL v2 4/7] iotests.py: add qemu_tool_popen()
  2021-12-23  8:53 [PULL v2 0/7] NBD patches Vladimir Sementsov-Ogievskiy
@ 2021-12-23  8:53 ` Vladimir Sementsov-Ogievskiy
  2021-12-23 19:32 ` [PULL v2 0/7] NBD patches Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2021-12-23  8:53 UTC (permalink / raw)
  To: qemu-block
  Cc: richard.henderson, peter.maydell, vsementsov, eblake, qemu-devel,
	Nikita Lapshin

Split qemu_tool_popen() from qemu_tool_pipe_and_status() to be used
separately.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Nikita Lapshin <nikita.lapshin@virtuozzo.com>
---
 tests/qemu-iotests/iotests.py | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 83bfedb902..452d047716 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -138,14 +138,22 @@ def unarchive_sample_image(sample, fname):
         shutil.copyfileobj(f_in, f_out)
 
 
+def qemu_tool_popen(args: Sequence[str],
+                    connect_stderr: bool = True) -> 'subprocess.Popen[str]':
+    stderr = subprocess.STDOUT if connect_stderr else None
+    # pylint: disable=consider-using-with
+    return subprocess.Popen(args,
+                            stdout=subprocess.PIPE,
+                            stderr=stderr,
+                            universal_newlines=True)
+
+
 def qemu_tool_pipe_and_status(tool: str, args: Sequence[str],
                               connect_stderr: bool = True) -> Tuple[str, int]:
     """
     Run a tool and return both its output and its exit code
     """
-    stderr = subprocess.STDOUT if connect_stderr else None
-    with subprocess.Popen(args, stdout=subprocess.PIPE,
-                          stderr=stderr, universal_newlines=True) as subp:
+    with qemu_tool_popen(args, connect_stderr) as subp:
         output = subp.communicate()[0]
         if subp.returncode < 0:
             cmd = ' '.join(args)
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PULL v2 0/7] NBD patches
  2021-12-23  8:53 [PULL v2 0/7] NBD patches Vladimir Sementsov-Ogievskiy
  2021-12-23  8:53 ` [PULL v2 4/7] iotests.py: add qemu_tool_popen() Vladimir Sementsov-Ogievskiy
@ 2021-12-23 19:32 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2021-12-23 19:32 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, qemu-block
  Cc: peter.maydell, eblake, qemu-devel

On 12/23/21 12:53 AM, Vladimir Sementsov-Ogievskiy wrote:
> The following changes since commit 2bf40d0841b942e7ba12953d515e62a436f0af84:
> 
>    Merge tag 'pull-user-20211220' of https://gitlab.com/rth7680/qemu into staging (2021-12-20 13:20:07 -0800)
> 
> are available in the Git repository at:
> 
>    https://src.openvz.org/scm/~vsementsov/qemu.git tags/pull-nbd-2021-12-22-v2
> 
> for you to fetch changes up to ab7f7e67a7e7b49964109501dfcde4ec29bae60e:
> 
>    iotests: add nbd-reconnect-on-open test (2021-12-23 09:40:34 +0100)
> 
> ----------------------------------------------------------------
> nbd: reconnect-on-open feature
>    v2: simple fix for mypy and pylint complains on patch 04
> 
> ----------------------------------------------------------------
> 
> Vladimir Sementsov-Ogievskiy (7):
>    nbd: allow reconnect on open, with corresponding new options
>    nbd/client-connection: nbd_co_establish_connection(): return real
>      error
>    nbd/client-connection: improve error message of cancelled attempt
>    iotests.py: add qemu_tool_popen()
>    iotests.py: add and use qemu_io_wrap_args()
>    iotests.py: add qemu_io_popen()
>    iotests: add nbd-reconnect-on-open test
> 
>   qapi/block-core.json                          |  9 ++-
>   block/nbd.c                                   | 45 +++++++++++-
>   nbd/client-connection.c                       | 59 ++++++++++-----
>   tests/qemu-iotests/iotests.py                 | 37 ++++++----
>   .../qemu-iotests/tests/nbd-reconnect-on-open  | 71 +++++++++++++++++++
>   .../tests/nbd-reconnect-on-open.out           | 11 +++
>   6 files changed, 200 insertions(+), 32 deletions(-)
>   create mode 100755 tests/qemu-iotests/tests/nbd-reconnect-on-open
>   create mode 100644 tests/qemu-iotests/tests/nbd-reconnect-on-open.out

Applied, thanks.

r~



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-23 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23  8:53 [PULL v2 0/7] NBD patches Vladimir Sementsov-Ogievskiy
2021-12-23  8:53 ` [PULL v2 4/7] iotests.py: add qemu_tool_popen() Vladimir Sementsov-Ogievskiy
2021-12-23 19:32 ` [PULL v2 0/7] NBD patches Richard Henderson

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.