Skip to contentSkip to conversation

iotests: fix 197 for vpc

PATCH Applied John Snow 3 participants 3 messages Dec 5, 2017 – Dec 8, 2017

lore
Share & tools
lore

John Snow

author
#0 lore raw

PATCH v2 1/1 iotests: fix 197 for vpc

VPC has some difficulty creating geometries of particular size. However, we can indeed force it to use a literal one, so let's do that for the sake of test 197, which is testing some specific offsets.

---
 tests/qemu-iotests/197           | 4 ++++
 tests/qemu-iotests/common.filter | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)
tests/qemu-iotests/197 +4 -0
index 887eb4f496..5e869fe2b7 100755
@@ -60,6 +60,10 @@ echo '=== Copy-on-read ==='
 echo
 
 # Prep the images
+# VPC rounds image sizes to a specific geometry, force a specific size.
+if [ "$IMGFMT" = "vpc" ]; then
+    IMGOPTS=$(_optstr_add "$IMGOPTS" "force_size")
+fi
 _make_test_img 4G
 $QEMU_IO -c "write -P 55 3G 1k" "$TEST_IMG" | _filter_qemu_io
 IMGPROTO=file IMGFMT=qcow2 IMGOPTS= TEST_IMG_FILE="$TEST_WRAP" \
tests/qemu-iotests/common.filter +2 -1
index d9237799e9..f08248bfd9 100644
@@ -134,7 +134,8 @@ _filter_img_create()
         -e "s# log_size=[0-9]\\+##g" \
         -e "s# refcount_bits=[0-9]\\+##g" \
         -e "s# key-secret=[a-zA-Z0-9]\\+##g" \
-        -e "s# iter-time=[0-9]\\+##g"
+        -e "s# iter-time=[0-9]\\+##g" \
+        -e "s# force_size=\\(on\\|off\\)##g"
 }
 
 _filter_img_info()
Signature · 1 line
2.14.3
Reviewed-by on v2 1/1
#1 lore raw

Dne 5.12.2017 v 02:08 John Snow napsal(a):

Quoted 18 lines

VPC has some difficulty creating geometries of particular size. However, we can indeed force it to use a literal one, so let's do that for the sake of test 197, which is testing some specific offsets.

---
 tests/qemu-iotests/197           | 4 ++++
 tests/qemu-iotests/common.filter | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)
tests/qemu-iotests/197 +0 -0
index 887eb4f496..5e869fe2b7 100755

tests/qemu-iotests/197 echo '=== Copy-on-read ===' · line 66

Quoted 7 lines
tests/qemu-iotests/197 +4 -0
@@ -60,6 +60,10 @@ echo '=== Copy-on-read ==='
 echo
 
 # Prep the images
+# VPC rounds image sizes to a specific geometry, force a specific size.
+if [ "$IMGFMT" = "vpc" ]; then
+    IMGOPTS=$(_optstr_add "$IMGOPTS" "force_size")
+fi

Yep, the comment is helpful and it works well. (well "-nbd -vpc" fails, but that is another story)

Quoted 18 lines
tests/qemu-iotests/197 +0 -0
 _make_test_img 4G
 $QEMU_IO -c "write -P 55 3G 1k" "$TEST_IMG" | _filter_qemu_io
 IMGPROTO=file IMGFMT=qcow2 IMGOPTS= TEST_IMG_FILE="$TEST_WRAP" \
tests/qemu-iotests/common.filter +2 -1
index d9237799e9..f08248bfd9 100644
@@ -134,7 +134,8 @@ _filter_img_create()
         -e "s# log_size=[0-9]\\+##g" \
         -e "s# refcount_bits=[0-9]\\+##g" \
         -e "s# key-secret=[a-zA-Z0-9]\\+##g" \
-        -e "s# iter-time=[0-9]\\+##g"
+        -e "s# iter-time=[0-9]\\+##g" \
+        -e "s# force_size=\\(on\\|off\\)##g"
 }
 
 _filter_img_info()
Applied
#2 lore raw
In reply to John Snow

Am 05.12.2017 um 02:08 hat John Snow geschrieben:

Quoted 8 lines

VPC has some difficulty creating geometries of particular size. However, we can indeed force it to use a literal one, so let's do that for the sake of test 197, which is testing some specific offsets.

Thanks, applied to block-next.

Kevin