[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 09/10] iotests: Mark verify functions as private
From: |
John Snow |
Subject: |
[PATCH v7 09/10] iotests: Mark verify functions as private |
Date: |
Wed, 4 Mar 2020 16:38:17 -0500 |
Discourage their use.
(Also, make pending patches not yet using the new entry points fail in a
very obvious way.)
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: John Snow <address@hidden>
---
tests/qemu-iotests/iotests.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 1f88d2fa2a..23678f2daa 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -982,7 +982,7 @@ def case_notrun(reason):
open('%s/%s.casenotrun' % (output_dir, seq), 'a').write(
' [case not run] ' + reason + '\n')
-def verify_image_format(supported_fmts=(), unsupported_fmts=()):
+def _verify_image_format(supported_fmts=(), unsupported_fmts=()):
assert not (supported_fmts and unsupported_fmts)
if 'generic' in supported_fmts and \
@@ -996,7 +996,7 @@ def verify_image_format(supported_fmts=(),
unsupported_fmts=()):
if not_sup or (imgfmt in unsupported_fmts):
notrun('not suitable for this image format: %s' % imgfmt)
-def verify_protocol(supported=(), unsupported=()):
+def _verify_protocol(supported=(), unsupported=()):
assert not (supported and unsupported)
if 'generic' in supported:
@@ -1006,7 +1006,7 @@ def verify_protocol(supported=(), unsupported=()):
if not_sup or (imgproto in unsupported):
notrun('not suitable for this protocol: %s' % imgproto)
-def verify_platform(supported=(), unsupported=()):
+def _verify_platform(supported=(), unsupported=()):
if any((sys.platform.startswith(x) for x in unsupported)):
notrun('not suitable for this OS: %s' % sys.platform)
@@ -1014,11 +1014,11 @@ def verify_platform(supported=(), unsupported=()):
if not any((sys.platform.startswith(x) for x in supported)):
notrun('not suitable for this OS: %s' % sys.platform)
-def verify_cache_mode(supported_cache_modes=()):
+def _verify_cache_mode(supported_cache_modes=()):
if supported_cache_modes and (cachemode not in supported_cache_modes):
notrun('not suitable for this cache mode: %s' % cachemode)
-def verify_aio_mode(supported_aio_modes=()):
+def _verify_aio_mode(supported_aio_modes=()):
if supported_aio_modes and (aiomode not in supported_aio_modes):
notrun('not suitable for this aio mode: %s' % aiomode)
@@ -1145,11 +1145,11 @@ def execute_setup_common(supported_fmts:
Collection[str] = (),
sys.stderr.write('Please run this test via the "check" script\n')
sys.exit(os.EX_USAGE)
- verify_image_format(supported_fmts, unsupported_fmts)
- verify_protocol(supported_protocols, unsupported_protocols)
- verify_platform(supported=supported_platforms)
- verify_cache_mode(supported_cache_modes)
- verify_aio_mode(supported_aio_modes)
+ _verify_image_format(supported_fmts, unsupported_fmts)
+ _verify_protocol(supported_protocols, unsupported_protocols)
+ _verify_platform(supported=supported_platforms)
+ _verify_cache_mode(supported_cache_modes)
+ _verify_aio_mode(supported_aio_modes)
debug = '-d' in sys.argv
if debug:
--
2.21.1
- [PATCH v7 02/10] iotests: don't use 'format' for drive_add, (continued)
- [PATCH v7 02/10] iotests: don't use 'format' for drive_add, John Snow, 2020/03/04
- [PATCH v7 04/10] iotests: replace mutable list default args, John Snow, 2020/03/04
- [PATCH v7 01/10] iotests: do a light delinting, John Snow, 2020/03/04
- [PATCH v7 03/10] iotests: ignore import warnings from pylint, John Snow, 2020/03/04
- [PATCH v7 08/10] iotest 258: use script_main, John Snow, 2020/03/04
- [PATCH v7 05/10] iotests: add pylintrc file, John Snow, 2020/03/04
- [PATCH v7 07/10] iotests: add script_initialize, John Snow, 2020/03/04
- [PATCH v7 09/10] iotests: Mark verify functions as private,
John Snow <=
- [PATCH v7 10/10] iotests: use python logging for iotests.log(), John Snow, 2020/03/04
- [PATCH v7 06/10] iotests: limit line length to 79 chars, John Snow, 2020/03/04
- Re: [PATCH v7 06/10] iotests: limit line length to 79 chars, Philippe Mathieu-Daudé, 2020/03/04
- Re: [PATCH v7 06/10] iotests: limit line length to 79 chars, John Snow, 2020/03/04
- Re: [PATCH v7 06/10] iotests: limit line length to 79 chars, Kevin Wolf, 2020/03/05
- Re: [PATCH v7 06/10] iotests: limit line length to 79 chars, John Snow, 2020/03/05
- Re: [PATCH v7 06/10] iotests: limit line length to 79 chars, Kevin Wolf, 2020/03/06
- Re: [PATCH v7 06/10] iotests: limit line length to 79 chars, John Snow, 2020/03/06
- Re: [PATCH v7 06/10] iotests: limit line length to 79 chars, Markus Armbruster, 2020/03/07