[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-test: add virtio-serial test
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-test: add virtio-serial test |
Date: |
Thu, 22 Dec 2011 08:58:58 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 |
On 12/22/2011 08:46 AM, Alex Bradbury wrote:
>> +
>> +in_host() {
>> + tmpchr=$tmpdir/chr.log
>
> By far the most common error likely to appear in any of these test
> scripts is insufficient shell quoting causing e.g. breakages when the
> scripts are run from a directory with spaces.
Shell assignments do not need quoting, since they are not subject to
argument splitting or filename expansion in the first place.
Blindly requiring double-quoting of all shell variables and command
substitutions can actually introduce problems if you care about
portability to ancient shells, since constructs like:
var=`command "with quotes"`
are actually MORE portable than:
var="`command "with quotes"`"
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature