Test for bug fixes from byte-based block status
cover Test for bug fixes from byte-based block status
Kevin is correct, and I need tests of my recent bug fixes :)
https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg07235.html
Eric Blake (2):
iotests: Check dirty bitmap statistics in 124
iotests: Add test of recent fix to 'qemu-img measure'
tests/qemu-iotests/124 | 7 +++++- tests/qemu-iotests/190 | 59 ++++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/190.out | 11 +++++++++ tests/qemu-iotests/group | 1 + 4 files changed, 77 insertions(+), 1 deletion(-) create mode 100755 tests/qemu-iotests/190 create mode 100644 tests/qemu-iotests/190.out
Signature · 1 line
2.13.3
PATCH 1/2 iotests: Check dirty bitmap statistics in 124
We had a bug for multiple releases where dirty-bitmap count was documented in bytes but reported in sectors; enhance the testsuite to add coverage of DirtyBitmapInfo to ensure we do not regress again.
--- tests/qemu-iotests/124 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
tests/qemu-iotests/124 +6 -1
@@ -336,7 +336,12 @@ class TestIncrementalBackup(TestIncrementalBackupBase): (('0xab', 0, 512), ('0xfe', '16M', '256k'), ('0x64', '32736k', '64k'))) - + # Check the dirty bitmap stats + result = self.vm.qmp('query-block') + self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/name', 'bitmap0') + self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/count', 458752) + self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/granularity', 65536) + self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/status', 'active') # Prepare a cluster_size=128k backup target without a backing file. (target, _) = bitmap0.new_target()
Signature · 1 line
2.13.3
PATCH 2/2 iotests: Add test of recent fix to 'qemu-img measure'
In reply to Eric BlakeThe new test 190 ensures we don't regress back to an infinite loop when measuring the size of a 2T+ qcow2 image. I did not append to test 178, because that test is also designed to run with format 'raw'; also, this gives us some coverage of the measure command under the quick group.
--- tests/qemu-iotests/190 | 59 ++++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/190.out | 11 +++++++++ tests/qemu-iotests/group | 1 + 3 files changed, 71 insertions(+) create mode 100755 tests/qemu-iotests/190 create mode 100644 tests/qemu-iotests/190.out
tests/qemu-iotests/190 new file +59 -0
@@ -0,0 +1,59 @@ +#!/bin/bash +# +# qemu-img measure sub-command tests on huge qcow2 files +# +# Copyright (C) 2017 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +# creator [email protected] + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +status=1 # failure is the default! + +_cleanup() +{ + _cleanup_test_img + rm -f "$TEST_IMG.converted" +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter +. ./common.pattern + +# See 178 for more extensive tests across more formats +_supported_fmt qcow2 +_supported_proto file +_supported_os Linux + +echo "== Huge file ==" +echo + +IMGOPTS='cluster_size=2M' _make_test_img 2T + +$QEMU_IMG measure -O raw -f qcow2 "$TEST_IMG" +$QEMU_IMG measure -O qcow2 -o cluster_size=64k -f qcow2 "$TEST_IMG" +$QEMU_IMG measure -O qcow2 -o cluster_size=2M -f qcow2 "$TEST_IMG" + +# success, all done +echo "*** done" +rm -f $seq.full +status=0
tests/qemu-iotests/190.out new file +11 -0
@@ -0,0 +1,11 @@ +QA output created by 190 +== Huge file == + +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=2199023255552 +required size: 2199023255552 +fully allocated size: 2199023255552 +required size: 335806464 +fully allocated size: 2199359062016 +required size: 18874368 +fully allocated size: 2199042129920 +*** done
tests/qemu-iotests/group +1 -0
@@ -184,3 +184,4 @@ 186 rw auto 188 rw auto quick 189 rw auto +190 rw auto quick
Signature · 1 line
2.13.3
Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] iotests: Check dirty bitmap statistics in 124
In reply to Eric BlakeQuoted 18 lines · Eric Blake
We had a bug for multiple releases where dirty-bitmap count was documented in bytes but reported in sectors; enhance the testsuite to add coverage of DirtyBitmapInfo to ensure we do not regress again.
Signed-off-by Eric Blake <[email protected]>--- tests/qemu-iotests/124 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)tests/qemu-iotests/124 +0
-0@@ -336,7 +336,12 @@ class TestIncrementalBackup(TestIncrementalBackupBase): (('0xab', 0, 512), ('0xfe', '16M', '256k'), ('0x64', '32736k', '64k')))
tests/qemu-iotests/124 class TestIncrementalBackup(TestIncrementalBackupBase): · line 347
Quoted 10 lines
tests/qemu-iotests/124 +6
-1- + # Check the dirty bitmap stats + result = self.vm.qmp('query-block') + self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/name', 'bitmap0') + self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/count', 458752) + self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/granularity', 65536) + self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/status', 'active') # Prepare a cluster_size=128k backup target without a backing file. (target, _) = bitmap0.new_target()
Good addition.
Quoted 8 lines · Eric Blake
Kevin is correct, and I need tests of my recent bug fixes :)
https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg07235.html
Eric Blake (2):
iotests: Check dirty bitmap statistics in 124
iotests: Add test of recent fix to 'qemu-img measure'
Quoted 12 lines
tests/qemu-iotests/124 | 7 +++++- tests/qemu-iotests/190 | 59 ++++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/190.out | 11 +++++++++ tests/qemu-iotests/group | 1 + 4 files changed, 77 insertions(+), 1 deletion(-) create mode 100755 tests/qemu-iotests/190 create mode 100644 tests/qemu-iotests/190.outSignature · 1 line
2.13.3
Kevin Wolf
AppliedAm 24.07.2017 um 17:39 hat Eric Blake geschrieben:
Quoted 3 lines
Kevin is correct, and I need tests of my recent bug fixes :)
https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg07235.html
Thanks, applied to the block branch.
Kevin