From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WY4wV-0003Sx-67 for qemu-devel@nongnu.org; Wed, 09 Apr 2014 22:42:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WY4wP-0005YX-1u for qemu-devel@nongnu.org; Wed, 09 Apr 2014 22:42:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WY4wO-0005YR-Pw for qemu-devel@nongnu.org; Wed, 09 Apr 2014 22:42:12 -0400 From: Jeff Cody Date: Wed, 9 Apr 2014 22:41:57 -0400 Message-Id: <10015a278ac01aa8f6848bf89d433c91e3184b76.1397097046.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: Subject: [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: qemu-devel@nongnu.org Cc: kwolf@redhat.com, benoit@irqsave.net, stefanha@redhat.com 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 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