qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 39/42] iotests: Add filter commit test cases


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-devel] [PATCH v6 39/42] iotests: Add filter commit test cases
Date: Sat, 31 Aug 2019 12:35:58 +0000

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 <address@hidden>
> ---
>   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.



-- 
Best regards,
Vladimir

reply via email to

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