From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9gcT-0006YY-P0 for qemu-devel@nongnu.org; Tue, 22 Jul 2014 16:25:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9gcM-0004Xp-9v for qemu-devel@nongnu.org; Tue, 22 Jul 2014 16:25:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9gcM-0004Xb-22 for qemu-devel@nongnu.org; Tue, 22 Jul 2014 16:24:58 -0400 Date: Tue, 22 Jul 2014 16:24:51 -0400 From: Jeff Cody Message-ID: <20140722202451.GB31882@localhost.localdomain> References: <53CEC7DC.6020407@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53CEC7DC.6020407@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 5/5] block: iotest - update 084 to test static VDI image creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: kwolf@redhat.com, sw@weilnetz.de, qemu-devel@nongnu.org, stefanha@redhat.com On Tue, Jul 22, 2014 at 10:21:48PM +0200, Max Reitz wrote: > On 21.07.2014 21:52, Jeff Cody wrote: > >This updates the VDI corruption test to also test static VDI image > >creation, as well as the default dynamic image creation. > > > >Signed-off-by: Jeff Cody > >--- > > tests/qemu-iotests/084 | 16 ++++++++++++++-- > > tests/qemu-iotests/084.out | 15 +++++++++++++++ > > 2 files changed, 29 insertions(+), 2 deletions(-) > > > >diff --git a/tests/qemu-iotests/084 b/tests/qemu-iotests/084 > >index cb4d7b7..ae33c2c 100755 > >--- a/tests/qemu-iotests/084 > >+++ b/tests/qemu-iotests/084 > >@@ -1,6 +1,7 @@ > > #!/bin/bash > > # > >-# Test case for VDI header corruption; image too large, and too many blocks > >+# Test case for VDI header corruption; image too large, and too many blocks. > >+# Also simple test for creating dynamic and static VDI images. > > # > > # Copyright (C) 2013 Red Hat, Inc. > > # > >@@ -43,14 +44,25 @@ _supported_fmt vdi > > _supported_proto generic > > _supported_os Linux > >+size=64M > > ds_offset=368 # disk image size field offset > > bs_offset=376 # block size field offset > > bii_offset=384 # block in image field offset > > echo > >+echo "=== Statically allocated image creation ===" > >+echo > >+_make_test_img $size -o static > >+_img_info > >+stat -c"disk image file size in bytes: %s" "${TEST_IMG}" > >+_cleanup_test_img > >+ > >+echo > > echo "=== Testing image size bounds ===" > > echo > >-_make_test_img 64M > >+_make_test_img $size > >+_img_info > >+stat -c"disk image file size in bytes: %s" "${TEST_IMG}" > > # check for image size too large > > # poke max image size, and appropriate blocks_in_image value > >diff --git a/tests/qemu-iotests/084.out b/tests/qemu-iotests/084.out > >index c7120d9..2dfafb7 100644 > >--- a/tests/qemu-iotests/084.out > >+++ b/tests/qemu-iotests/084.out > >@@ -1,8 +1,23 @@ > > QA output created by 084 > >+=== Statically allocated image creation === > >+ > >+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 > >+statically allocating 67109888 bytes > > This seems like left-over debug output to me (at least it doesn't > show up for me and I don't find it in block/vdi.c). > Indeed, it is. I'll respin & remove it, and add your R-b. Thanks, Jeff > With this line removed: > > Reviewed-by: Max Reitz > > >+image: TEST_DIR/t.IMGFMT > >+file format: IMGFMT > >+virtual size: 64M (67108864 bytes) > >+cluster_size: 1048576 > >+disk image file size in bytes: 67109888 > >+ > > === Testing image size bounds === > > Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 > >+image: TEST_DIR/t.IMGFMT > >+file format: IMGFMT > >+virtual size: 64M (67108864 bytes) > >+cluster_size: 1048576 > >+disk image file size in bytes: 1024 > > Test 1: Maximum size (1024 TB): > > qemu-img: Could not open 'TEST_DIR/t.IMGFMT': Could not open 'TEST_DIR/t.IMGFMT': Invalid argument >