From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnrHW-0005LI-OW for qemu-devel@nongnu.org; Mon, 10 Nov 2014 10:53:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnrHR-00014z-U9 for qemu-devel@nongnu.org; Mon, 10 Nov 2014 10:53:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnrHR-00014s-Mu for qemu-devel@nongnu.org; Mon, 10 Nov 2014 10:53:25 -0500 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 sAAFrOrx025021 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 10 Nov 2014 10:53:25 -0500 Message-ID: <5460DF72.4060807@redhat.com> Date: Mon, 10 Nov 2014 16:53:22 +0100 From: Max Reitz MIME-Version: 1.0 References: <1415389165-16157-1-git-send-email-kwolf@redhat.com> <1415389165-16157-10-git-send-email-kwolf@redhat.com> In-Reply-To: <1415389165-16157-10-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 9/9] qemu-iotests: Test writing non-raw image headers to raw image List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-devel@nongnu.org Cc: jcody@redhat.com, armbru@redhat.com, stefanha@redhat.com On 2014-11-07 at 20:39, Kevin Wolf wrote: > This is forbidden if the raw driver was probed. > > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/109 | 100 ++++++++++++++++++++++++++++++ > tests/qemu-iotests/109.out | 149 +++++++++++++++++++++++++++++++++++++++++++++ > tests/qemu-iotests/group | 1 + > 3 files changed, 250 insertions(+) > create mode 100755 tests/qemu-iotests/109 > create mode 100644 tests/qemu-iotests/109.out > > diff --git a/tests/qemu-iotests/109 b/tests/qemu-iotests/109 > new file mode 100755 > index 0000000..ca7ea43 > --- /dev/null > +++ b/tests/qemu-iotests/109 > @@ -0,0 +1,100 @@ > +#!/bin/bash > +# > +# Test writing image headers of other formats into raw images > +# > +# Copyright (C) 2014 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 . > +# > + > +# creator > +owner=kwolf@redhat.com > + > +seq="$(basename $0)" > +echo "QA output created by $seq" > + > +here="$PWD" > +tmp=/tmp/$$ > +status=1 # failure is the default! > + > +_cleanup() > +{ > + rm -f $TEST_IMG.src > + _cleanup_test_img > +} > +trap "_cleanup; exit \$status" 0 1 2 3 15 > + > +# get standard environment, filters and checks > +. ./common.rc > +. ./common.filter > +. ./common.qemu > + > +_supported_fmt raw > +_supported_proto file > +_supported_os Linux > + > +qemu_comm_method=qmp > + > +for fmt in qcow qcow2 qed vdi vhdx vmdk vpc; do > + > + echo > + echo "=== Writing a $fmt header into raw ===" > + echo > + > + _make_test_img 64M > + TEST_IMG="$TEST_IMG.src" IMGFMT=$fmt _make_test_img 64M Sometimes you're using "$TEST_IMG.src" and sometimes "${TEST_IMG}.src". I don't know why, but it's not wrong. I guess. Note that vhdx support is optional. For another optional block driver, quorum, we decided to skip the test if it was not enabled. The easiest way to do this here would be to drop vhdx from the list. I'm not sure whether we want to do that, but I don't feel so good about having this test fail (for raw!) when vhdx is not enabled, either. With vhdx removed or somehow that case circumvented if it isn't enabled: Reviewed-by: Max Reitz This doesn't mean I strongly oppose leaving it in but I at least want you to acknowledge that this test fails without having vhdx enabled. Max