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 <f...@redhat.com> --- 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