qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 3/3] qemu-iotests: Test 0-length image for mirror


From: Fam Zheng
Subject: [Qemu-devel] [PATCH 3/3] qemu-iotests: Test 0-length image for mirror
Date: Thu, 5 Jun 2014 11:42:36 +0800

All behavior and invariant should hold for images with 0 length, so
add a class to repeat all the tests in TestSingleDrive.

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

diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index ec470b2..ae876ad 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -206,6 +206,11 @@ class TestSingleDrive(ImageMirroringTestCase):
                              target=target_img)
         self.assert_qmp(result, 'error/class', 'DeviceNotFound')
 
+class TestSingleDriveZeroLength(TestSingleDrive):
+    def setUp(self):
+        TestSingleDrive.image_len = 0
+        return TestSingleDrive.setUp(self)
+
 class TestMirrorNoBacking(ImageMirroringTestCase):
     image_len = 2 * 1024 * 1024 # MB
 
diff --git a/tests/qemu-iotests/041.out b/tests/qemu-iotests/041.out
index 6d9bee1..cafb816 100644
--- a/tests/qemu-iotests/041.out
+++ b/tests/qemu-iotests/041.out
@@ -1,5 +1,5 @@
-...........................
+.....................................
 ----------------------------------------------------------------------
-Ran 27 tests
+Ran 37 tests
 
 OK
-- 
2.0.0




reply via email to

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