qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] iotests: Add test for failing qemu-img commit
Date: Tue, 27 Jun 2017 14:52:32 -0500	[thread overview]
Message-ID: <0bed1851-9298-0ba5-0604-9686ca5cf569@redhat.com> (raw)
In-Reply-To: <20170616135847.17726-1-mreitz@redhat.com>

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

On 06/16/2017 08:58 AM, Max Reitz wrote:
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> In order to pass, this depends on "fix: avoid an infinite loop or a
> dangling pointer problem in img_commit"
> (http://lists.nongnu.org/archive/html/qemu-block/2017-06/msg00443.html)

Looks like that is now 4172a003

> and on the "block: Don't compare strings in bdrv_reopen_prepare()"
> series
> (http://lists.nongnu.org/archive/html/qemu-block/2017-06/msg00424.html).

Still pending.

> ---
>  tests/qemu-iotests/020     | 27 +++++++++++++++++++++++++++
>  tests/qemu-iotests/020.out | 17 +++++++++++++++++
>  2 files changed, 44 insertions(+)
> 
> diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020
> index 7a11110..83d5ef0 100755
> --- a/tests/qemu-iotests/020
> +++ b/tests/qemu-iotests/020
> @@ -110,6 +110,33 @@ for offset in $TEST_OFFSETS; do
>      io_zero readv $(( offset + 64 * 1024 + 65536 * 4 )) 65536 65536 1
>  done
>  _check_test_img
> +_cleanup
> +TEST_IMG=$TEST_IMG_SAVE
> +
> +echo
> +echo 'Testing failing commit'
> +echo
> +
> +# Create an image with a null backing file to which committing will fail (with
> +# ENOSPC so we can distinguish the result from some generic EIO which may be
> +# generated anywhere in the block layer)
> +_make_test_img -b "json:{'driver': 'raw',
> +                         'file': {
> +                             'driver': 'blkdebug',
> +                             'inject-error': [{
> +                                 'event': 'write_aio',
> +                                 'errno': 28,

Still nasty that we encoded an errno value rather than using a
stringified enum, but that's not your problem.

> +                                 'once': true
> +                             }],
> +                             'image': {
> +                                 'driver': 'null-co'
> +                             }}}"

The comment does wonders for explaining how it all works!

> +
> +# Just write anything so comitting will not be a no-op

s/comitting/committing/

With the typo fix,
Reviewed-by: Eric Blake <eblake@redhat.com>

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-06-27 19:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16 13:58 [Qemu-devel] [PATCH] iotests: Add test for failing qemu-img commit Max Reitz
2017-06-27 19:52 ` Eric Blake [this message]
2017-06-30  2:59   ` Max Reitz
2017-11-10 21:21 ` Max Reitz
2017-11-14 15:54   ` Max Reitz

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=0bed1851-9298-0ba5-0604-9686ca5cf569@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).