Message ID | 20191011145047.19051-2-thuth@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Enable more iotests during "make check-block" | expand |
On 11.10.19 16:50, Thomas Huth wrote: > From: John Snow <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(-) Reviewed-by: Max Reitz <mreitz@redhat.com>
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 66090b70c1..d7b9a6f3ef 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: