qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Alex Bradbury <asb@asbradbury.org>
Cc: Anthony Liguori <aliguori@us.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-test: add virtio-serial test
Date: Thu, 22 Dec 2011 08:58:58 -0700	[thread overview]
Message-ID: <4EF353C2.3010901@redhat.com> (raw)
In-Reply-To: <CA+wH297K5o=o+b+UOU4+UhSOJwdiUqE8qQxf5Y4z+3UR9RnMLA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

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   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

  reply	other threads:[~2011-12-22 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22 14:23 [Qemu-devel] [PATCH] qemu-test: add virtio-serial test Anthony Liguori
2011-12-22 15:46 ` Alex Bradbury
2011-12-22 15:58   ` Eric Blake [this message]
2011-12-22 16:20     ` Alex Bradbury
2011-12-22 16:55   ` Anthony Liguori

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=4EF353C2.3010901@redhat.com \
    --to=eblake@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=asb@asbradbury.org \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).