All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.10 5/5] qemu-iotests: Test reopen between read-only and read-write
Date: Thu, 3 Aug 2017 10:41:09 -0500	[thread overview]
Message-ID: <43b8796a-8bc5-cdeb-2ff8-cd501d80d021@redhat.com> (raw)
In-Reply-To: <20170803150301.10177-6-kwolf@redhat.com>

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

On 08/03/2017 10:03 AM, Kevin Wolf wrote:
> This serves as a regression test for the bugs that were just fixed for
> bdrv_reopen() between read-only and read-write mode.

If I'm right that this also fixes the difference between intermediate
vs. live commit to an initial read-write image that can't be reopened,
can we add that to this test?

> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/187     | 69 ++++++++++++++++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/187.out | 18 ++++++++++++
>  tests/qemu-iotests/group   |  1 +
>  3 files changed, 88 insertions(+)
>  create mode 100755 tests/qemu-iotests/187
>  create mode 100644 tests/qemu-iotests/187.out
> 

> +
> +_cleanup()
> +{
> +	_cleanup_test_img
> +    rm -f "$TEST_IMG.2"
> +    rm -f "$TEST_IMG.3"
> +}
> +trap "_cleanup; exit \$status" 0 1 2 3 15

There are pending patches for 2.11 that will need to tweak this. But for
2.10, this is fine.


> +++ b/tests/qemu-iotests/187.out
> @@ -0,0 +1,18 @@
> +QA output created by 187
> +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
> +
> +Start from read-only
> +
> +Block node is read-only
> +wrote 65536/65536 bytes at offset 0
> +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +Block node is read-only
> +

Why the difference in error messages, when starting read-only,

> +Start from read-write
> +
> +wrote 65536/65536 bytes at offset 0
> +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +write failed: Operation not permitted

vs. when reopened read-only?

I don't see it as a flaw in the test, so much as another odd difference
in code paths that we may later want to improve.

So, as written,
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: 619 bytes --]

  reply	other threads:[~2017-08-03 15:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 15:02 [Qemu-devel] [PATCH for-2.10 0/5] block: bdrv_reopen() fixes Kevin Wolf
2017-08-03 15:02 ` [Qemu-devel] [PATCH for-2.10 1/5] block: Fix order in bdrv_replace_child() Kevin Wolf
2017-08-03 15:12   ` Eric Blake
2017-08-03 16:18   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-03 15:02 ` [Qemu-devel] [PATCH for-2.10 2/5] block: Allow reopen rw without BDRV_O_ALLOW_RDWR Kevin Wolf
2017-08-03 15:21   ` Eric Blake
2017-08-04  1:49     ` Eric Blake
2017-08-04 10:20       ` Kevin Wolf
2017-08-04 11:17         ` Eric Blake
2017-08-03 16:22   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-03 15:02 ` [Qemu-devel] [PATCH for-2.10 3/5] block: Set BDRV_O_ALLOW_RDWR during rw reopen Kevin Wolf
2017-08-03 15:27   ` Eric Blake
2017-08-03 16:24   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-03 15:03 ` [Qemu-devel] [PATCH for-2.10 4/5] qemu-io: Allow reopen read-write Kevin Wolf
2017-08-03 15:37   ` Eric Blake
2017-08-03 16:25   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-03 15:03 ` [Qemu-devel] [PATCH for-2.10 5/5] qemu-iotests: Test reopen between read-only and read-write Kevin Wolf
2017-08-03 15:41   ` Eric Blake [this message]
2017-08-03 16:28   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-07 23:39 ` [Qemu-devel] [Qemu-block] [PATCH for-2.10 0/5] block: bdrv_reopen() fixes John Snow
2017-08-08  7:37 ` [Qemu-devel] " Kevin Wolf

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=43b8796a-8bc5-cdeb-2ff8-cd501d80d021@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@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 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.