[PATCH v6 4/9] iotest 258: use script_main

John Snow posted 9 patches 5 years, 8 months ago
Maintainers: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
There is a newer version of this series
[PATCH v6 4/9] iotest 258: use script_main
Posted by John Snow 5 years, 8 months ago
Since this one is nicely factored to use a single entry point,
use script_main to run the tests.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/qemu-iotests/258 | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/tests/qemu-iotests/258 b/tests/qemu-iotests/258
index a65151dda6..e305a1502f 100755
--- a/tests/qemu-iotests/258
+++ b/tests/qemu-iotests/258
@@ -23,12 +23,6 @@ import iotests
 from iotests import log, qemu_img, qemu_io_silent, \
         filter_qmp_testfiles, filter_qmp_imgfmt
 
-# Need backing file and change-backing-file support
-iotests.script_initialize(
-    supported_fmts=['qcow2', 'qed'],
-    supported_platforms=['linux'],
-)
-
 # Returns a node for blockdev-add
 def node(node_name, path, backing=None, fmt=None, throttle=None):
     if fmt is None:
@@ -161,4 +155,7 @@ def main():
     test_concurrent_finish(False)
 
 if __name__ == '__main__':
-    main()
+    # Need backing file and change-backing-file support
+    iotests.script_main(main,
+                        supported_fmts=['qcow2', 'qed'],
+                        supported_platforms=['linux'])
-- 
2.21.1


Re: [PATCH v6 4/9] iotest 258: use script_main
Posted by Max Reitz 5 years, 8 months ago
On 27.02.20 01:06, John Snow wrote:
> Since this one is nicely factored to use a single entry point,
> use script_main to run the tests.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  tests/qemu-iotests/258 | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>

Re: [PATCH v6 4/9] iotest 258: use script_main
Posted by Philippe Mathieu-Daudé 5 years, 8 months ago
On 2/27/20 1:06 AM, John Snow wrote:
> Since this one is nicely factored to use a single entry point,
> use script_main to run the tests.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   tests/qemu-iotests/258 | 11 ++++-------
>   1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/qemu-iotests/258 b/tests/qemu-iotests/258
> index a65151dda6..e305a1502f 100755
> --- a/tests/qemu-iotests/258
> +++ b/tests/qemu-iotests/258
> @@ -23,12 +23,6 @@ import iotests
>   from iotests import log, qemu_img, qemu_io_silent, \
>           filter_qmp_testfiles, filter_qmp_imgfmt
>   
> -# Need backing file and change-backing-file support
> -iotests.script_initialize(
> -    supported_fmts=['qcow2', 'qed'],
> -    supported_platforms=['linux'],
> -)
> -
>   # Returns a node for blockdev-add
>   def node(node_name, path, backing=None, fmt=None, throttle=None):
>       if fmt is None:
> @@ -161,4 +155,7 @@ def main():
>       test_concurrent_finish(False)
>   
>   if __name__ == '__main__':
> -    main()
> +    # Need backing file and change-backing-file support
> +    iotests.script_main(main,
> +                        supported_fmts=['qcow2', 'qed'],
> +                        supported_platforms=['linux'])
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>