From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0fNY-0005Si-L9 for qemu-devel@nongnu.org; Thu, 04 Jun 2015 20:21:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0fNX-0007Ue-KV for qemu-devel@nongnu.org; Thu, 04 Jun 2015 20:20:56 -0400 From: John Snow Date: Thu, 4 Jun 2015 20:20:42 -0400 Message-Id: <1433463642-21840-10-git-send-email-jsnow@redhat.com> In-Reply-To: <1433463642-21840-1-git-send-email-jsnow@redhat.com> References: <1433463642-21840-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH 9/9] iotests: add differential backup test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, John Snow , jcody@redhat.com, qemu-devel@nongnu.org Signed-off-by: John Snow --- tests/qemu-iotests/124 | 14 ++++++++++---- tests/qemu-iotests/124.out | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index c446c81..17e4e6c 100644 --- a/tests/qemu-iotests/124 +++ b/tests/qemu-iotests/124 @@ -249,26 +249,28 @@ class TestIncrementalBackup(iotests.QMPTestCase): self.vm.hmp_qemu_io(drive, 'flush') - def do_incremental_simple(self, **kwargs): + def do_delta_simple(self, create_delta, **kwargs): self.create_anchor_backup() self.add_bitmap('bitmap0', self.drives[0], **kwargs) # Sanity: Create a "hollow" incremental backup - self.create_incremental() + create_delta() # Three writes: One complete overwrite, one new segment, # and one partial overlap. self.hmp_io_writes(self.drives[0]['id'], (('0xab', 0, 512), ('0xfe', '16M', '256k'), ('0x64', '32736k', '64k'))) - self.create_incremental() + create_delta() # Three more writes, one of each kind, like above self.hmp_io_writes(self.drives[0]['id'], (('0x9a', 0, 512), ('0x55', '8M', '352k'), ('0x78', '15872k', '1M'))) - self.create_incremental() + create_delta() self.vm.shutdown() self.check_backups() + def do_incremental_simple(self, **kwargs): + return self.do_delta_simple(self.create_incremental, **kwargs) def test_incremental_simple(self): ''' @@ -301,6 +303,10 @@ class TestIncrementalBackup(iotests.QMPTestCase): return self.do_incremental_simple(granularity=131072) + def test_differential_simple(self): + return self.do_delta_simple(self.create_differential) + + def test_incremental_transaction(self): '''Test: Verify backups made from transactionally created bitmaps. diff --git a/tests/qemu-iotests/124.out b/tests/qemu-iotests/124.out index dae404e..36376be 100644 --- a/tests/qemu-iotests/124.out +++ b/tests/qemu-iotests/124.out @@ -1,5 +1,5 @@ -......... +.......... ---------------------------------------------------------------------- -Ran 9 tests +Ran 10 tests OK -- 2.1.0