From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYPoc-0000Z4-KK for qemu-devel@nongnu.org; Thu, 10 Apr 2014 20:59:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYPoW-0002fM-Kz for qemu-devel@nongnu.org; Thu, 10 Apr 2014 20:59:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYPoW-0002fA-CJ for qemu-devel@nongnu.org; Thu, 10 Apr 2014 20:59:28 -0400 Date: Fri, 11 Apr 2014 08:59:32 +0800 From: Fam Zheng Message-ID: <20140411005932.GA19717@T430.nay.redhat.com> References: <10015a278ac01aa8f6848bf89d433c91e3184b76.1397097046.git.jcody@redhat.com> <20140410075357.GF22890@T430.nay.redhat.com> <20140410125356.GD4859@localhost.localdomain> <5346AE20.4040903@redhat.com> <5346AF2A.3050701@redhat.com> <20140410180951.GE4859@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140410180951.GE4859@localhost.localdomain> 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 Thu, 04/10 14:09, Jeff Cody wrote: > On Thu, Apr 10, 2014 at 08:48:10AM -0600, Eric Blake wrote: > > On 04/10/2014 08:43 AM, Eric Blake wrote: > > > On 04/10/2014 06:53 AM, Jeff Cody wrote: > > > > > >>>> +++ 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? > > >>> > > > > > > > > http://austingroupbugs.net/view.php?id=351 > > > > > > But even with the notion of an assignment-context argument added to a > > > future version of POSIX, the reality is that given the present standard, > > > it's safer to either use "" to ensure no word splitting: > > > > Well, if you were trying to be portable to multiple shells, then it > > would matter. But as this script is explicitly being run under > > /bin/bash, and as bash already has support for declaration utilities > > where local is one such utility, your script as written is safe without > > "" in the arguments to local. So I'm fine whether you choose to change > > it in a respin or to leave it as written in this version. Thanks for the thorough explanation, Eric! > > Hi Eric, > > Thanks - I consulted specifically with just the bash documentation, so > you are right, this script (and likely most of qemu-iotests) is > bash-only. > > That particular line is context as well, and not an actual change - so > while it may be a good idea to quote it to make the scripts closer to > posix-only, my guess is there are quite a few similar lines throughout > all the qemu-iotests scripts. > > Given that, if we address that it would probably make sense to do that > in a bash->posix conversion series for all the scripts (likely a low > priority, however). > OK :) Thanks, Fam