Received: from eggs.gnu.org ([2001:4830:134:3::10]:38133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOlSn-0005Dl-7x for qemu-devel@nongnu.org; Fri, 20 Feb 2015 06:09:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOlSh-0005ub-Kz for qemu-devel@nongnu.org; Fri, 20 Feb 2015 06:09:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOlSh-0005uQ-CL for qemu-devel@nongnu.org; Fri, 20 Feb 2015 06:09:35 -0500 Date: Fri, 20 Feb 2015 10:02:35 +0000 From: Stefan Hajnoczi Message-ID: <20150220100235.GC3867@stefanha-thinkpad.redhat.com> References: <1423865338-8576-1-git-send-email-jsnow@redhat.com> <1423865338-8576-16-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NKoe5XOeduwbEQHU" Content-Disposition: inline In-Reply-To: <1423865338-8576-16-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH v13 15/17] iotests: add simple incremental backup case List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: kwolf@redhat.com, famz@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, vsementsov@parallels.com, mreitz@redhat.com --NKoe5XOeduwbEQHU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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) --NKoe5XOeduwbEQHU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJU5wY7AAoJEJykq7OBq3PIwoQH/A9ULca/apZFfRD2Cj+r/DDC 1OkHS2IriQPszUyaYnmUOB99jOl1ENtHgoIe45i9yHCpGe9AiqSCf+3Q9ypyNTAS nhIfAxyVRLC8vyYItZVU9hAXOCoSFprKIpNDksjU3GR9v3/pvVfb/a2TF7pfV0J/ Ji7S5y6F1TRGz/nKpcy+0XhedsNyHDCIrO++2viCrnBX1nmAXpm+yyTtjmDzjGKn iG5P/OWwdY9klrO/nd1YwBSsmECyZ8FXYnkdfrepPFREtQxH13vfO0ZfFno96Y+h az4jrin5Lw4+rNNPNX/2LMfDz7WCxG/3WQJG1OkZ8A14jZFPG/Tz2zPrRvGDuYU= =4W/X -----END PGP SIGNATURE----- --NKoe5XOeduwbEQHU--