OSDN Git Service

qemu-iotests: Introduce _unsupported_imgopts
authorFam Zheng <famz@redhat.com>
Tue, 26 Nov 2013 06:40:32 +0000 (14:40 +0800)
committerKevin Wolf <kwolf@redhat.com>
Wed, 22 Jan 2014 11:07:16 +0000 (12:07 +0100)
Introduce _unsupported_imgopts that causes _notrun for specific image
options.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/common.rc

index 28ba0d9..2489c43 100644 (file)
@@ -406,6 +406,17 @@ _default_cache_mode()
     fi
 }
 
+_unsupported_imgopts()
+{
+    for bad_opt
+    do
+        if echo "$IMGOPTS" | grep -q 2>/dev/null "$bad_opt"
+        then
+            _notrun "not suitable for image option: $bad_opt"
+        fi
+    done
+}
+
 # this test requires that a specified command (executable) exists
 #
 _require_command()