qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-4.1 2/2] iotests/118: Test inserting a read-


From: John Snow
Subject: Re: [Qemu-devel] [PATCH for-4.1 2/2] iotests/118: Test inserting a read-only medium
Date: Tue, 30 Jul 2019 11:25:52 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0


On 7/30/19 10:57 AM, Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  tests/qemu-iotests/118     | 6 +++++-
>  tests/qemu-iotests/118.out | 4 ++--
>  2 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118
> index 603e10e8a2..499c5f0901 100755
> --- a/tests/qemu-iotests/118
> +++ b/tests/qemu-iotests/118
> @@ -207,10 +207,11 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
>              self.assert_qmp(result, 'return[0]/tray_open', False)
>          self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
>  
> -    def test_cycle(self):
> +    def test_cycle(self, read_only_node=False):
>          result = self.vm.qmp('blockdev-add',
>                               node_name='new',
>                               driver=iotests.imgfmt,
> +                             read_only=read_only_node,
>                               file={'filename': new_img,
>                                      'driver': 'file'})
>          self.assert_qmp(result, 'return', {})
> @@ -257,6 +258,9 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
>              self.assert_qmp(result, 'return[0]/tray_open', False)
>          self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
>  
> +    def test_cycle_read_only_media(self):
> +        self.test_cycle(True)
> +
>      def test_close_on_closed(self):
>          result = self.vm.qmp('blockdev-close-tray', id=self.device_name)
>          # Should be a no-op
> diff --git a/tests/qemu-iotests/118.out b/tests/qemu-iotests/118.out
> index 6a917130b6..4823c113d5 100644
> --- a/tests/qemu-iotests/118.out
> +++ b/tests/qemu-iotests/118.out
> @@ -1,5 +1,5 @@
> -...........................................................
> +...............................................................
>  ----------------------------------------------------------------------
> -Ran 59 tests
> +Ran 63 tests
>  
>  OK
> 

Reviewed-by: John Snow <address@hidden>



reply via email to

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