qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH 9/9] iotests: add differential backup test


From: John Snow
Subject: [Qemu-block] [PATCH 9/9] iotests: add differential backup test
Date: Thu, 4 Jun 2015 20:20:42 -0400

Signed-off-by: John Snow <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]