qemu-devel.nongnu.org archive mirror
 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: [Qemu-devel] [PATCH v5 1/5] iotests: remove 'linux' from default supported platforms
Date: Tue, 17 Sep 2019 19:45:45 -0400	[thread overview]
Message-ID: <20190917234549.22910-2-jsnow@redhat.com> (raw)
In-Reply-To: <20190917234549.22910-1-jsnow@redhat.com>

verify_platform will check an explicit whitelist and blacklist instead.
The default will now be assumed to be allowed to run anywhere.

For tests that do not specify their platforms explicitly, this has the effect of
enabling these tests on non-linux platforms. For tests that always specified
linux explicitly, there is no change.

For Python tests on FreeBSD at least; only seven python tests fail:
045 147 149 169 194 199 211

045 and 149 appear to be misconfigurations,
147 and 194 are the AF_UNIX path too long error,
169 and 199 are bitmap migration bugs, and
211 is a bug that shows up on Linux platforms, too.

This is at least good evidence that these tests are not Linux-only. If
they aren't suitable for other platforms, they should be disabled on a
per-platform basis as appropriate.

Therefore, let's switch these on and deal with the failures.

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

diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index b26271187c..3c8c121fd5 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -844,9 +844,14 @@ def verify_protocol(supported=[], unsupported=[]):
     if not_sup or (imgproto in unsupported):
         notrun('not suitable for this protocol: %s' % imgproto)
 
-def verify_platform(supported_oses=['linux']):
-    if True not in [sys.platform.startswith(x) for x in supported_oses]:
-        notrun('not suitable for this OS: %s' % sys.platform)
+def verify_platform(supported=None, unsupported=None):
+    if unsupported is not None:
+        if any((sys.platform.startswith(x) for x in unsupported)):
+            notrun('not suitable for this OS: %s' % sys.platform)
+
+    if supported is not None:
+        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=[]):
     if supported_cache_modes and (cachemode not in supported_cache_modes):
@@ -908,7 +913,8 @@ def execute_unittest(output, verbosity, debug):
                                     r'Ran \1 tests', output.getvalue()))
 
 def execute_test(test_function=None,
-                 supported_fmts=[], supported_oses=['linux'],
+                 supported_fmts=[],
+                 supported_platforms=None,
                  supported_cache_modes=[], unsupported_fmts=[],
                  supported_protocols=[], unsupported_protocols=[]):
     """Run either unittest or script-style tests."""
@@ -925,7 +931,7 @@ def execute_test(test_function=None,
     verbosity = 1
     verify_image_format(supported_fmts, unsupported_fmts)
     verify_protocol(supported_protocols, unsupported_protocols)
-    verify_platform(supported_oses)
+    verify_platform(supported=supported_platforms)
     verify_cache_mode(supported_cache_modes)
 
     if debug:
-- 
2.21.0



  reply	other threads:[~2019-09-17 23:48 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17 23:45 [Qemu-devel] [PATCH v5 0/5] iotests: use python logging John Snow
2019-09-17 23:45 ` John Snow [this message]
2019-09-18 13:16   ` [Qemu-devel] [PATCH v5 1/5] iotests: remove 'linux' from default supported platforms Vladimir Sementsov-Ogievskiy
2019-09-23 13:09   ` Max Reitz
2019-09-23 17:21     ` John Snow
2019-09-27 23:35     ` John Snow
2019-10-01 18:44       ` Max Reitz
2019-10-02  4:46         ` Thomas Huth
2019-10-02 11:57           ` Max Reitz
2019-10-02 13:11             ` Thomas Huth
2019-10-02 13:36               ` Max Reitz
2019-10-02 14:26                 ` Thomas Huth
2019-10-02 16:44             ` Kevin Wolf
2019-10-02 17:47               ` Max Reitz
2019-10-04 10:19                 ` Kevin Wolf
2019-10-04 12:44                   ` Max Reitz
2019-10-04 13:16                     ` Peter Maydell
2019-10-04 13:50                       ` Max Reitz
2019-10-04 14:05                         ` Peter Maydell
2019-10-04 14:40                           ` Max Reitz
2019-10-07 12:16                     ` Thomas Huth
2019-10-07 12:38                       ` Peter Maydell
2019-10-07 12:52                       ` Max Reitz
2019-10-07 13:11                         ` Thomas Huth
2019-10-07 16:28                           ` Thomas Huth
2019-10-07 16:55                             ` Max Reitz
2019-10-02 17:54               ` Thomas Huth
2019-10-03  0:16         ` John Snow
2019-09-17 23:45 ` [Qemu-devel] [PATCH v5 2/5] iotests: add script_initialize John Snow
2019-09-18 13:48   ` Vladimir Sementsov-Ogievskiy
2019-09-23 13:30   ` Max Reitz
2019-09-23 13:34     ` Max Reitz
2019-09-17 23:45 ` [Qemu-devel] [PATCH v5 3/5] iotest 258: use script_main John Snow
2019-09-23 13:33   ` Max Reitz
2019-09-17 23:45 ` [Qemu-devel] [PATCH v5 4/5] iotests: specify protocol support via initialization info John Snow
2019-09-23 13:35   ` Max Reitz
2019-09-17 23:45 ` [Qemu-devel] [PATCH v5 5/5] iotests: use python logging for iotests.log() John Snow
2019-09-18 14:52   ` Vladimir Sementsov-Ogievskiy
2019-09-18 17:11     ` John Snow
2019-09-23 13:57   ` Max Reitz
2019-10-04 15:39 ` [PATCH v5 0/5] iotests: use python logging Max Reitz
2019-10-11 23:39   ` John Snow
2020-02-24 11:15     ` Max Reitz
2020-02-25 21:50       ` John Snow

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=20190917234549.22910-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).