diff mbox series

[v3,5/8] iotests: Let verify_platform() check for unsupported platforms

Message ID 20190205001835.25660-6-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series OpenBSD: Block layer fixes (was 'Enable qtesting') | expand

Commit Message

Philippe Mathieu-Daudé Feb. 5, 2019, 12:18 a.m. UTC
Instead of checking for a supported platforms, it might be useful
to test for the opposite.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/qemu-iotests/iotests.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index b461f53abf..2ed34da9f5 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -712,9 +712,11 @@  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']):
+def verify_platform(supported_oses=['linux'], unsupported_oses=[]):
     if True not in [sys.platform.startswith(x) for x in supported_oses]:
         notrun('not suitable for this OS: %s' % sys.platform)
+    if True in [sys.platform.startswith(x) for x in unsupported_oses]:
+        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):