qemu-stable
[Top][All Lists]
Advanced

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

[Qemu-stable] [PATCH v2 2/2] iotests: Add regression test for drive-back


From: Fam Zheng
Subject: [Qemu-stable] [PATCH v2 2/2] iotests: Add regression test for drive-backup cluster size error
Date: Thu, 19 May 2016 09:25:47 +0800

Signed-off-by: Fam Zheng <address@hidden>
---
 tests/qemu-iotests/055     | 13 +++++++++++++
 tests/qemu-iotests/055.out |  4 ++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055
index c8e3578..7f990c2 100755
--- a/tests/qemu-iotests/055
+++ b/tests/qemu-iotests/055
@@ -451,5 +451,18 @@ class TestSingleTransaction(iotests.QMPTestCase):
         self.assert_qmp(result, 'error/class', 'GenericError')
         self.assert_no_active_block_jobs()
 
+class TestNullToNull(iotests.QMPTestCase):
+
+    def test_backup(self):
+        """blockdev-backup from null-co:// to null-co:// shouldn't leak job"""
+        self.vm = iotests.VM().\
+                add_drive_raw("id=drive0,if=none,format=raw,file=null-co://"). 
\
+                add_drive_raw("id=drive1,if=none,format=raw,file=null-co://")
+        self.vm.launch()
+        result = self.vm.qmp('blockdev-backup', device='drive0',
+                             target='drive1', sync='full')
+        self.assert_qmp(result, 'error/class', 'GenericError')
+        self.vm.shutdown()
+
 if __name__ == '__main__':
     iotests.main(supported_fmts=['raw', 'qcow2'])
diff --git a/tests/qemu-iotests/055.out b/tests/qemu-iotests/055.out
index 42314e9..4fd1c2d 100644
--- a/tests/qemu-iotests/055.out
+++ b/tests/qemu-iotests/055.out
@@ -1,5 +1,5 @@
-........................
+.........................
 ----------------------------------------------------------------------
-Ran 24 tests
+Ran 25 tests
 
 OK
-- 
2.8.2




reply via email to

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