Skip to contentSkip to conversation

qemu-iotest tweaks

PATCH Applied Jeff Cody 2 participants 4 messages Feb 14, 2017

lore
Share & tools
lore

Jeff Cody

author
#0 lore raw

cover qemu-iotest tweaks

Some minor qemu-iotest tweaks.

The second patch makes it easier to add some upcoming protocols such as VXHS, that do not support .bdrv_create.

Jeff Cody (2):
qemu-iotests: Test 137 only supports 'file' protocol
qemu-iotests: add ability to exclude certain protocols from tests

 tests/qemu-iotests/137       |  2 +-
 tests/qemu-iotests/common.rc | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
Signature · 1 line
2.9.3
author
#1 lore raw

PATCH 1/2 qemu-iotests: Test 137 only supports 'file' protocol

Since test 137 make uses of qcow2.py, only local files are supported.

---
 tests/qemu-iotests/137 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/137 +1 -1
index e5e30de..eb91e51 100755
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.qemu
 
 _supported_fmt qcow2
-_supported_proto generic
+_supported_proto file
 _supported_os Linux
 
 
Signature · 1 line
2.9.3
author
#2 lore raw

PATCH 2/2 qemu-iotests: add ability to exclude certain protocols from tests

In reply to Jeff Cody

Add the ability for shell script tests to exclude specific protocols. This is useful to allow all protocols except ones known to not support a feature used in the test (e.g. .bdrv_create).

---
 tests/qemu-iotests/common.rc | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tests/qemu-iotests/common.rc +12 -0
index a3d904f..6c0fd4c 100644
@@ -379,6 +379,18 @@ _supported_proto()
     _notrun "not suitable for this image protocol: $IMGPROTO"
 }
 
+# tests whether $IMGPROTO is specified as an unsupported image protocol for a test
+#
+_unsupported_proto()
+{
+    for f; do
+        if [ "$f" = "$IMGPROTO" ]; then
+            _notrun "not suitable for this image protocol: $IMGPROTO"
+            return
+        fi
+    done
+}
+
 # tests whether the host OS is one of the supported OSes for a test
 #
 _supported_os()
Signature · 1 line
2.9.3
Applied
#3 lore raw
In reply to Jeff Cody

Am 14.02.2017 um 17:21 hat Jeff Cody geschrieben:

Quoted 4 lines

Some minor qemu-iotest tweaks.

The second patch makes it easier to add some upcoming protocols such as VXHS, that do not support .bdrv_create.

Thanks, applied to the block branch.

Kevin