[Top][All Lists]

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

Re: [Qemu-block] [PATCH v2 3/3] iotests: Add test for colon handling

From: Max Reitz
Subject: Re: [Qemu-block] [PATCH v2 3/3] iotests: Add test for colon handling
Date: Mon, 22 May 2017 22:17:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 2017-05-22 22:06, Eric Blake wrote:
> On 05/22/2017 02:52 PM, Max Reitz wrote:
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>>  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 <address@hidden>



Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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