qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-iotests: Test progress output for conversion
Date: Tue, 4 Mar 2014 10:02:24 +0100	[thread overview]
Message-ID: <20140304090221.GB2666@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <5314C7F5.4010701@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2354 bytes --]

Am 03.03.2014 um 19:20 hat Eric Blake geschrieben:
> On 03/03/2014 06:57 AM, Kevin Wolf wrote:
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > ---
> >  tests/qemu-iotests/086     | 65 ++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/qemu-iotests/086.out | 18 +++++++++++++
> >  tests/qemu-iotests/group   |  1 +
> >  3 files changed, 84 insertions(+)
> >  create mode 100755 tests/qemu-iotests/086
> >  create mode 100644 tests/qemu-iotests/086.out
> > 
> 
> > +
> > +$QEMU_IMG convert -p -O $IMGFMT -f $IMGFMT "$TEST_IMG" "$TEST_IMG".base  2>&1 |\
> > +    _filter_testdir | sed -e 's/\r/\n/g'
> 
> \r is not portable sed.  Alas, coming up with a portable way to
> represent carriage return in sed is a bear, so I can live with this
> reliance on GNU sed.

We already have it in other places, so I guess this one doesn't make
things worse.

> > +wrote 1048576/1048576 bytes at offset 33554432
> > +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> > +    (0.00/100%)
> > +    (25.00/100%)
> > +    (50.00/100%)
> > +    (75.00/100%)
> > +    (100.00/100%)
> > +    (100.00/100%)
> 
> Feels fragile (will it ALWAYS be done in chunks of 25% completion?) but
> if it passes reliably, it's always better to have more test coverage.

Yes, this concern is what stopped me from writing such a test for a long
time. However, I think we really need a test case for it because
apparently we tend to break this, and after some pondering I came to the
conclusion that results should be consistent as long as we restrict it
to a single image format (drivers may behave differently), which is not
raw (that would expose filesystem-specific behaviour).

With a qcow2-only case I think we should be fine as long as neither
qcow2 nor qemu-img change their implementation.

The other case that I would love to test is not specifying -p but
sending SIGUSR1. I'm not sure how to do that in a consistent way,
though. Perhaps something with blkdebug.

> Can we test the other commands that support -p?  And is anyone
> interested in adding -p support to more commands (there are several
> long-running commands that could use it but don't have it yet).

Feel free to implement it. ;-)

(Perhaps it would be easier after converting some qemu-img subcommands
to use block jobs internally.)

Kevin

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2014-03-04  9:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 13:57 [Qemu-devel] [PATCH 0/2] qemu-img convert: Fix progress output Kevin Wolf
2014-03-03 13:57 ` [Qemu-devel] [PATCH 1/2] " Kevin Wolf
2014-03-03 18:16   ` Eric Blake
2014-03-03 13:57 ` [Qemu-devel] [PATCH 2/2] qemu-iotests: Test progress output for conversion Kevin Wolf
2014-03-03 18:20   ` Eric Blake
2014-03-04  9:02     ` Kevin Wolf [this message]

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=20140304090221.GB2666@dhcp-200-207.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=eblake@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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).