On 31.08.19 14:35, Vladimir Sementsov-Ogievskiy wrote:
> 09.08.2019 19:14, Max Reitz wrote:
>> This patch adds some tests on how commit copes with filter nodes.
>>
>> Signed-off-by: Max Reitz <mre...@redhat.com>
>> ---
>>   tests/qemu-iotests/040     | 177 +++++++++++++++++++++++++++++++++++++
>>   tests/qemu-iotests/040.out |   4 +-
>>   2 files changed, 179 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040
>> index 6db9abf8e6..a0a0db8889 100755
>> --- a/tests/qemu-iotests/040
>> +++ b/tests/qemu-iotests/040
>> @@ -428,5 +428,182 @@ class TestReopenOverlay(ImageCommitTestCase):
>>       def test_reopen_overlay(self):
>>           self.run_commit_test(self.img1, self.img0)
>>   
>> +class TestCommitWithFilters(iotests.QMPTestCase):
>> +    img0 = os.path.join(iotests.test_dir, '0.img')
>> +    img1 = os.path.join(iotests.test_dir, '1.img')
>> +    img2 = os.path.join(iotests.test_dir, '2.img')
>> +    img3 = os.path.join(iotests.test_dir, '3.img')
>> +
>> +    def setUp(self):
>> +        qemu_img('create', '-f', iotests.imgfmt, self.img0, '64M')
>> +        qemu_img('create', '-f', iotests.imgfmt, self.img1, '64M')
>> +        qemu_img('create', '-f', iotests.imgfmt, self.img2, '64M')
>> +        qemu_img('create', '-f', iotests.imgfmt, self.img3, '64M')
>> +
>> +        qemu_io('-f', iotests.imgfmt, '-c', 'write -P 1 0M 1M', self.img0)
>> +        qemu_io('-f', iotests.imgfmt, '-c', 'write -P 2 1M 1M', self.img1)
>> +        qemu_io('-f', iotests.imgfmt, '-c', 'write -P 3 2M 1M', self.img2)
>> +        qemu_io('-f', iotests.imgfmt, '-c', 'write -P 4 3M 1M', self.img3)
>> +
>> +        # Distributions of the patterns in the files; this is checked
>> +        # by tearDown() and should be changed by the test cases as is
>> +        # necessary
>> +        self.pattern_files = [self.img0, self.img1, self.img2, self.img3]
>> +
>> +        self.vm = iotests.VM()
>> +        self.vm.launch()
>> +        self.has_quit = False
> 
> has_quit is unused actually. It's always False.

True. (:-))  I wonder why I added it.

Max

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to