From: Eric Blake <eblake@redhat.com>
To: Jeff Cody <jcody@redhat.com>
Cc: "Benoît Canet" <benoit.canet@irqsave.net>,
kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests
Date: Wed, 19 Mar 2014 08:53:00 -0600 [thread overview]
Message-ID: <5329AF4C.30907@redhat.com> (raw)
In-Reply-To: <20140319144554.GB4189@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]
On 03/19/2014 08:45 AM, Jeff Cody wrote:
>>
>> ${@: -1} is not portable:
>>
>
> 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
> '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.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-03-19 14:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 1:24 [Qemu-devel] [PATCH 0/4] Add common QEMU control functionality to qemu-iotests Jeff Cody
2014-03-18 1:24 ` [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests Jeff Cody
2014-03-19 13:39 ` Benoît Canet
2014-03-19 14:19 ` Jeff Cody
2014-03-19 14:28 ` Eric Blake
2014-03-19 14:32 ` Eric Blake
2014-03-19 14:45 ` Jeff Cody
2014-03-19 14:53 ` Eric Blake [this message]
2014-04-10 2:03 ` Fam Zheng
2014-03-18 1:24 ` [Qemu-devel] [PATCH 2/4] block: qemu-iotests - update 085 to use common.qemu Jeff Cody
2014-03-19 13:44 ` Benoît Canet
2014-03-18 1:24 ` [Qemu-devel] [PATCH 3/4] block: qemu-iotests - fix image cleanup when using spaced pathnames Jeff Cody
2014-03-19 13:46 ` Benoît Canet
2014-03-18 1:24 ` [Qemu-devel] [PATCH 4/4] block: qemu-iotests: make test 019 and 086 work with " Jeff Cody
2014-03-19 13:47 ` Benoît Canet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5329AF4C.30907@redhat.com \
--to=eblake@redhat.com \
--cc=benoit.canet@irqsave.net \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.