From: Max Reitz <mreitz@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 3/3] iotests: Add test for colon handling
Date: Mon, 22 May 2017 22:17:34 +0200 [thread overview]
Message-ID: <eb9f70e3-5766-60c0-8d8d-6fe76c1f170e@redhat.com> (raw)
In-Reply-To: <8792c1f3-b079-2f0f-bf35-b3f3843da5c7@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2219 bytes --]
On 2017-05-22 22:06, Eric Blake wrote:
> On 05/22/2017 02:52 PM, Max Reitz wrote:
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>> tests/qemu-iotests/126 | 105 +++++++++++++++++++++++++++++++++++++++++++++
>> tests/qemu-iotests/126.out | 23 ++++++++++
>> tests/qemu-iotests/group | 1 +
>> 3 files changed, 129 insertions(+)
>> create mode 100755 tests/qemu-iotests/126
>> create mode 100644 tests/qemu-iotests/126.out
>>
>
>> +# Note that we could also do the same test with BASE_IMG=file:image:base.$IMGFMT
>> +# -- but behavior for that case is a bit strange. Protocol-prefixed paths are
>> +# in a sense always absolute paths, so such paths will never be combined with
>> +# the path of the overlay. But since "image:base.$IMGFMT" is actually a
>> +# relative path, it will always be evaluated relative to qemu's CWD (but not
>> +# relative to the overlay!). While this is more or less intended, it is still
>> +# pretty strange and thus not something that is tested here.
>> +# (The root of the issue is to use a relative path with a protocol prefix. This
>
> s/to/the/
Then it will also have to be s/use a/use of a/.
>> +# may always give you weird results because in one sense, qemu considers such
>> +# paths absolute, whereas in another, they are still relative.)
>
> Should we tighten qemu to forbid the use of a protocol prefix with a
> non-absolute path? But that can be a subsequent patch, I don't see it
> as a reason to hold up this one.
Hm. I'd rather not do this. It could be considered a bug fix (and it
would make patch 2 obsolete, so it would definitely have a use there),
but it would break compatibility.
The whole filename handling in qemu is a mess, and that's mostly because
users expect it to be a mess. It would be great if we didn't have to
handle filenames at all, or at least only absolute filenames, but that
would not be something that users like. And having little weird things
like these in some corner cases (it's not like many people are using an
explicit "file:" prefix anyway) is better than not supporting relative
filenames at all...
> Reviewed-by: Eric Blake <eblake@redhat.com>
Thanks!
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 498 bytes --]
next prev parent reply other threads:[~2017-05-22 20:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 19:52 [Qemu-devel] [PATCH v2 0/3] block: Fix backing paths for filenames with colons Max Reitz
2017-05-22 19:52 ` [Qemu-devel] [PATCH v2 1/3] " Max Reitz
2017-05-22 19:52 ` [Qemu-devel] [PATCH v2 2/3] block/file-*: *_parse_filename() and colons Max Reitz
2017-05-22 20:02 ` Eric Blake
2017-05-22 19:52 ` [Qemu-devel] [PATCH v2 3/3] iotests: Add test for colon handling Max Reitz
2017-05-22 20:06 ` Eric Blake
2017-05-22 20:17 ` Max Reitz [this message]
2017-05-26 17:30 ` [Qemu-devel] [PATCH v2 0/3] block: Fix backing paths for filenames with colons Max Reitz
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=eb9f70e3-5766-60c0-8d8d-6fe76c1f170e@redhat.com \
--to=mreitz@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.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).