qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 12/13] qemu-iotests: Reopen qcow2 with lazy-refcounts change
Date: Fri, 4 Sep 2015 21:22:11 +0200	[thread overview]
Message-ID: <55E9EF63.7080204@redhat.com> (raw)
In-Reply-To: <1441387117-27072-13-git-send-email-kwolf@redhat.com>

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

On 04.09.2015 19:18, Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/039     | 27 +++++++++++++++++++++++++++
>  tests/qemu-iotests/039.out | 18 ++++++++++++++++++
>  2 files changed, 45 insertions(+)
> 
> diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
> index 617f397..9e9b379 100755
> --- a/tests/qemu-iotests/039
> +++ b/tests/qemu-iotests/039
> @@ -147,6 +147,33 @@ $PYTHON qcow2.py "$TEST_IMG".base dump-header | grep incompatible_features
>  _check_test_img
>  TEST_IMG="$TEST_IMG".base _check_test_img
>  
> +echo
> +echo "== Changing lazy_refcounts setting at runtime =="
> +
> +IMGOPTS="compat=1.1,lazy_refcounts=off"
> +_make_test_img $size
> +
> +$QEMU_IO -c "reopen -o lazy-refcounts=on" \
> +         -c "write -P 0x5a 0 512" \
> +         -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \
> +    | _filter_qemu_io
> +
> +# The dirty bit must be set
> +$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
> +_check_test_img
> +
> +IMGOPTS="compat=1.1,lazy_refcounts=on"
> +_make_test_img $size
> +
> +$QEMU_IO -c "reopen -o lazy-refcounts=off" \
> +         -c "write -P 0x5a 0 512" \

Maybe it would be nicer to test this the other way around, write first
and then disable lazy refcounts in order to test whether the refcounts
are actually flushed during the reopen.

Either way:

Reviewed-by: Max Reitz <mreitz@redhat.com>

> +         -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \
> +    | _filter_qemu_io
> +
> +# The dirty bit must not be set
> +$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
> +_check_test_img
> +
>  
>  # success, all done
>  echo "*** done"
> diff --git a/tests/qemu-iotests/039.out b/tests/qemu-iotests/039.out
> index b055670..39859b2 100644
> --- a/tests/qemu-iotests/039.out
> +++ b/tests/qemu-iotests/039.out
> @@ -74,4 +74,22 @@ incompatible_features     0x0
>  incompatible_features     0x0
>  No errors were found on the image.
>  No errors were found on the image.
> +
> +== Changing lazy_refcounts setting at runtime ==
> +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
> +wrote 512/512 bytes at offset 0
> +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +./common.config: Killed                  ( exec "$QEMU_IO_PROG" $QEMU_IO_OPTIONS "$@" )
> +incompatible_features     0x1
> +ERROR cluster 5 refcount=0 reference=1
> +ERROR OFLAG_COPIED data cluster: l2_entry=8000000000050000 refcount=0
> +
> +2 errors were found on the image.
> +Data may be corrupted, or further writes to the image may corrupt it.
> +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
> +wrote 512/512 bytes at offset 0
> +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +./common.config: Killed                  ( exec "$QEMU_IO_PROG" $QEMU_IO_OPTIONS "$@" )
> +incompatible_features     0x0
> +No errors were found on the image.
>  *** done
> 



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

  reply	other threads:[~2015-09-04 19:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-04 17:18 [Qemu-devel] [PATCH v2 00/13] qcow2: reopen: Change driver-specific runtime options Kevin Wolf
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 01/13] block: Allow specifying driver-specific options to reopen Kevin Wolf
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 02/13] qemu-io: Remove duplicate 'open' error message Kevin Wolf
2015-09-04 18:10   ` Max Reitz
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 03/13] qemu-io: Add command 'reopen' Kevin Wolf
2015-09-04 18:33   ` Max Reitz
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 04/13] qcow2: Improve error message Kevin Wolf
2015-09-04 18:34   ` Max Reitz
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 05/13] qcow2: Factor out qcow2_update_options() Kevin Wolf
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 06/13] qcow2: Move qcow2_update_options() call up Kevin Wolf
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 07/13] qcow2: Move rest of option handling to qcow2_update_options() Kevin Wolf
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 08/13] qcow2: Leave s unchanged on qcow2_update_options() failure Kevin Wolf
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 09/13] qcow2: Fix memory leak in qcow2_update_options() error path Kevin Wolf
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 10/13] qcow2: Make qcow2_update_options() suitable for transactions Kevin Wolf
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 11/13] qcow2: Support updating driver-specific options in reopen Kevin Wolf
2015-09-04 19:16   ` Max Reitz
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 12/13] qemu-iotests: Reopen qcow2 with lazy-refcounts change Kevin Wolf
2015-09-04 19:22   ` Max Reitz [this message]
2015-09-04 17:18 ` [Qemu-devel] [PATCH v2 13/13] qemu-iotests: More qcow2 reopen tests Kevin Wolf
2015-09-04 19:52   ` Max Reitz
2015-09-07 12:08     ` Kevin Wolf
2015-09-07 12:23       ` [Qemu-devel] [Qemu-block] " 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=55E9EF63.7080204@redhat.com \
    --to=mreitz@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 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).