qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for


From: Eric Blake
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]