[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v3 2/3] block: Remove inner quotati
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v3 2/3] block: Remove inner quotation marks in iotest 085 |
Date: |
Tue, 3 Nov 2015 08:12:44 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/03/2015 03:32 AM, Alberto Garcia wrote:
> This patch removes the inner quotation marks in all cases like this:
>
> cmd=" ... "${variable}" ... "
>
> Signed-off-by: Alberto Garcia <address@hidden>
> ---
> tests/qemu-iotests/085 | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
I might have worded the commit message differently, though:
block: Remove incorrect "" in iotest 085
We had the patterns:
cmd="..."${variable}"..."
_send_qemu_cmd ... "..."${variable}"..."
which is equivalent to using ${variable} unquoted. In the cmd= usage,
that happened to be okay even though it is unusual (because no word
splitting occurs on variable assignment); but where the usage appeared
as an argument to _send_qemu_cmd, it was actively wrong (any whitespace
in ${variable} would have caused word splitting).
Fix it by removing the inner "", leaving ${variable} to be expanded
inside the outer "" as desired.
> @@ -152,7 +152,7 @@ echo === Invalid command - missing device and nodename ===
> echo
>
> _send_qemu_cmd $h "{ 'execute': 'blockdev-snapshot-sync',
> - 'arguments': {
> 'snapshot-file':'"${TEST_DIR}/1-${snapshot_virt0}"',
> + 'arguments': {
> 'snapshot-file':'${TEST_DIR}/1-${snapshot_virt0}',
> 'format': 'qcow2' } }" "error"
>
Here's an example of the actual bug being fixed.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature