From patchwork Tue Dec 1 23:16:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 551077 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9288A1401DE for ; Wed, 2 Dec 2015 10:17:18 +1100 (AEDT) Received: from localhost ([::1]:55326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3uAe-0000HF-Hy for incoming@patchwork.ozlabs.org; Tue, 01 Dec 2015 18:17:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3uAD-0007rN-HL for qemu-devel@nongnu.org; Tue, 01 Dec 2015 18:16:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3uAC-0002L9-E2 for qemu-devel@nongnu.org; Tue, 01 Dec 2015 18:16:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3uA7-0002KE-V3; Tue, 01 Dec 2015 18:16:44 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 82685C0CC63F; Tue, 1 Dec 2015 23:16:43 +0000 (UTC) Received: from scv.usersys.redhat.com (unused [10.10.50.145] (may be forged)) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB1NGedA026213; Tue, 1 Dec 2015 18:16:42 -0500 From: John Snow To: qemu-block@nongnu.org Date: Tue, 1 Dec 2015 18:16:39 -0500 Message-Id: <1449011799-2790-4-git-send-email-jsnow@redhat.com> In-Reply-To: <1449011799-2790-1-git-send-email-jsnow@redhat.com> References: <1449011799-2790-1-git-send-email-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, John Snow , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH for-2.6 3/3] iotests: 124: don't reopen qcow2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Don't create two interfaces to the same drive in the recently moved failure test. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 2a0119d..7d33422 100644 --- a/tests/qemu-iotests/124 +++ b/tests/qemu-iotests/124 @@ -494,6 +494,12 @@ class TestIncrementalBackup(TestIncrementalBackupBase): class TestIncrementalBackupBlkdebug(TestIncrementalBackupBase): '''Incremental backup tests that utilize a BlkDebug filter on drive0.''' + def setUp(self): + drive0 = self.add_node('drive0') + self.img_create(drive0['file'], drive0['fmt']) + self.write_default_pattern(drive0['file']) + self.vm.launch() + def test_incremental_failure(self): '''Test: Verify backups made after a failure are correct. @@ -502,19 +508,15 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBackupBase): afterwards and verify that the backup created is correct. ''' - # Create a blkdebug interface to this img as 'drive1', - # but don't actually create a new image. - drive1 = self.add_node('drive1', self.drives[0]['fmt'], - path=self.drives[0]['file'], - backup=self.drives[0]['backup']) + drive0 = self.drives[0] result = self.vm.qmp('blockdev-add', options={ - 'id': drive1['id'], - 'driver': drive1['fmt'], + 'id': drive0['id'], + 'driver': drive0['fmt'], 'file': { 'driver': 'blkdebug', 'image': { 'driver': 'file', - 'filename': drive1['file'] + 'filename': drive0['file'] }, 'set-state': [{ 'event': 'flush_to_disk', @@ -532,18 +534,18 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBackupBase): }) self.assert_qmp(result, 'return', {}) - self.create_anchor_backup(self.drives[0]) - self.add_bitmap('bitmap0', drive1) + self.create_anchor_backup(drive0) + self.add_bitmap('bitmap0', drive0) # Note: at this point, during a normal execution, # Assume that the VM resumes and begins issuing IO requests here. - self.hmp_io_writes(drive1['id'], (('0xab', 0, 512), + self.hmp_io_writes(drive0['id'], (('0xab', 0, 512), ('0xfe', '16M', '256k'), ('0x64', '32736k', '64k'))) result = self.create_incremental(validate=False) self.assertFalse(result) - self.hmp_io_writes(drive1['id'], (('0x9a', 0, 512), + self.hmp_io_writes(drive0['id'], (('0x9a', 0, 512), ('0x55', '8M', '352k'), ('0x78', '15872k', '1M'))) self.create_incremental()