]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qemu-iotests: Add _unsupported_fmt helper
authorNir Soffer <nirsof@gmail.com>
Wed, 1 Feb 2017 00:31:19 +0000 (02:31 +0200)
committerMax Reitz <mreitz@redhat.com>
Sat, 11 Feb 2017 23:47:42 +0000 (00:47 +0100)
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>
tests/qemu-iotests/common.rc

index 4bb9b77807f2d119dc48c0e9b1aedae3e4444d09..a3d904fc22b0503a7728ac961334d366293e45e5 100644 (file)
@@ -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()