From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQHri-0004Xa-0J for qemu-devel@nongnu.org; Wed, 19 Mar 2014 10:53:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQHrd-00022f-4N for qemu-devel@nongnu.org; Wed, 19 Mar 2014 10:53:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQHrc-000217-Qr for qemu-devel@nongnu.org; Wed, 19 Mar 2014 10:53:05 -0400 Message-ID: <5329AF4C.30907@redhat.com> Date: Wed, 19 Mar 2014 08:53:00 -0600 From: Eric Blake MIME-Version: 1.0 References: <5e57ec8dce227b3095dd476e893137f2b14c0d81.1395105370.git.jcody@redhat.com> <20140319133925.GA3019@irqsave.net> <20140319141948.GA4189@localhost.localdomain> <5329A977.5030801@redhat.com> <20140319144554.GB4189@localhost.localdomain> In-Reply-To: <20140319144554.GB4189@localhost.localdomain> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sAIEfqDosd0M5BOjTrbW2ClUIFeOWO6QD" Subject: Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sAIEfqDosd0M5BOjTrbW2ClUIFeOWO6QD Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/19/2014 08:45 AM, Jeff Cody wrote: >> >> ${@: -1} is not portable: >> >=20 > Yes, and there are likely other bash-isms in some of the shell > scripts in qemu-iotests. Since #!/bin/bash is explicitly specified, > it seems reasonable that bash-isms would be allowed. Ah, indeed, I missed the shebang line. Where we KNOW we are using bash, I have no problem using the additional features that bash gives us as a guarantee. > But I think in your next message you have a nice POSIX compatible > method of doing it with shifts, and it is probably best to default to > POSIX when practical. I'll go ahead and change it to the=20 > 'shift $(($# - 1))' method. Where the portable way doesn't cost any additional forks, then yes, I agree that being portable is nice for the sake of anyone copying-and-pasting from our explicit bash script over to a more generic /bin/sh script. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --sAIEfqDosd0M5BOjTrbW2ClUIFeOWO6QD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTKa9MAAoJEKeha0olJ0NqzZ0H/i/CwFmA5TJz0JzUKmn6lBMy 7kQQc+C1KiHUWI+wl+TYUjj33lAWnvc5G52peg5j6UZ6Q5ui2eBLZpLzTmnBnm8t FWKsx1RdkekI2rlnv8F3Fp6Xj77T3CB5vxQoSmhFgmnllG1MTbvta7KHAuXleY16 pytLbnnq9cHVxUjz2VNfekks4AN5TfpJSmYKxxE9Hqnxvyq4D22hpdoVZuEIXebs AnXeMelPLhm/UcJzJSOmmdV/YKAsSoVYjIqrJt6iGoSEjR8f9dxh/hhvmkaVMjo+ Hp4W+mauTeDLZv7MuQq2TDT6CaJ69qkf88CXogJbrZ8XFLsy+EQIgwbQW1xNnWg= =0adl -----END PGP SIGNATURE----- --sAIEfqDosd0M5BOjTrbW2ClUIFeOWO6QD--