iotests compat=0.10 fixes
cover iotests compat=0.10 fixes
As requested here:
https://lists.gnu.org/archive/html/qemu-devel/2018-01/msg03984.html
Eric Blake (1):
iotests: Split 177 into two parts for compat=0.10
Max Reitz (1):
iotests: Disable some tests for compat=0.10
tests/qemu-iotests/080 | 5 +- tests/qemu-iotests/130 | 2 + tests/qemu-iotests/137 | 2 + tests/qemu-iotests/176 | 2 + tests/qemu-iotests/177 | 20 +++----- tests/qemu-iotests/177.out | 22 ++------- tests/qemu-iotests/204 | 119 +++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/204.out | 63 ++++++++++++++++++++++++ tests/qemu-iotests/group | 1 + 9 files changed, 202 insertions(+), 34 deletions(-) create mode 100755 tests/qemu-iotests/204 create mode 100644 tests/qemu-iotests/204.out
Signature · 1 line
2.14.3
PATCH 1/2 iotests: Split 177 into two parts for compat=0.10
When originally written, test 177 explicitly took care to run with compat=0.10. Then I botched my own test in commit 81c219ac and f0a9c18f, by adding additional actions that require v3 images. Split out the new code into a new v3-only test, 204, and revert 177 back to its original state other than a new comment.
--- tests/qemu-iotests/177 | 20 +++----- tests/qemu-iotests/177.out | 22 ++------- tests/qemu-iotests/204 | 119 +++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/204.out | 63 ++++++++++++++++++++++++ tests/qemu-iotests/group | 1 + 5 files changed, 193 insertions(+), 32 deletions(-) create mode 100755 tests/qemu-iotests/204 create mode 100644 tests/qemu-iotests/204.out
tests/qemu-iotests/177 +6 -14
@@ -2,7 +2,7 @@ # # Test corner cases with unusual block geometries # -# Copyright (C) 2016-2017 Red Hat, Inc. +# Copyright (C) 2016-2018 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by
@@ -37,13 +37,15 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.rc . ./common.filter +# This test is runnable under compat=0.10; see test 204 for additional +# tests specific to compat=1.1. + _supported_fmt qcow2 _supported_proto file CLUSTER_SIZE=1M size=128M options=driver=blkdebug,image.driver=qcow2 -nested_opts=image.file.driver=file,image.file.filename=$TEST_IMG echo echo "== setting up files =="
@@ -51,7 +53,7 @@ echo "== setting up files ==" TEST_IMG="$TEST_IMG.base" _make_test_img $size $QEMU_IO -c "write -P 11 0 $size" "$TEST_IMG.base" | _filter_qemu_io _make_test_img -b "$TEST_IMG.base" -$QEMU_IO -c "write -P 22 0 110M" "$TEST_IMG" | _filter_qemu_io +$QEMU_IO -c "write -P 22 0 $size" "$TEST_IMG" | _filter_qemu_io # Limited to 64k max-transfer echo
@@ -81,13 +83,6 @@ limits=align=512,opt-write-zero=15M,max-write-zero=15M,opt-discard=15M,max-disca $QEMU_IO -c "open -o $options,$limits blkdebug::$TEST_IMG" \ -c "discard 80000001 30M" | _filter_qemu_io -echo -echo "== block status smaller than alignment ==" -limits=align=4k -$QEMU_IO -c "open -o $options,$limits blkdebug::$TEST_IMG" \ - -c "alloc 1 1" -c "alloc 0x6dffff0 1000" -c "alloc 127m 5P" \ - -c map | _filter_qemu_io - echo echo "== verify image content =="
@@ -110,13 +105,10 @@ function verify_io() echo read -P 0 32M 32M echo read -P 22 64M 13M echo read -P $discarded 77M 29M - echo read -P 22 106M 4M - echo read -P 11 110M 18M + echo read -P 22 106M 22M } verify_io | $QEMU_IO -r "$TEST_IMG" | _filter_qemu_io -$QEMU_IMG map --image-opts "$options,$nested_opts,align=4k" \ - | _filter_qemu_img_map _check_test_img
tests/qemu-iotests/177.out +4 -18
@@ -5,8 +5,8 @@ Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728 wrote 134217728/134217728 bytes at offset 0 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/t.IMGFMT.base -wrote 115343360/115343360 bytes at offset 0 -110 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 134217728/134217728 bytes at offset 0 +128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) == constrained alignment and max-transfer == wrote 131072/131072 bytes at offset 1000
@@ -26,13 +26,6 @@ wrote 33554432/33554432 bytes at offset 33554432 discard 31457280/31457280 bytes at offset 80000001 30 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -== block status smaller than alignment == -1/1 bytes allocated at offset 1 bytes -16/1000 bytes allocated at offset 110 MiB -0/1048576 bytes allocated at offset 127 MiB -110 MiB (0x6e00000) bytes allocated at offset 0 bytes (0x0) -18 MiB (0x1200000) bytes not allocated at offset 110 MiB (0x6e00000) - == verify image content == read 1000/1000 bytes at offset 0 1000 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -50,14 +43,7 @@ read 13631488/13631488 bytes at offset 67108864 13 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) read 30408704/30408704 bytes at offset 80740352 29 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -read 4194304/4194304 bytes at offset 111149056 -4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -read 18874368/18874368 bytes at offset 115343360 -18 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -Offset Length File -0 0x800000 TEST_DIR/t.IMGFMT -0x900000 0x2400000 TEST_DIR/t.IMGFMT -0x3c00000 0x1100000 TEST_DIR/t.IMGFMT -0x6a00000 0x400000 TEST_DIR/t.IMGFMT +read 23068672/23068672 bytes at offset 111149056 +22 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) No errors were found on the image. *** done
tests/qemu-iotests/204 new file +119 -0
119 lines not on this page · raw message
tests/qemu-iotests/204.out new file +63 -0
63 lines not on this page · raw message
tests/qemu-iotests/group +1 -0
@@ -200,3 +200,4 @@ 201 rw auto migration 202 rw auto quick 203 rw auto +204 rw auto quick
Signature · 1 line
2.14.3
PATCH 2/2 iotests: Disable some tests for compat=0.10
In reply to Eric BlakeFrom: Max Reitz <[email protected]>
Tests 080, 130, 137, and 176 simply do not work with compat=0.10 for the reasons stated there.
Message-Id: <[email protected]>
--- tests/qemu-iotests/080 | 5 +++-- tests/qemu-iotests/130 | 2 ++ tests/qemu-iotests/137 | 2 ++ tests/qemu-iotests/176 | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-)
tests/qemu-iotests/080 +3 -2
@@ -41,8 +41,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file _supported_os Linux -# Internal snapshots are (currently) impossible with refcount_bits=1 -_unsupported_imgopts 'refcount_bits=1[^0-9]' +# - Internal snapshots are (currently) impossible with refcount_bits=1 +# - This is generally a test for compat=1.1 images +_unsupported_imgopts 'refcount_bits=1[^0-9]' 'compat=0.10' header_size=104
tests/qemu-iotests/130 +2 -0
@@ -45,6 +45,8 @@ _supported_fmt qcow2 _supported_proto generic _unsupported_proto vxhs _supported_os Linux +# We are going to use lazy-refcounts +_unsupported_imgopts 'compat=0.10' qemu_comm_method="monitor"
tests/qemu-iotests/137 +2 -0
@@ -41,6 +41,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file _supported_os Linux +# We are going to use lazy-refcounts +_unsupported_imgopts 'compat=0.10' _make_test_img 64M
tests/qemu-iotests/176 +2 -0
@@ -48,6 +48,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file _supported_os Linux +# Persistent dirty bitmaps require compat=1.1 +_unsupported_imgopts 'compat=0.10' function run_qemu() {
Signature · 1 line
2.14.3
Quoted 8 lines · Eric Blake
As requested here:
https://lists.gnu.org/archive/html/qemu-devel/2018-01/msg03984.htmlEric Blake (1):
iotests: Split 177 into two parts for compat=0.10Max Reitz (1):
iotests: Disable some tests for compat=0.10
Thanks! Applied to my block branch:
https://github.com/XanClic/qemu/commits/block
Max