aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNir Soffer <nirsof@gmail.com>2017-02-01 02:31:19 +0200
committerMax Reitz <mreitz@redhat.com>2017-02-12 00:47:42 +0100
commitb4a2caa4bd5ad4e3cd6dd7eb1c0067d9205280cb (patch)
treeb58a0449a5184373e9558889c72d0b606b022e3f
parentb7aa1315198de1bd2c5f457d2e2c6cd007b3f430 (diff)
downloadqemu-b4a2caa4bd5ad4e3cd6dd7eb1c0067d9205280cb.zip
qemu-b4a2caa4bd5ad4e3cd6dd7eb1c0067d9205280cb.tar.gz
qemu-b4a2caa4bd5ad4e3cd6dd7eb1c0067d9205280cb.tar.bz2
qemu-iotests: Add _unsupported_fmt helper
This helper allows adding tests supporting any format expect the specified formats. This may be useful to test that many formats behave in a common way. Signed-off-by: Nir Soffer <nirsof@gmail.com> Message-id: 20170201003120.23378-3-nirsof@gmail.com Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
-rw-r--r--tests/qemu-iotests/common.rc11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 4bb9b77..a3d904f 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -355,6 +355,17 @@ _supported_fmt()
_notrun "not suitable for this image format: $IMGFMT"
}
+# tests whether $IMGFMT is one of the unsupported image format for a test
+#
+_unsupported_fmt()
+{
+ for f; do
+ if [ "$f" = "$IMGFMT" ]; then
+ _notrun "not suitable for this image format: $IMGFMT"
+ fi
+ done
+}
+
# tests whether $IMGPROTO is one of the supported image protocols for a test
#
_supported_proto()