From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8ipK-0003Nl-QX for qemu-devel@nongnu.org; Fri, 03 Jun 2016 02:43:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8ipJ-0001wY-W6 for qemu-devel@nongnu.org; Fri, 03 Jun 2016 02:43:26 -0400 Date: Fri, 3 Jun 2016 14:43:14 +0800 From: Fam Zheng Message-ID: <20160603064314.GL29298@ad.usersys.redhat.com> References: <1463470536-8981-1-git-send-email-famz@redhat.com> <1463470536-8981-21-git-send-email-famz@redhat.com> <01ab4726-7e79-5c68-0769-264c58a638ef@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01ab4726-7e79-5c68-0769-264c58a638ef@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 20/27] qemu-iotests: 046: Move version detection out from verify_io List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, Kevin Wolf , qemu-block@nongnu.org, Jeff Cody , Markus Armbruster , stefanha@redhat.com, den@openvz.org, pbonzini@redhat.com, John Snow On Wed, 05/25 15:23, Max Reitz wrote: > > -verify_io | $QEMU_IO "$TEST_IMG" | _filter_qemu_io > > +if ($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep "compat: 0.10" > /dev/null); then > > + # For v2 images, discarded clusters are read from the backing file > > + # Keep the variable empty so that the backing file value can be used as > > + # the default below > > + discarded= > > +else > > + # Discarded clusters are zeroed for v3 or later > > + discarded=0 > > +fi > > + > > +verify_io $discarded | $QEMU_IO -L "$TEST_IMG" | _filter_qemu_io > > With the code movement, the -L becomes unnecessary here. Good point, removing it. Fam