All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, John Snow <jsnow@redhat.com>,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: [PATCH v6 5/9] iotests: Mark verify functions as private
Date: Wed, 26 Feb 2020 19:06:35 -0500	[thread overview]
Message-ID: <20200227000639.9644-6-jsnow@redhat.com> (raw)
In-Reply-To: <20200227000639.9644-1-jsnow@redhat.com>

Discourage their use.

(Also, make pending patches not yet using the new entry points fail in a
very obvious way.)

Signed-off-by: John Snow <jsnow@redhat.com>
---
 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 9eb96561b6..b02d7932fa 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -968,7 +968,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 \
@@ -982,7 +982,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:
@@ -992,7 +992,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)
 
@@ -1000,11 +1000,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)
 
@@ -1126,11 +1126,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



  parent reply	other threads:[~2020-02-27  0:07 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27  0:06 [PATCH v6 0/9] iotests: use python logging John Snow
2020-02-27  0:06 ` [PATCH v6 1/9] iotests: do a light delinting John Snow
2020-02-27 12:59   ` Max Reitz
2020-03-03 21:25     ` John Snow
2020-03-04 11:12       ` Kevin Wolf
2020-03-04 18:35         ` John Snow
2020-02-27  0:06 ` [PATCH v6 2/9] iotests: add script_initialize John Snow
2020-02-27 13:47   ` Max Reitz
2020-03-03 21:12     ` John Snow
2020-02-27  0:06 ` [PATCH v6 3/9] iotests: replace mutable list default args John Snow
2020-02-27 13:50   ` Max Reitz
2020-02-27  0:06 ` [PATCH v6 4/9] iotest 258: use script_main John Snow
2020-02-27 13:55   ` Max Reitz
2020-02-27 14:10   ` Philippe Mathieu-Daudé
2020-02-27  0:06 ` John Snow [this message]
2020-02-27 13:59   ` [PATCH v6 5/9] iotests: Mark verify functions as private Max Reitz
2020-02-27  0:06 ` [PATCH v6 6/9] iotests: use python logging for iotests.log() John Snow
2020-02-27 14:21   ` Max Reitz
2020-03-03 20:00     ` John Snow
2020-02-27  0:06 ` [PATCH v6 7/9] iotests: ignore import warnings from pylint John Snow
2020-02-27 14:14   ` Philippe Mathieu-Daudé
2020-03-03 19:57     ` John Snow
2020-03-04  0:02       ` Philippe Mathieu-Daudé
2020-03-04 18:59         ` John Snow
2020-02-27  0:06 ` [PATCH v6 8/9] iotests: don't use 'format' for drive_add John Snow
2020-02-27 14:12   ` Philippe Mathieu-Daudé
2020-02-27 14:26   ` Max Reitz
2020-02-27  0:06 ` [PATCH v6 9/9] iotests: add pylintrc file John Snow
2020-02-27  1:57   ` Eric Blake
2020-02-27 14:11   ` Philippe Mathieu-Daudé
2020-03-03 19:52     ` John Snow
2020-03-04  7:22   ` Markus Armbruster
2020-03-04 19:17     ` John Snow
2020-03-05  5:49       ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200227000639.9644-6-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.