qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v14 14/14] iotests: Add test for qcow2's bdrv_ma


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v14 14/14] iotests: Add test for qcow2's bdrv_make_empty
Date: Mon, 27 Oct 2014 09:06:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 2014-10-24 at 18:31, Eric Blake wrote:
On 10/24/2014 07:57 AM, Max Reitz wrote:
Add a test for qcow2's fast bdrv_make_empty implementation on images
without internal snapshots.

Signed-off-by: Max Reitz <address@hidden>
---
  tests/qemu-iotests/098     | 82 ++++++++++++++++++++++++++++++++++++++++++++++
  tests/qemu-iotests/098.out | 52 +++++++++++++++++++++++++++++
  tests/qemu-iotests/group   |  1 +
  3 files changed, 135 insertions(+)
  create mode 100755 tests/qemu-iotests/098
  create mode 100644 tests/qemu-iotests/098.out

+
+IMGOPTS="compat=1.1"
+
+for event in l1_update empty_image_prepare reftable_update refblock_alloc; do
Is it also worth a test where no I/O error occurs, to be sure we cover
the common case output?  Maybe by adding '' to this list...

+
+echo
+echo "=== $event ==="
+echo
+
+TEST_IMG="$TEST_IMG.base" _make_test_img 64M
+_make_test_img -b "$TEST_IMG.base" 64M
+
+# Some data that can be leaked when emptying the top image
+$QEMU_IO -c 'write 0 64k' "$TEST_IMG" | _filter_qemu_io
+
+cat > "$TEST_DIR/blkdebug.conf" <<EOF
+[inject-error]
+event = "$event"
+EOF
...and changing this file to be a no-op if $event is empty?

That should be covered by the test added by the previous patch. I hope.

But as written, the test is nice.

Reviewed-by: Eric Blake <address@hidden>

As always, thank you very much!

Max



reply via email to

[Prev in Thread] Current Thread [Next in Thread]