* [Qemu-devel] [PATCH 1/2] iotests: Check dirty bitmap statistics in 124
2017-07-24 15:39 [Qemu-devel] [PATCH for-2.10 0/2] Test for bug fixes from byte-based block status Eric Blake
@ 2017-07-24 15:39 ` Eric Blake
2017-07-24 22:02 ` [Qemu-devel] [Qemu-block] " John Snow
2017-07-24 15:39 ` [Qemu-devel] [PATCH 2/2] iotests: Add test of recent fix to 'qemu-img measure' Eric Blake
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Eric Blake @ 2017-07-24 15:39 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, qemu-block, Max Reitz
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 <eblake@redhat.com>
---
tests/qemu-iotests/124 | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124
index d0d2c2bfb0..8e76e62f93 100644
--- a/tests/qemu-iotests/124
+++ b/tests/qemu-iotests/124
@@ -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()
--
2.13.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] iotests: Check dirty bitmap statistics in 124
2017-07-24 15:39 ` [Qemu-devel] [PATCH 1/2] iotests: Check dirty bitmap statistics in 124 Eric Blake
@ 2017-07-24 22:02 ` John Snow
0 siblings, 0 replies; 6+ messages in thread
From: John Snow @ 2017-07-24 22:02 UTC (permalink / raw)
To: Eric Blake, qemu-devel; +Cc: kwolf, qemu-block, Max Reitz
On 07/24/2017 11:39 AM, Eric Blake wrote:
> 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 <eblake@redhat.com>
> ---
> tests/qemu-iotests/124 | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124
> index d0d2c2bfb0..8e76e62f93 100644
> --- a/tests/qemu-iotests/124
> +++ b/tests/qemu-iotests/124
> @@ -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()
>
Good addition.
Reviewed-by: John Snow <jsnow@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 2/2] iotests: Add test of recent fix to 'qemu-img measure'
2017-07-24 15:39 [Qemu-devel] [PATCH for-2.10 0/2] Test for bug fixes from byte-based block status Eric Blake
2017-07-24 15:39 ` [Qemu-devel] [PATCH 1/2] iotests: Check dirty bitmap statistics in 124 Eric Blake
@ 2017-07-24 15:39 ` Eric Blake
2017-07-25 13:21 ` [Qemu-devel] [Qemu-block] [PATCH for-2.10 0/2] Test for bug fixes from byte-based block status Stefan Hajnoczi
2017-07-27 12:41 ` [Qemu-devel] " Kevin Wolf
3 siblings, 0 replies; 6+ messages in thread
From: Eric Blake @ 2017-07-24 15:39 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, qemu-block, Max Reitz
The 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.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
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
diff --git a/tests/qemu-iotests/190 b/tests/qemu-iotests/190
new file mode 100755
index 0000000000..8f808fef5d
--- /dev/null
+++ b/tests/qemu-iotests/190
@@ -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
+owner=eblake@redhat.com
+
+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
diff --git a/tests/qemu-iotests/190.out b/tests/qemu-iotests/190.out
new file mode 100644
index 0000000000..d001942002
--- /dev/null
+++ b/tests/qemu-iotests/190.out
@@ -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
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
index 287f0ea27d..823811076d 100644
--- a/tests/qemu-iotests/group
+++ b/tests/qemu-iotests/group
@@ -184,3 +184,4 @@
186 rw auto
188 rw auto quick
189 rw auto
+190 rw auto quick
--
2.13.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10 0/2] Test for bug fixes from byte-based block status
2017-07-24 15:39 [Qemu-devel] [PATCH for-2.10 0/2] Test for bug fixes from byte-based block status Eric Blake
2017-07-24 15:39 ` [Qemu-devel] [PATCH 1/2] iotests: Check dirty bitmap statistics in 124 Eric Blake
2017-07-24 15:39 ` [Qemu-devel] [PATCH 2/2] iotests: Add test of recent fix to 'qemu-img measure' Eric Blake
@ 2017-07-25 13:21 ` Stefan Hajnoczi
2017-07-27 12:41 ` [Qemu-devel] " Kevin Wolf
3 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2017-07-25 13:21 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-devel, kwolf, qemu-block
[-- Attachment #1: Type: text/plain, Size: 779 bytes --]
On Mon, Jul 24, 2017 at 10:39:50AM -0500, Eric Blake wrote:
> 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
>
> --
> 2.13.3
>
>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.10 0/2] Test for bug fixes from byte-based block status
2017-07-24 15:39 [Qemu-devel] [PATCH for-2.10 0/2] Test for bug fixes from byte-based block status Eric Blake
` (2 preceding siblings ...)
2017-07-25 13:21 ` [Qemu-devel] [Qemu-block] [PATCH for-2.10 0/2] Test for bug fixes from byte-based block status Stefan Hajnoczi
@ 2017-07-27 12:41 ` Kevin Wolf
3 siblings, 0 replies; 6+ messages in thread
From: Kevin Wolf @ 2017-07-27 12:41 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-devel, qemu-block
Am 24.07.2017 um 17:39 hat Eric Blake geschrieben:
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread