qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: kwolf@redhat.com, den@openvz.org, qemu-devel@nongnu.org,
	mreitz@redhat.com
Subject: Re: [PATCH v2 4/8] iotests.py: qemu_io(): reuse qemu_tool_pipe_and_status()
Date: Wed, 20 Jan 2021 20:13:52 -0600	[thread overview]
Message-ID: <3be51794-d90d-eb4c-b06e-9ced04129aa2@redhat.com> (raw)
In-Reply-To: <20201130134024.19212-5-vsementsov@virtuozzo.com>

On 11/30/20 7:40 AM, Vladimir Sementsov-Ogievskiy wrote:
> Just drop code duplication.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>  tests/qemu-iotests/iotests.py | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
> index 5ebe25e063..6c9bcf9042 100644
> --- a/tests/qemu-iotests/iotests.py
> +++ b/tests/qemu-iotests/iotests.py
> @@ -188,14 +188,7 @@ def img_info_log(filename, filter_path=None, imgopts=False, extra_args=()):
>  def qemu_io(*args):
>      '''Run qemu-io and return the stdout data'''
>      args = qemu_io_args + list(args)
> -    subp = subprocess.Popen(args, stdout=subprocess.PIPE,
> -                            stderr=subprocess.STDOUT,
> -                            universal_newlines=True)
> -    output = subp.communicate()[0]
> -    if subp.returncode < 0:
> -        sys.stderr.write('qemu-io received signal %i: %s\n'
> -                         % (-subp.returncode, ' '.join(args)))
> -    return output
> +    return qemu_tool_pipe_and_status('qemu-io', args)[0]
>  
>  def qemu_io_log(*args):
>      result = qemu_io(*args)
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2021-01-21  2:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 13:40 [PATCH v2 for-6.0 0/8] nbd reconnect on open Vladimir Sementsov-Ogievskiy
2020-11-30 13:40 ` [PATCH v2 1/8] block/nbd: move initial connect to coroutine Vladimir Sementsov-Ogievskiy
2021-01-20 22:24   ` Eric Blake
2020-11-30 13:40 ` [PATCH v2 2/8] nbd: allow reconnect on open, with corresponding new options Vladimir Sementsov-Ogievskiy
2021-01-21  1:44   ` Eric Blake
2021-01-22 10:56     ` Vladimir Sementsov-Ogievskiy
2020-11-30 13:40 ` [PATCH v2 3/8] iotests.py: fix qemu_tool_pipe_and_status() Vladimir Sementsov-Ogievskiy
2021-01-21  1:58   ` Eric Blake
2020-11-30 13:40 ` [PATCH v2 4/8] iotests.py: qemu_io(): reuse qemu_tool_pipe_and_status() Vladimir Sementsov-Ogievskiy
2021-01-21  2:13   ` Eric Blake [this message]
2020-11-30 13:40 ` [PATCH v2 5/8] iotests.py: add qemu_tool_popen() Vladimir Sementsov-Ogievskiy
2020-11-30 13:40 ` [PATCH v2 6/8] iotests.py: add and use qemu_io_wrap_args() Vladimir Sementsov-Ogievskiy
2020-11-30 13:40 ` [PATCH v2 7/8] iotests.py: add qemu_io_popen() Vladimir Sementsov-Ogievskiy
2020-11-30 13:40 ` [PATCH v2 8/8] iotests: add 306 to test reconnect on nbd open Vladimir Sementsov-Ogievskiy
2020-12-18 10:57 ` [PATCH v2 for-6.0 0/8] nbd reconnect on open Vladimir Sementsov-Ogievskiy
2021-01-09 10:11   ` Vladimir Sementsov-Ogievskiy
2021-01-21  2:17 ` Eric Blake

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=3be51794-d90d-eb4c-b06e-9ced04129aa2@redhat.com \
    --to=eblake@redhat.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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).