cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
0a122b
From 5be29b09f5d571260cb48bc4a24f32265662fed1 Mon Sep 17 00:00:00 2001
0a122b
From: Stefan Hajnoczi <stefanha@redhat.com>
0a122b
Date: Tue, 25 Mar 2014 14:23:09 +0100
0a122b
Subject: [PATCH 02/49] qemu-iotests: add ./check -cloop support
0a122b
0a122b
RH-Author: Kevin Wolf <kwolf@redhat.com>
0a122b
Message-id: <1395753835-7591-3-git-send-email-kwolf@redhat.com>
0a122b
Patchwork-id: n/a
0a122b
O-Subject: [virt-devel] [EMBARGOED RHEL-7.0 qemu-kvm PATCH 02/48] qemu-iotests: add ./check -cloop support
0a122b
Bugzilla: 1066691
0a122b
RH-Acked-by: Jeff Cody <jcody@redhat.com>
0a122b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
0a122b
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
0a122b
0a122b
From: Stefan Hajnoczi <stefanha@redhat.com>
0a122b
0a122b
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1066691
0a122b
Upstream status: Series embargoed
0a122b
0a122b
Add the cloop block driver to qemu-iotests.
0a122b
0a122b
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
0a122b
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
0a122b
---
0a122b
 tests/qemu-iotests/common    |    7 +++++++
0a122b
 tests/qemu-iotests/common.rc |    3 +++
0a122b
 2 files changed, 10 insertions(+), 0 deletions(-)
0a122b
0a122b
diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common
0a122b
index 8cde7f1..b5043fc 100644
0a122b
--- a/tests/qemu-iotests/common
0a122b
+++ b/tests/qemu-iotests/common
0a122b
@@ -129,6 +129,7 @@ common options
0a122b
 check options
0a122b
     -raw                test raw (default)
0a122b
     -cow                test cow
0a122b
+    -cloop              test cloop
0a122b
     -qcow               test qcow
0a122b
     -qcow2              test qcow2
0a122b
     -qed                test qed
0a122b
@@ -167,6 +168,12 @@ testlist options
0a122b
             xpand=false
0a122b
             ;;
0a122b
 
0a122b
+        -cloop)
0a122b
+            IMGFMT=cloop
0a122b
+            IMGFMT_GENERIC=false
0a122b
+            xpand=false
0a122b
+            ;;
0a122b
+
0a122b
         -qcow)
0a122b
             IMGFMT=qcow
0a122b
             xpand=false
0a122b
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
0a122b
index 7f62457..65c5bc1 100644
0a122b
--- a/tests/qemu-iotests/common.rc
0a122b
+++ b/tests/qemu-iotests/common.rc
0a122b
@@ -350,6 +350,9 @@ _fail()
0a122b
 #
0a122b
 _supported_fmt()
0a122b
 {
0a122b
+    # "generic" is suitable for most image formats. For some formats it doesn't
0a122b
+    # work, however (most notably read-only formats), so they can opt out by
0a122b
+    # setting IMGFMT_GENERIC to false.
0a122b
     for f; do
0a122b
         if [ "$f" = "$IMGFMT" -o "$f" = "generic" -a "$IMGFMT_GENERIC" = "true" ]; then
0a122b
             return
0a122b
-- 
0a122b
1.7.1
0a122b