[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/21] iotests: Prepare for refcount_width option
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH 11/21] iotests: Prepare for refcount_width option |
Date: |
Mon, 10 Nov 2014 14:45:49 +0100 |
Some tests do not work well with certain refcount widths (i.e. you
cannot create internal snapshots with refcount_width=1), so make those
widths unsupported.
Furthermore, add another filter to _filter_img_create in common.filter
which filters out the refcount_width value.
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/007 | 4 ++++
tests/qemu-iotests/015 | 1 +
tests/qemu-iotests/026 | 11 +++++++++++
tests/qemu-iotests/029 | 1 +
tests/qemu-iotests/051 | 1 +
tests/qemu-iotests/058 | 1 +
tests/qemu-iotests/067 | 7 +++++++
tests/qemu-iotests/079 | 1 +
tests/qemu-iotests/080 | 1 +
tests/qemu-iotests/089 | 7 +++++++
tests/qemu-iotests/090 | 1 +
tests/qemu-iotests/108 | 6 ++++++
tests/qemu-iotests/common.filter | 3 ++-
13 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/007 b/tests/qemu-iotests/007
index fe1a743..de39d1b 100755
--- a/tests/qemu-iotests/007
+++ b/tests/qemu-iotests/007
@@ -43,6 +43,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto generic
_supported_os Linux
+# refcount_width must be at least 4 bits so we can create ten internal
snapshots
+# (1 bit supports none, 2 bits support three, 4 bits support 15)
+_unsupported_imgopts 'refcount_width=1[^0-9]' \
+ 'refcount_width=2[^0-9]'
echo
echo "creating image"
diff --git a/tests/qemu-iotests/015 b/tests/qemu-iotests/015
index 099d757..65a1a11 100755
--- a/tests/qemu-iotests/015
+++ b/tests/qemu-iotests/015
@@ -43,6 +43,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto generic
_supported_os Linux
+_unsupported_imgopts 'refcount_width=1[^0-9]'
echo
echo "creating image"
diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026
index df2884b..8526f1a 100755
--- a/tests/qemu-iotests/026
+++ b/tests/qemu-iotests/026
@@ -46,6 +46,17 @@ _supported_proto file
_supported_os Linux
_default_cache_mode "writethrough"
_supported_cache_modes "writethrough" "none"
+# The refcount table tests expect a certain minimum width for refcount entries
+# (so that the refcount table actually needs to grow); that minimum is 16 bits,
+# being the default refcount entry width.
+# 32 and 64 bits do not work either, however, due to different leaked cluster
+# count on error.
+_unsupported_imgopts 'refcount_width=1[^0-9]' \
+ 'refcount_width=2[^0-9]' \
+ 'refcount_width=4[^0-9]' \
+ 'refcount_width=8[^0-9]' \
+ 'refcount_width=32[^0-9]' \
+ 'refcount_width=64[^0-9]' \
echo "Errors while writing 128 kB"
echo
diff --git a/tests/qemu-iotests/029 b/tests/qemu-iotests/029
index fa46ace..aa416a6 100755
--- a/tests/qemu-iotests/029
+++ b/tests/qemu-iotests/029
@@ -44,6 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto generic
_supported_os Linux
+_unsupported_imgopts 'refcount_width=1[^0-9]'
offset_size=24
offset_l1_size=36
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 11c858f..1ddafb0 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto file
_supported_os Linux
+_unsupported_imgopts refcount_width
function do_run_qemu()
{
diff --git a/tests/qemu-iotests/058 b/tests/qemu-iotests/058
index 14584cd..4fc0793 100755
--- a/tests/qemu-iotests/058
+++ b/tests/qemu-iotests/058
@@ -88,6 +88,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto file
_require_command QEMU_NBD
+_unsupported_imgopts 'refcount_width=1[^0-9]'
echo
echo "== preparing image =="
diff --git a/tests/qemu-iotests/067 b/tests/qemu-iotests/067
index d025192..98d30b5 100755
--- a/tests/qemu-iotests/067
+++ b/tests/qemu-iotests/067
@@ -35,6 +35,13 @@ status=1 # failure is the default!
_supported_fmt qcow2
_supported_proto file
_supported_os Linux
+# Because this would change the output of query-block
+_unsupported_imgopts 'refcount_width=1[^0-9]' \
+ 'refcount_width=2[^0-9]' \
+ 'refcount_width=4[^0-9]' \
+ 'refcount_width=8[^0-9]' \
+ 'refcount_width=32[^0-9]' \
+ 'refcount_width=64[^0-9]'
function do_run_qemu()
{
diff --git a/tests/qemu-iotests/079 b/tests/qemu-iotests/079
index 6613cfb..23bf4d8 100755
--- a/tests/qemu-iotests/079
+++ b/tests/qemu-iotests/079
@@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto file nfs
_supported_os Linux
+_unsupported_imgopts refcount_width
function test_qemu_img()
{
diff --git a/tests/qemu-iotests/080 b/tests/qemu-iotests/080
index 9de337c..28b8715 100755
--- a/tests/qemu-iotests/080
+++ b/tests/qemu-iotests/080
@@ -42,6 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto file
_supported_os Linux
+_unsupported_imgopts 'refcount_width=1[^0-9]'
header_size=104
diff --git a/tests/qemu-iotests/089 b/tests/qemu-iotests/089
index dffc977..dba64f4 100755
--- a/tests/qemu-iotests/089
+++ b/tests/qemu-iotests/089
@@ -41,6 +41,13 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto file
_supported_os Linux
+# Because this would change the output of qemu_io -c info
+_unsupported_imgopts 'refcount_width=1[^0-9]' \
+ 'refcount_width=2[^0-9]' \
+ 'refcount_width=4[^0-9]' \
+ 'refcount_width=8[^0-9]' \
+ 'refcount_width=32[^0-9]' \
+ 'refcount_width=64[^0-9]'
# Using an image filename containing quotation marks will render the JSON data
# below invalid. In that case, we have little choice but simply not to run this
diff --git a/tests/qemu-iotests/090 b/tests/qemu-iotests/090
index 70b5a6f..359b631 100755
--- a/tests/qemu-iotests/090
+++ b/tests/qemu-iotests/090
@@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto file nfs
_supported_os Linux
+_unsupported_imgopts 'refcount_width=1[^0-9]'
IMG_SIZE=128K
diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108
index 12fc92a..2269930 100755
--- a/tests/qemu-iotests/108
+++ b/tests/qemu-iotests/108
@@ -43,6 +43,12 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt qcow2
_supported_proto file
_supported_os Linux
+_unsupported_imgopts 'refcount_width=1[^0-9]' \
+ 'refcount_width=2[^0-9]' \
+ 'refcount_width=4[^0-9]' \
+ 'refcount_width=8[^0-9]' \
+ 'refcount_width=32[^0-9]' \
+ 'refcount_width=64[^0-9]'
echo
echo '=== Repairing an image without any refcount table ==='
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 3acdb30..1641f85 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -189,7 +189,8 @@ _filter_img_create()
-e "s# block_size=[0-9]\\+##g" \
-e "s# block_state_zero=\\(on\\|off\\)##g" \
-e "s# log_size=[0-9]\\+##g" \
- -e "s/archipelago:a/TEST_DIR\//g"
+ -e "s/archipelago:a/TEST_DIR\//g" \
+ -e "s# refcount_width=[0-9]\\+##g"
}
_filter_img_info()
--
1.9.3