From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQw7j-0005Cb-Rg for qemu-devel@nongnu.org; Tue, 01 Oct 2013 05:20:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQw7Z-0006RN-2O for qemu-devel@nongnu.org; Tue, 01 Oct 2013 05:20:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQw7Y-0006Qj-P3 for qemu-devel@nongnu.org; Tue, 01 Oct 2013 05:19:56 -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 r919Jtqp018955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 1 Oct 2013 05:19:56 -0400 Message-ID: <524A93B8.6050108@redhat.com> Date: Tue, 01 Oct 2013 11:19:52 +0200 From: Max Reitz MIME-Version: 1.0 References: <1379938162-14005-1-git-send-email-mreitz@redhat.com> <1379938162-14005-7-git-send-email-mreitz@redhat.com> <5249B2AB.6090701@redhat.com> In-Reply-To: <5249B2AB.6090701@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 6/6] qemu-iotests: Additional info from qemu-img info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi On 2013-09-30 19:19, Eric Blake wrote: > On 09/23/2013 06:09 AM, Max Reitz wrote: >> Add a test for the additional information now provided by qemu-img info >> when used on qcow2 images. >> >> Signed-off-by: Max Reitz >> --- >> tests/qemu-iotests/065 | 72 ++++++++++++++++++++++++++++++++++++++++++++++ >> tests/qemu-iotests/065.out | 22 ++++++++++++++ >> tests/qemu-iotests/group | 1 + >> 3 files changed, 95 insertions(+) >> create mode 100755 tests/qemu-iotests/065 >> create mode 100644 tests/qemu-iotests/065.out > This patch only tests human output, not JSON. I'd not be happy at all with testing JSON output through a shell script (or rather, without properly parsing it). Since I don't really see the point of testing the JSON output as well: It is basically generated the same way as the human-readable output, however, the latter uses the new bdrv_image_info_specific_dump function, so I think the human-readable output is actually more "error-prone" (and if something breaks the JSON output that doesn't break other JSON tests, it should break the human-readable output as well). So I'll leave the JSON test out and include a note in the commit message. >> +# creator >> +owner=mreitz@redhat.com >> + >> +seq=`basename $0` >> +echo "QA output created by $seq" >> + >> +here=`pwd` > Not your fault (copy-and-paste from other tests), but as long as we are > requiring bash, $PWD is much faster than `pwd`, and $() is nicer than `` > where we don't have even faster shortcuts like $PWD. Well, it's executed just once per test, so it shouldn't be that much of a performance killer, but I'll change it anyway, thanks. ;) >> +=== Testing qcow2 image with -o compat=0.10 === >> + >> +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 >> +Format specific information: >> +compat: 0.10 > Should we be indenting the human output, to make it obvious how many > remaining fields are being output as a result of format specific > information? Seems very reasonable. I'll have to change one of the other patches for this as well, but this should be a very minor change. > I'm still not happy with 5/6 in its current form, but can live with this > patch as-is if we don't bother with testing JSON form. Does 5/6 even > need to worry about stripping JSON form, if you aren't going to test > JSON form? As I've said in my answer to patch 5, stripping JSON isn't for this new test, but rather for compatibility with the old tests (specifically, test 043). Max