From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WY9o6-0006dg-CO for qemu-devel@nongnu.org; Thu, 10 Apr 2014 03:54:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WY9o0-0002jX-6t for qemu-devel@nongnu.org; Thu, 10 Apr 2014 03:53:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WY9nz-0002jT-Uy for qemu-devel@nongnu.org; Thu, 10 Apr 2014 03:53:52 -0400 Date: Thu, 10 Apr 2014 15:53:57 +0800 From: Fam Zheng Message-ID: <20140410075357.GF22890@T430.nay.redhat.com> References: <10015a278ac01aa8f6848bf89d433c91e3184b76.1397097046.git.jcody@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10015a278ac01aa8f6848bf89d433c91e3184b76.1397097046.git.jcody@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 4/5] block: qemu-iotests - fix image cleanup when using spaced pathnames List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, benoit@irqsave.net On Wed, 04/09 22:41, Jeff Cody wrote: > The _rm_test_img() function in common.rc did not quote the image > file, which left droppings in the scratch directory (and performed > a potentially unsafe rm -f). > > This adds the necessary quotes. > > Signed-off-by: Jeff Cody > --- > tests/qemu-iotests/common.rc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc > index 7f00883..195c564 100644 > --- a/tests/qemu-iotests/common.rc > +++ b/tests/qemu-iotests/common.rc > @@ -178,10 +178,10 @@ _rm_test_img() > local img=$1 Since we are quoting $img, should we quote $1 as well? Fam > if [ "$IMGFMT" = "vmdk" ]; then > # Remove all the extents for vmdk > - $QEMU_IMG info $img 2>/dev/null | grep 'filename:' | cut -f 2 -d: \ > + "$QEMU_IMG" info "$img" 2>/dev/null | grep 'filename:' | cut -f 2 -d: \ > | xargs -I {} rm -f "{}" > fi > - rm -f $img > + rm -f "$img" > } > > _cleanup_test_img() > -- > 1.8.3.1 > >