From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XifJr-0004eZ-JK for qemu-devel@nongnu.org; Mon, 27 Oct 2014 04:06:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XifJl-0007o4-EG for qemu-devel@nongnu.org; Mon, 27 Oct 2014 04:06:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XifJl-0007nO-6z for qemu-devel@nongnu.org; Mon, 27 Oct 2014 04:06:21 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9R86JtC027520 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 27 Oct 2014 04:06:19 -0400 Message-ID: <544DFCF7.5050503@redhat.com> Date: Mon, 27 Oct 2014 09:06:15 +0100 From: Max Reitz MIME-Version: 1.0 References: <1414159063-25977-1-git-send-email-mreitz@redhat.com> <1414159063-25977-15-git-send-email-mreitz@redhat.com> <544A7EE8.6070008@redhat.com> In-Reply-To: <544A7EE8.6070008@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v14 14/14] iotests: Add test for qcow2's bdrv_make_empty List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi 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 >> --- >> 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" <> +[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 As always, thank you very much! Max