From: John Snow <jsnow@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: kwolf@redhat.com, famz@redhat.com, armbru@redhat.com,
qemu-devel@nongnu.org, vsementsov@parallels.com,
mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v13 15/17] iotests: add simple incremental backup case
Date: Fri, 20 Feb 2015 11:05:44 -0500 [thread overview]
Message-ID: <54E75B58.505@redhat.com> (raw)
In-Reply-To: <20150220100235.GC3867@stefanha-thinkpad.redhat.com>
On 02/20/2015 05:02 AM, Stefan Hajnoczi wrote:
> On Fri, Feb 13, 2015 at 05:08:56PM -0500, John Snow wrote:
>> + def check_incremental(self, target=None):
>> + if target is None:
>> + target = self.bitmaps[-1].last_target()
>> + self.assertTrue(iotests.compare_images(self.test_img, target))
>> + return True
>> +
>> +
>> + def hmp_io_writes(self, drive, patterns):
>> + for pattern in patterns:
>> + self.vm.hmp_qemu_io(drive, 'write -P%s %s %s' % pattern)
>> + self.vm.hmp_qemu_io(drive, 'flush')
>
> Please don't read image files while the guest is still running. Image
> formats do not support concurrent readers and writers.
>
> Three options:
> 1. Stop the guest before accessing self.test_img
> 2. Use drive-backup to make a full copy of self.test_img that can be
> accessed.
> 3. Test specific patterns in the backup file instead of using
> compare_images (qemu-io -c 'read -P 0xff 0 512' img)
>
I'm not sure I understand the complication, here. There is no "running
guest," so these HMP writes are emulating the guest writes. As Max says,
we're using -qtest here.
If you really want, I can introduce emulated stop/resume commands just
for the sake of demonstration (I had them in there before) but for
iotests I don't see why it's strictly necessary.
--js
next prev parent reply other threads:[~2015-02-20 16:05 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 22:08 [Qemu-devel] [PATCH v13 00/17] block: incremental backup series John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 01/17] qapi: Add optional field "name" to block dirty bitmap John Snow
2015-02-16 19:58 ` Eric Blake
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 02/17] qmp: Ensure consistent granularity type John Snow
2015-02-16 19:49 ` Max Reitz
2015-02-16 19:51 ` John Snow
2015-02-16 20:03 ` Eric Blake
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 03/17] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove John Snow
2015-02-16 19:53 ` Max Reitz
2015-02-16 20:22 ` Eric Blake
2015-02-16 20:31 ` John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 04/17] block: Introduce bdrv_dirty_bitmap_granularity() John Snow
2015-02-16 19:57 ` Max Reitz
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 05/17] hbitmap: add hbitmap_merge John Snow
2015-02-20 9:34 ` Stefan Hajnoczi
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 06/17] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 07/17] block: Add bitmap successors John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 08/17] qmp: Add support of "dirty-bitmap" sync mode for drive-backup John Snow
2015-02-16 20:04 ` Max Reitz
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 09/17] qmp: add block-dirty-bitmap-clear John Snow
2015-02-16 20:05 ` Max Reitz
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 10/17] qapi: Add transaction support to block-dirty-bitmap operations John Snow
2015-02-16 20:28 ` Max Reitz
2015-02-16 21:33 ` John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 11/17] qmp: Add dirty bitmap status fields in query-block John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 12/17] block: add BdrvDirtyBitmap documentation John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 13/17] block: Ensure consistent bitmap function prototypes John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 14/17] iotests: add invalid input incremental backup tests John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 15/17] iotests: add simple incremental backup case John Snow
2015-02-16 20:36 ` Max Reitz
2015-02-20 10:02 ` Stefan Hajnoczi
2015-02-20 14:22 ` Max Reitz
2015-02-20 16:05 ` John Snow [this message]
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 16/17] iotests: add transactional incremental backup test John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 17/17] iotests: add incremental backup failure recovery test John Snow
2015-02-16 20:49 ` Max Reitz
2015-02-20 11:09 ` [Qemu-devel] [PATCH v13 00/17] block: incremental backup series Stefan Hajnoczi
2015-02-20 16:50 ` Kashyap Chamarthy
2015-02-20 17:20 ` John Snow
2015-02-23 17:52 ` Stefan Hajnoczi
2015-02-23 19:16 ` John Snow
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=54E75B58.505@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@parallels.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).