cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 40bbc03370fbd830e8010764318e01c3e6af631f Mon Sep 17 00:00:00 2001
Message-Id: <40bbc03370fbd830e8010764318e01c3e6af631f.1418766606.git.jen@redhat.com>
In-Reply-To: <6f81b4847eb68ebdf54a8f1a771e19d112d74152.1418766606.git.jen@redhat.com>
References: <6f81b4847eb68ebdf54a8f1a771e19d112d74152.1418766606.git.jen@redhat.com>
From: Fam Zheng <famz@redhat.com>
Date: Thu, 4 Dec 2014 00:04:58 -0600
Subject: [CHANGE 04/31] qemu-iotests: Introduce _unsupported_imgopts
To: rhvirt-patches@redhat.com,
    jen@redhat.com

RH-Author: Fam Zheng <famz@redhat.com>
Message-id: <1417651524-18041-5-git-send-email-famz@redhat.com>
Patchwork-id: 62677
O-Subject: [RHEL-7.1 qemu-kvm PATCH v5 04/30] qemu-iotests: Introduce _unsupported_imgopts
Bugzilla: 1002493
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Max Reitz <mreitz@redhat.com>

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>
(cherry picked from commit 2c77f52e39ff2ba071e3b549ad7a3ebea0758edd)
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Jeff E. Nelson <jen@redhat.com>
---
 tests/qemu-iotests/common.rc | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 65c5bc1..9c6e94b 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -404,6 +404,17 @@ _unsupported_qemu_io_options()
     done
 }
 
+_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()
-- 
2.1.0